Skip to content

Add Swagger/OpenAPI documentation for REST API - #1696

Draft
kujoon226 wants to merge 2 commits into
OpenEnergyDashboard:developmentfrom
kujoon226:swagger-api-docs
Draft

Add Swagger/OpenAPI documentation for REST API#1696
kujoon226 wants to merge 2 commits into
OpenEnergyDashboard:developmentfrom
kujoon226:swagger-api-docs

Conversation

@kujoon226

Copy link
Copy Markdown
Contributor

Description

This PR adds an initial Swagger/OpenAPI implementation for OED's REST API. It adds Swagger UI at /api-docs and documents the GET /api/conversions endpoint as an example. This is a prototype for maintainer feedback before documenting additional endpoints.

Partly Addresses #1695

Type of change

(Check the ones that apply by placing an "x" instead of the space in the [ ] so it becomes [x])

  • Note merging this changes the database configuration.
  • [x ] This change requires a documentation update

Checklist

(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)

  • [ x] I have followed the OED pull request ideas
  • [ x] I have removed text in ( ) from the issue request
  • [ x] You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

Currently only the GET /api/conversions endpoint is documented as an example. Additional API endpoints still need Swagger/OpenAPI documentation. swagger-jsdoc is currently pinned to version 6.2.8 for compatibility with OED's current Node environment.

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.

1 participant