Skip to content

initial server api docs #917

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

Merged
merged 6 commits into from
Jul 17, 2024
Merged

initial server api docs #917

merged 6 commits into from
Jul 17, 2024

Conversation

dtam
Copy link
Contributor

@dtam dtam commented Jul 12, 2024

inital docs for api endpoints
not sold on where i put it we currently have a references area
do we just put it in the api readme?

also looked into https://github.com/PaloAltoNetworks/docusaurus-openapi-docs which doesnt seem compatible and https://redocusaurus.vercel.app/examples/using-single-yaml/ which is redocly based and ads another section to the site and the click through behavior doesnt interact with our header properly


|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A list of Guards.|Inline|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't showing any of the actual schemas. Maybe try re-generating this with the fully hydrated OpenAPI Spec that's published as part of the guardrails_api module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean guardrails_api/open-api-spec.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that come from guardrails-api-client/service-specs/guardrails-service-spec.yml ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda of, it's built from that but this one is fully hydrated. You're right that the proper source of truth would come from the guardrails_api_client module. Relative path would be guardrails_api_client/openapi-spec.json

@dtam dtam marked this pull request as ready for review July 15, 2024 22:37
Copy link
Collaborator

@CalebCourier CalebCourier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we should also mention somewhere in the docs (not necessarily here) that the guardrails-api hosts a swagger doc page at /docs.

@dtam
Copy link
Contributor Author

dtam commented Jul 16, 2024

good catch can add at the top

@zsimjee zsimjee changed the base branch from 0.5.0-dev to docsv2 July 16, 2024 19:53
@zsimjee zsimjee merged commit 01667bd into docsv2 Jul 17, 2024
@zsimjee zsimjee deleted the dtam/api_server_docs branch July 17, 2024 01:09
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.

3 participants