philosowaffle / vs-openapi-designer

OpenApi Designer Extension for VS Code
https://marketplace.visualstudio.com/items?itemName=philosowaffle.openapi-designer
GNU General Public License v3.0
15 stars 2 forks source link

Keeps re-opening the 1st OpenAPI document ... #36

Open CharlieReitzel opened 5 years ago

CharlieReitzel commented 5 years ago

Looks like a stuck cache ... I open one document, make some changes, vs-openapi-designer correctly updates preview pane. So far, so good.

I close the preview pane and open another Open API document, Choose the OpenApi Designer: Preview command and it opens the preview pane, but previews the 1st document.

Looking at the VS Code debug console, I see 1 problem, which is a schema error in the new document. Seems like the preview pane should be displaying this error, rather than the old page.

CharlieReitzel commented 5 years ago

Note: The nature of the 1st error was that I had a colon in a header description. Deleting the colon cleared the error and allowed vs-openapi-designer to correctly display the next error in the preview pane (I was missing a fragment character, #, in a reference). Note, that error message did not give the line number in the Open API source file where the error occurred. Nor did it emit an error log entry.

So perhaps the gist of this issue is that error reporting is inconsistent and does not always give helpful pointers back to the source location of the error.

But, overall, it's working well for me. Thanks

uschuster commented 4 years ago

I have experienced that behavior as well - even if the document has no errors most of the time the first document is shown. What seems to help is to introduce an error and reopen the preview to show the preview of the current document. When closing and reopening the preview again it often again shows the first document even if this document is not open. The best way for me is to close VSCode and reopen it in order to have a look at another document preview.

iwb-rubentytgat commented 4 years ago

Same issue here.

ChristoNel commented 4 years ago

I am also experiencing the same issue. I need to completely close VSCode and re-open it again to see a different preview.