Skip to content

Add OpenAPI spec with Swagger UI to API reference#14

Open
gaarutyunov wants to merge 1 commit intoslicervm:masterfrom
gaarutyunov:feat/openapi-swagger-ui
Open

Add OpenAPI spec with Swagger UI to API reference#14
gaarutyunov wants to merge 1 commit intoslicervm:masterfrom
gaarutyunov:feat/openapi-swagger-ui

Conversation

@gaarutyunov
Copy link

Description

Add interactive OpenAPI documentation to the API reference page using Swagger UI. This replaces the manual markdown endpoint documentation with a machine-readable OpenAPI 3.0 specification rendered via the mkdocs-swagger-ui-tag plugin.

Changes include:

  • docs/reference/openapi.yaml - Complete OpenAPI 3.0 spec covering all REST API endpoints
  • docs/reference/api.md - Updated to embed Swagger UI widget
  • docs/assets/swagger-hide-models.css - CSS to hide redundant info header in Swagger UI
  • mkdocs.yml - Added swagger-ui-tag plugin configuration
  • requirements.txt - Added mkdocs-swagger-ui-tag dependency

Motivation and Context

The current API documentation is manually maintained in markdown, which can become outdated and doesn't provide interactive features. An OpenAPI spec enables:

  • Interactive "Try it out" functionality

  • Auto-generated client SDKs

  • Better schema documentation

  • Easier maintenance

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

Tested locally using mkdocs serve - verified Swagger UI renders correctly and all endpoints are documented.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

@alexellis
Copy link
Member

Hey @gaarutyunov just saw this.. we'll have a look at it soon. We also generated openapi definitions recently after some changes and additional endpoints.

Alex

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.

2 participants