Skip to content

Valid OpenAPI parameters with same name but different in are flagged as duplicates #5800

Description

@tetyanagimgina

Swagger Editor appears to flag valid OpenAPI 3.0.1 parameters as duplicates when they share the same name but have different in values.
This appears to be a regression in the hosted editor.
OpenAPI defines parameter uniqueness by the combination of name and in, not by name alone.
Minimal spec:

openapi: 3.0.1
info:
  title: Parameter uniqueness repro
  version: 1.0.0

paths:
  /orders/{orderId}:
    get:
      summary: Repro duplicate parameter validation
      operationId: getOrder
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string

        - name: orderId
          in: header
          required: false
          schema:
            type: string

      responses:
        '200':
          description: OK/

Expected behaviour:
No validation error.
The two parameters are unique because their OpenAPI identity is:

  • orderId + path
  • orderId + header

Actual behaviour:
Error reported: Name must be unique among all parameters

Spec reference:
OpenAPI 3.0.1 Operation Object says:
"A unique parameter is defined by a combination of a name and location."

** Environment **
Tool: editor.swagger.io
Swagger Editor version: current hosted version, observed after 22 May 2026
Browser: <Chrome/Edge/Safari + version>
OS:
OpenAPI version: 3.0.1

Problem caused:
This is problematic for specs where the same business identifier is passed both as a path parameter and as a header parameter. Renaming the header avoids the editor error, but the original spec appears valid per OpenAPI 3.0.1.
Renaming is not an option at this time as it affects existing heavily used API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions