-
Notifications
You must be signed in to change notification settings - Fork 416
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
Conversation
docs/server_rest_api.md
Outdated
|
||
|Status|Meaning|Description|Schema| | ||
|---|---|---|---| | ||
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A list of Guards.|Inline| |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this 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
.
good catch can add at the top |
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