Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Description

Extracted and documented all 200 routes from script/rvd_front in OpenAPI 3.0 format.

Created openapi.yaml:

  • 200 routes organized into 14 categories (auth, machines, nodes, users, groups, admin, lists, networking, storage, requests, booking, bundles, hostdevices, misc)
  • HTTP methods mapped from Mojolicious syntax (get, any, post, delete) to standard REST
  • Path parameters converted from Mojolicious format (#param, (:param), :param) to OpenAPI {param} syntax
  • Request/response schemas with types and descriptions
  • Session-based authentication documented

Updated README.md:

  • Added API Documentation section with links to view spec in Swagger Editor, Redoc, and Swagger UI

The specification passes swagger-cli validation and provides machine-readable API documentation for client SDK generation, automated testing, and interactive exploration.

Motivation and Context

Frontend routes were undocumented. OpenAPI provides standardized API documentation for integration, tooling, and developer experience.

Original prompt

This section details on the original issue you should resolve

<issue_title>Document the frontend with OpenAPI</issue_title>
<issue_description>The frontend is a Mojolicious application stored in the file script/rvd_front. It is a series of functions with the form of a http method and a route.

The method can be:

  • get
  • any
  • post
  • delete

ie. This is the function that renders a line suitable to user by external robots:

any '/robots.txt'

Find all the routes in the script file and document them to use with OpenAPI.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 15, 2025 16:04
Created openapi.yaml documenting the Ravada frontend API endpoints from script/rvd_front. Includes documentation for authentication, machine management, node operations, user/group management, and other core functionality.

Co-authored-by: frankiejol <136835+frankiejol@users.noreply.github.com>
- Fixed OpenAPI validation error for optional path parameters
- Added API documentation section to README.md
- OpenAPI specification now passes swagger-cli validation

Co-authored-by: frankiejol <136835+frankiejol@users.noreply.github.com>
- Clarified route parameter conventions documentation
- Removed invalid default value from required path parameter
- Added missing host devices template route
- Improved documentation clarity about Mojolicious vs OpenAPI syntax

Co-authored-by: frankiejol <136835+frankiejol@users.noreply.github.com>
Copilot AI changed the title [WIP] Document frontend routes using OpenAPI Document frontend REST API with OpenAPI 3.0 specification Dec 15, 2025
Copilot AI requested a review from frankiejol December 15, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the frontend with OpenAPI

2 participants