(v2) Fix build of OpenAPI Console UI URL if servers/url is empty or "/" #2096
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2093
Changes proposed in this pull request:
Use "/" if the escaped app base path is the empty string, to adjust for
new behavior of Flask and/or Werkzeug, which raises this error if the
swagger.yaml file has no servers/url entry or servers/url with value "/":
Add new test case to check blueprint and url prefix of open API specification
with servers/url value "/"
Add new test case to confirm Swagger UI is returned when the specification
(either OpenAPI or Swagger) has a trivial base path