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

Allow loading spec file by url parameter #340

Open
brylie opened this issue Sep 6, 2017 · 8 comments
Open

Allow loading spec file by url parameter #340

brylie opened this issue Sep 6, 2017 · 8 comments

Comments

@brylie
Copy link
Contributor

brylie commented Sep 6, 2017

It would be nice to share a link to edit or view an OpenAPI Spec file, where the specification would automatically load. E.g. when sharing changes with a reviewer, I could share a link where the OpenAPI spec file would automatically be displayed.

If it is not already possible, consider adding a URL parameter that could be used to auto-populate the OpenAPI Designer with a spec file located somewhere on the web.

@bajiat
Copy link
Contributor

bajiat commented Sep 13, 2017

This would also solve a problem in APInf platform. Currently, if you have an existing OpenAPI spec in the Documentation tab and if you press Open Editor button, a blank editor is opened. We would like to open the existing file for editing.

@bajiat bajiat added this to the 1.3.0 milestone Sep 13, 2017
@tulir
Copy link
Collaborator

tulir commented Sep 13, 2017

@bajiat I think the APInf platform integration problem is #327. URL parameters (actually client-side URL hashes, since designer doesn't have a webserver backend) that load specific APIs are probably more useful when using the designer as a standalone website.

@brylie
Copy link
Contributor Author

brylie commented Sep 13, 2017

This issue may be a possible solution. In effect, we would just pass the URL of the uploaded OpenAPI file to the OpenAPI Designer as a URL parameter. The user could edit the file, save it to OpenAPI Space, and somehow link the new file to their APInf API.

We haven't fleshed out the idea fully, but intuitively feel this is a related task.

@tulir
Copy link
Collaborator

tulir commented Sep 13, 2017

For sharing documents, I think we should just have an URL hash with the information needed to fetch the correct document from Space rather than the full URL. Though we'll definitely want a way to import a spec from any URL in the UI and in the postMessage API.
All platform integration related things should probably use the postMessage API.

@brylie
Copy link
Contributor Author

brylie commented Sep 13, 2017

The use case here is that people might want to load any web accessible spec file. E.g. a specfile that is located on GitHub.

I opened this issue, because I was writing a specfile that is being stored on GitHub, and want to share it with other collaborators for review.

@brylie
Copy link
Contributor Author

brylie commented Sep 13, 2017

By way of example, Swagger UI will render any OpenAPI file that is web accessible (when provided as a URL parameter url).

@tulir
Copy link
Collaborator

tulir commented Sep 13, 2017

I guess we can do that too, but it'll probably require escaping if we want IE/Edge compatibility

@brylie
Copy link
Contributor Author

brylie commented Sep 13, 2017

Cool, it's just a feature request. I just want to make sure there is enough clarity about the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants