-
Notifications
You must be signed in to change notification settings - Fork 8.1k
api: include alternate link for swagger / OpenAPI spec #23944
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
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9562004 to
82679eb
Compare
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.
Pull request overview
This PR improves the crawlability and accessibility of the API documentation pages by adding an alternate link to the raw Swagger/OpenAPI specification file. The dynamically-rendered JavaScript-based API docs are not easily crawlable, so this provides search engines and users without JavaScript access to the underlying YAML specification.
- Moved the
$specURLvariable declaration to make it available in the document head - Added a
<link rel="alternate">element in the head pointing to the OpenAPI YAML specification - Added a
<noscript>fallback with a direct download link for users without JavaScript
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dvdksn
left a comment
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.
LGTM 👍
|
Thx! Let me make CoPilot happier if it also works inside the head tag 😅 |
The API docs are generated dynamically, which prevents them from being crawled / indexed. Provide a link to the swagger / OpenAPI spec that's used to generate the page, so that that content can be used as alternative. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
82679eb to
67c1e98
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The API docs are generated dynamically, which prevents them from being crawled / indexed. Provide a link to the swagger / OpenAPI spec that's used to generate the page, so that that content can be used as alternative.
Description
Related issues or tickets
Reviews