swagger-editor
swagger-editor copied to clipboard
SwaggerEditor@next: url prop display persists in UI after definition change
@tim-lai commented on Tue May 10 2022
Steps to reproduce:
- load default SwaggerEditor@next
- File -> Import File, and/or File -> Import Url
- Observe that URL in the Info component of SwaggerUI does not change
Question: if we were to clear the url prop in SwaggerUI upon loading a new definition, can we be sure that it would always be intended behavior?
screenshot:
Note, this issue precedes #3187 , before the editor-persistence
plugin was implemented
Suggestion: wrap SwaggerUI's InfoUrl
and possibly also InfoBasePath
component, to return null. Could also provide an override option for the wrapped component(s) whether or not to return null, which lets users decide.
In legacy SwaggerEditor default, the url
prop is not used in the standalone site, so this does not display.
Alternative step 2 for the repro (just in case):
- Ctrl + A, delete, then either start typing a new spec manually or paste the following:
openapi: 3.0.0
info:
title: test
version: 1.0.0
paths: {}
Subscribing =)
Test for https://editor-next.swagger.io , still not fix yet.
2 years, any process ?