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

[v3] Page will not load after importing invalid spec #7

Closed
tulir opened this issue Jun 13, 2017 · 4 comments
Closed

[v3] Page will not load after importing invalid spec #7

tulir opened this issue Jun 13, 2017 · 4 comments

Comments

@tulir
Copy link

tulir commented Jun 13, 2017

I removed the info section in the import box and imported the spec. The import was successful (according to the popup modal), but when I reloaded the page it just turned blank and the console contained errors. Also, the console had TypeError: openapi.info is undefined right after importing.

Steps to reproduce:

  1. Remove the whole info and/or servers section from the JSON box in the Upload tab
  2. Click Load Definition
  3. Refresh the page

The problem seems to be that the uploaded definitions aren't properly validated and/or fixed.

@MikeRalphson
Copy link
Contributor

@tulir Thanks for the bug report! Have added to the pre-processing of the definition a check that the info object and mandatory properties are defined. Seems to fix the problem for me, but if you get a chance to retest?

@tulir
Copy link
Author

tulir commented Jun 13, 2017

Removing the info object works fine now, but removing the servers array will still break the page.

@MikeRalphson
Copy link
Contributor

Detection of missing servers array now fixed.

@tulir
Copy link
Author

tulir commented Jun 13, 2017

Seems to work now, thanks!

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

No branches or pull requests

2 participants