Skip to content
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

Add Swagger JSON endpoint #87

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

AmineAfia
Copy link
Collaborator

@AmineAfia AmineAfia commented Oct 3, 2024

TL;DR

Added a new endpoint to serve Swagger JSON file.

What changed?

  • Introduced a new GET route /json in the API.
  • This route serves the swagger.json file located in the ./docs directory.

How to test?

  1. Start the API server.
  2. Make a GET request to http://your-api-host/json.
  3. Verify that the response is the contents of the swagger.json file.

Why make this change?

This change allows direct access to the Swagger JSON file, which can be useful for:

  • Integrating with external tools that consume Swagger/OpenAPI specifications.
  • Enabling developers to easily download and use the API documentation offline.
  • Facilitating automated testing or documentation generation processes that require the raw Swagger JSON.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @AmineAfia and the rest of your teammates on Graphite Graphite

@AmineAfia AmineAfia changed the title expose openapi spec througn an endpoint Add Swagger JSON endpoint Oct 3, 2024
@AmineAfia AmineAfia requested a review from iuwqyir October 3, 2024 17:06
@AmineAfia AmineAfia marked this pull request as ready for review October 3, 2024 17:06
@AmineAfia AmineAfia merged commit 99f24d4 into main Oct 3, 2024
4 checks passed
@AmineAfia AmineAfia deleted the 10-03-expose_openapi_spec_througn_an_endpoint branch October 3, 2024 18:08
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