-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP API to offer OpenAPI document #510
Comments
nasdf
added a commit
that referenced
this issue
Oct 18, 2023
## Relevant issue(s) Resolves #510 ## Description This PR adds an HTTP endpoint that returns an OpenAPI specification for DefraDB. The definitions are part code generation and part hand written. This should work well for adding examples and more documentation in the future. ## Tasks - [x] I made sure the code is well commented, particularly hard-to-understand areas. - [x] I made sure the repository-held documentation is changed accordingly. - [x] I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)). - [x] I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ... ## How has this been tested? View endpoint in browser `localhost:9181/api/v0/openapi`. Double checked with OpenAPI validator tool. Specify the platform(s) on which this was tested: - MacOS
nasdf
added a commit
to nasdf/defradb
that referenced
this issue
Oct 18, 2023
Resolves sourcenetwork#510 This PR adds an HTTP endpoint that returns an OpenAPI specification for DefraDB. The definitions are part code generation and part hand written. This should work well for adding examples and more documentation in the future. - [x] I made sure the code is well commented, particularly hard-to-understand areas. - [x] I made sure the repository-held documentation is changed accordingly. - [x] I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)). - [x] I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ... View endpoint in browser `localhost:9181/api/v0/openapi`. Double checked with OpenAPI validator tool. Specify the platform(s) on which this was tested: - MacOS
shahzadlone
pushed a commit
to shahzadlone/defradb
that referenced
this issue
Feb 23, 2024
## Relevant issue(s) Resolves sourcenetwork#510 ## Description This PR adds an HTTP endpoint that returns an OpenAPI specification for DefraDB. The definitions are part code generation and part hand written. This should work well for adding examples and more documentation in the future. ## Tasks - [x] I made sure the code is well commented, particularly hard-to-understand areas. - [x] I made sure the repository-held documentation is changed accordingly. - [x] I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)). - [x] I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ... ## How has this been tested? View endpoint in browser `localhost:9181/api/v0/openapi`. Double checked with OpenAPI validator tool. Specify the platform(s) on which this was tested: - MacOS
shahzadlone
added a commit
that referenced
this issue
Jun 4, 2024
## Relevant issue(s) Related #510 Resolve #2677 ## Description - Detect OpenAPI / HTTP documentation is always up to date. - Generate open-api docs in the appropriate dir. ## How has this been tested? - using `act` tool - manually introducing a change and seeing the action fail: https://github.com/sourcenetwork/defradb/actions/runs/9359749777/job/25763961265?pr=2678 Specify the platform(s) on which this was tested: - WSL2 instance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue recommends for DefraDB's HTTP API to offer an OpenAPI document. OpenAPI is a "standard interface description language for HTTP APIs". (A potential decision following this PR might be not to do it).
For reference see https://www.openapis.org/ and https://spec.openapis.org/oas/v3.1.0
Potential benefits of using OpenAPI:
Notes on DefraDB HTTP API-specific implementation:
<base-API-path>/openapi.yaml
e.g.http://localhost:9181/api/v0/openapi.yaml
go-chi
has https://github.com/go-chi/docgen which, AFAIK, aims to cover this but doesn't yet implement it (issue Update main.workflow to include TODO Action #1 Generate API in Swagger format go-chi/docgen#1 is for this and is still open since 2017...).The text was updated successfully, but these errors were encountered: