ravada icon indicating copy to clipboard operation
ravada copied to clipboard

Document frontend REST API with OpenAPI 3.0 specification

Open Copilot opened this issue 3 months ago • 0 comments

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)

  • Fixes UPC/ravada#2269

✨ 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 avatar Dec 15 '25 15:12 Copilot