Unleash/unleash

OpenAPI spec - provide a download link from the documentation

gastonfournier opened this issue · 1 comments

Describe the feature request

It'd be nice to have our openapi.json (maybe openapi.yaml as well) be part of our docs, which can help auto-generate clients.

Right now, the only publicly available version is under https://us.app.unleash-hosted.com/ushosted/docs/openapi.json which is not meant to host that and can run out of sync with the generated documentation. Having it as a static asset inside our documentation can solve that.

The documentation https://us.app.unleash-hosted.com/ushosted/docs/openapi/ allows you to download the raw spec (under the title) but the page generated by docusaurus does not, so it might also be a plugin configuration.

image

Background

No response

Solution suggestions

When generating the documentation

'docusaurus-plugin-openapi-docs',
{
id: 'api-operations',
docsPluginId: 'classic',
config: {
server: {
specPath:
process.env.OPENAPI_SOURCE === 'localhost'
? 'http://localhost:4242/docs/openapi.json'
: 'https://us.app.unleash-hosted.com/ushosted/docs/openapi.json',
we can also download it inside generated resources and use that downloaded file as the input of docusaurus-plugin-openapi-docs that way we can serve openapi.json and that file will always be in sync with the generated documentation

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.