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 redoc flag to generate and link to OpenAPI spec #33

Merged
merged 8 commits into from
Jun 4, 2020
Merged

Conversation

cuminandpaprika
Copy link
Contributor

@cuminandpaprika cuminandpaprika commented Jun 4, 2020

Summary

This PR adds a --redoc flag which generates a Redoc page which is linked to from the docs. This only occurs for OpenAPI or Swagger files imported into Sysl e.g import specs/openapi.yaml as simple.

Redoc Link

image

Redoc Page

image

To see what this looks like, you can refer to https://cuminandpaprika.github.io/sysl-catalog/ as this feature can't be tested locally as Redoc can't serve local OpenAPI spec files (Redocly/redoc#149)

Adds functions that produce a URL of format 
https://raw.githubusercontent.com/anz-bank/sysl-catalog/master/ by grabbing the remote-url via git
Currently only handles github.com and github enterprise
Adds a redoc html template which is used to display OpenAPI specs
Copy link
Contributor

@joshcarp joshcarp left a comment

Choose a reason for hiding this comment

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

Nice

Adds a function which is called in the template
This registers a redoc file to be created and also creates a link to the redoc file
Add --redoc flag to CLI
Adds redoc diagram generation in registered files
@cuminandpaprika cuminandpaprika changed the title Add Redoc option to display OpenAPI spec Add redoc flag to generate and link to OpenAPI spec Jun 4, 2020
@cuminandpaprika cuminandpaprika merged commit c217a96 into master Jun 4, 2020
@cuminandpaprika cuminandpaprika deleted the redoc branch June 4, 2020 07:26
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.

2 participants