You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error appears at the top of the Swagger UI page:
Errors
Resolver error at paths./endpoint.get.responses.422.content.application/json.schema.$ref
Could not resolve reference: Could not resolve pointer: /components/responses/SomeResponse/content/application~1json/schema/allOf/0 does not exist in document
Also, the schema is not loaded and the path of the reference is displayed instead.
To reproduce...
Steps to reproduce the behavior:
Save the above OpenAPI yaml as openapi.yaml.
Start Swagger UI with the following command:
docker run -v <PATH_TO_LOCAL_OPENAPI_YAML>:/openapi.yaml -e SWAGGER_JSON=/openapi.yaml -p 8002:8080 --rm swaggerapi/swagger-ui:v5.18.2
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options: Docker image default
Describe the bug you're encountering
The following error appears at the top of the Swagger UI page:
Also, the schema is not loaded and the path of the reference is displayed instead.
To reproduce...
Steps to reproduce the behavior:
Save the above OpenAPI yaml as
openapi.yaml
.Start Swagger UI with the following command:
docker run -v <PATH_TO_LOCAL_OPENAPI_YAML>:/openapi.yaml -e SWAGGER_JSON=/openapi.yaml -p 8002:8080 --rm swaggerapi/swagger-ui:v5.18.2
Access http://localhost:8002 in your browser.
Open the endpoint definitions
POST /endpoint
->GET /endpoint
.See error
Expected behavior
No errors occur and the schema loads.
Screenshots
N/A
Additional context or thoughts
If I change the order of opening the endpoint definitions to
GET /endpoint
->POST /endpoint
, the error does not occur.This issue seems to depend on the order of operations in the UI.
This issue also occurred on https://editor.swagger.io/.
The text was updated successfully, but these errors were encountered: