swagger-ui
swagger-ui copied to clipboard
Path as reference with parameters are ignored
Q&A
- OS: Windows 10 with WSL Ubuntu, also tried in Ubuntu as VM
- Browser: Chrome/ Firefox/ Edge
- Version: 88.0.4324.150/ 85.0.1 /85.0.564.67
- Method of installation: docker-container
- Swagger-UI version: 3.41.1,gitRevision: ge538e26
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition: Main File:
...
/users/{userId}:
$ref: ./paths/Usermanagment/usersUserId.yaml
...
included File via ref
parameters:
- in: path
name: userId
schema:
$ref: './components/schemas.yaml#/userId'
required: true
description: Unique numeric ID of the user to get
example: userid12
get:
tags:
- User Management
...
Swagger-UI configuration options: No options are used, just the plain container is started with
docker run -p 80:8080 -e SWAGGER_JSON=/tmp/swagger.yaml -v $(pwd):/tmp swaggerapi/swagger-ui
Describe the bug you're encountering
If a path object is referenced the common parameters of the path are not displayed in the swagger-ui.
To reproduce...
Steps to reproduce the behavior:
- create a main file.
- Reference a path object (see above), which has common parameters for the path
- See the error in the swagger-ui. The parameter is not shown...
Expected behavior
The parameter is shown.
Screenshots

Additional context or thoughts
- I also tested this with redoc. He shows the parameter correctly.
- Also if I resolve all references in the main file via a cli tool (speccy) and create one file the parameters are shown correctly again.
any progress on this issue?
I have the same issue whether the path ref exists in the same file or not. Any updates?