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

Swagger UI preview doesn't update on incorrect syntax #223

Open
malidiab opened this issue May 26, 2023 · 1 comment
Open

Swagger UI preview doesn't update on incorrect syntax #223

malidiab opened this issue May 26, 2023 · 1 comment

Comments

@malidiab
Copy link

malidiab commented May 26, 2023

To produce this at version : v4.17.0

  1. Write a correct yml file.
  2. The extension will update the preview correctly.
  3. Now make a syntax error in one or more lines
  4. The extension will keep showing the last preview , as there are no errors there. which is confusing.
  5. Close the preview and reopen it.
  6. the extension will not be able to show a preview.

I think it is better to either :

  1. let the parser ignore the incorrect syntax parts and mark them on the preview as big red rectangles with an error.
  2. just hide the preview or mark it all as incorrect, instead of leaving the last correct preview ( check number 4 above )
@malidiab malidiab changed the title Swagger UI Preview doesn't refresh Swagger UI preview doesn't update on incorrect syntax May 28, 2023
@ak1394
Copy link
Collaborator

ak1394 commented May 29, 2023

Hi @malidiab and thanks for a feedback!

We'll think about how to handle it best. Showing syntax error message every time is probably not the best idea - imaging that you're editing the document, and every time your document becomes invalid (say, you didn't put a closing quote yet while editing) it would flash an error message.

I agree however, there should be some indication there, perhaps displayed after a timeout...

I'll update this ticket once we decided how to proceed with this.

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