Open
Description
Q&A (please complete the following information)
- OS: [e.g. macOS] Windows
- Browser: [e.g. chrome, safari] Firefox
- Version: [e.g. 22] 90.0
- Method of installation: [e.g. npm, dist assets] app.swaggerhub.com
- Swagger-UI version: [e.g. 3.10.0] don't see
- Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] OpenAPI 3.0.3
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.3
info:
title: Parameters example
version: 1.0.0
servers:
- url: 'https://127.0.0.1/api/rest'
paths:
'/foo/{bar}':
post:
parameters:
- name: bar
in: header
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
responses:
'200':
description: Example
content:
application/json:
schema:
type: string
delete:
responses:
'200':
description: OK
parameters:
- required: true
name: bar
in: path
schema:
type: string
Swagger-UI configuration options:
SwaggerUI({
// your config options here
})
?yourQueryStringConfig
Describe the bug you're encountering
Specification says A unique parameter is defined by a combination of a name and location.
I defined bar
parameter in path location at PathItem
and I defined parameter with same name bar
, in header location at Operation
.
To reproduce...
Steps to reproduce the behavior:
- Go to app.swaggerhub.com.
- Register and create new API.
- Paste OpenAPI yaml from the example (above).
- See error in POST method: One parameter
bar
in header location displayed. Nobar
in path location parameter.
Expected behavior
Expected two parameters in POST method: bar
in path location and foo
in header location.
Screenshots
Additional context or thoughts
Related question in OpenAPI-Specification
repo.