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 api-generation support w/ swagger-ui-tag #43

Closed
wants to merge 1 commit into from

Conversation

pedro-psb
Copy link
Member

@pedro-psb pedro-psb commented May 10, 2024

This adds rest-api generation to the docs.

  • It uses the swagger-ui-tag plugin
  • It fetches the api.json from one of the two urls (whichever is available):
    • https://docs.pulpproject.org/{repo_name}/api.json
    • https://docs.pulpproject.org/{repo_name}/_static/api.json
  • It relies that we'll keep publishing the api.json as we currently do (which is a fact I was missing).

Observations (about rest api gen):

  • Performance: The plugin adds about 27s of overhead, but I could find a way to optmize it up to 2s by filtering the filenames the plugin tries to process: Add filename filter for performance gain blueswen/mkdocs-swagger-ui-tag#26
  • No anchors: Because swagger-ui is js-generated, we don't get anchors out of the box. We'd need a javascript wizard to send a patch on that. Do we know one?
  • Grouping: We may be able to add better grouping using a swagger-ui plugin. This video shows how on a slightly different context. Something to think for the future.

Preview

image

closes: #40

@pedro-psb pedro-psb force-pushed the generate-rest-api branch from 945cff8 to 3fa873d Compare May 13, 2024 18:59
@pedro-psb pedro-psb marked this pull request as draft May 13, 2024 20:06
@pedro-psb
Copy link
Member Author

Converted to draft because I want to wait the performance issue to be resolved.

@pedro-psb
Copy link
Member Author

pedro-psb commented Jun 7, 2024

Superseded by #47

@pedro-psb pedro-psb closed this Jun 7, 2024
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.

Add Rest API and client bindings docs
1 participant