Skip to content

Need for parameter-overloading #1232

@ppKrauss

Description

@ppKrauss

How to do parameter-overloading with OpenAPI?

With the main API Gateway tools, like Apache and NGINX, it is natural using regular expressions.

... Perhaps it is a suggestion to the OpenAPI v3.1...

Example

The declarations say that A and B are distinct var-names with distinct datatypes... But tuday (v2.0) it triggs a "Semantic error: Equivalent paths are not allowed".

  /{A}/xxx:
    get:
      tags:
      - etc.
      summary: etc.
      operationId: op1
      description: etc.
      produces:
      - application/json
      parameters:
      - in: path
        name: A
        description: etc. 
        required: true
        type: integer
        format: int32
        minimum: 1
        maximum: 9999999

  /{B}/xxx:
    get:
      tags:
      - etc.
      summary: etc.
      operationId: op2
      description: etc.
      produces:
      - application/json
      parameters:
      - in: path
        name: B
        description: etc. 
        required: true
        type: string
        pattern: ^[a-z]+$

Metadata

Metadata

Assignees

No one assigned

    Labels

    Moved to MoonwalkIssues that can be closed or migrated as being addressed in Moonwalk

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions