-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow swagger URL and not just swagger file #1993
Comments
Thanks for you interest in Apinf! This is a good idea and we can definitely consider this. I think it would be worthwhile to provide an option to either upload a file or to provide a link. Both of these would render in the Swagger UI. Does this meet your needs? |
Definition of done
Note: this solution should not affect the possibility of adding external documentation links |
@bajiat and @SkedGoDeploy I updated the task description, moving the Definition of done and adding some more context. |
Comment for the Documentation URL: Note that the URL field could be used both for Swagger link and link to any other external documentation. If the URL points to a Swagger file, it is shown in the Swagger UI. If the URL points to any other resource, it is displayed as a link in the external documentation section. |
This would likely require logic to parse the remote content in order to determine whether it is a swagger file. Parsing would probably happen each time the page is rendered, since it is possible for the remote contents to change at any time. For the above reasons, I recommend we explore alternative designs, so we can weigh complexity/simplicity/usability of multiple designs. |
@Nazarah here is idea we came up with @brylie @bajiat For now we keep external link to documentation as it is now, and will try to combine it with swagger link as a future enhancement. For swagger part we can have option to enter URL of documentation file, and render it on Save. |
hi @NNN , I came up with these designs from your feedback.
I am really not in favor of displaying older versions files in the manage dialog. |
@Nazarah Good work! There may be some room for improvement for the instruction text and the field labels, but other than that I would say this is now ok. Instruction textYou can upload and API documentation file (Swagger) or provide a link to your API documentation file. The API documentation file is rendered in the Documentation viewer. You can also provide a link to other external documentation related to your API, for example HTML documentation. Field labels"Link to API Documentation" > "Link to API Documentation File" |
Context
Currently, Apinf only allows API Managers to upload Swagger file to be rendered in the documentation browser.
User story
Feature request
Allow API Managers to specify a URL pointing to a Swagger file somewhere on the Internet. When the URL is provided, the Swagger file should be rendered in the Swagger UI.
Definition of done
Note: this solution should not affect the possibility of adding external documentation links
Original request
This is so that when we update our swagger file on our site, we don't have to remember to upload it to apinf.io
Wireframe
On opening the Manage dialog, user will now see Documentation link option and Documentation upload function appearing as radio buttons.
Selecting one option would disable the other option and vice versa. This is mentioned with instruction texts.
A feedback using S-alert can be shown mentioning which option has been enabled and which one disabled.
The text was updated successfully, but these errors were encountered: