Skip to content

Bug: Parameters field in the PathItem is ignored #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kamijin-fanta opened this issue Apr 27, 2021 · 4 comments · Fixed by #48
Closed

Bug: Parameters field in the PathItem is ignored #47

kamijin-fanta opened this issue Apr 27, 2021 · 4 comments · Fixed by #48
Assignees
Labels
Type: Bug Something isn't working

Comments

@kamijin-fanta kamijin-fanta added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Apr 27, 2021
@Himenon Himenon added Type: Bug Something isn't working and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Apr 27, 2021
@Himenon Himenon self-assigned this Apr 27, 2021
@Himenon Himenon removed the Type: Bug Something isn't working label Apr 27, 2021
@Himenon
Copy link
Owner

Himenon commented Apr 27, 2021

Before

paths:
  /get/books/{id}:
    parameters:
    - name: id
      in: path
      required: true
      description: Book ID
      schema:
        type: string
        format: uuid
    get:
      operationId: getBookById
      responses:
        200:
          $ref: "#/components/responses/Books"

After

Since parameters is an Operation Object, it seems that it belongs to Paths differently.

paths:
  /get/books/{id}:
    get:
      operationId: getBookById
      parameters: // <----- here
        - name: id
          in: path
          required: true
          description: Book ID
          schema:
            type: string
            format: uuid
      responses:
        200:
          $ref: "#/components/responses/Books"

@Himenon Himenon added the Type: Bug Something isn't working label Apr 27, 2021
@Himenon
Copy link
Owner

Himenon commented Apr 27, 2021

A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object's components/parameters.

Ref: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#operationObject

@Himenon
Copy link
Owner

Himenon commented Apr 27, 2021

#47 (comment) is not wrong, but the implementation just doesn't seem to be faithful.

@Himenon
Copy link
Owner

Himenon commented Apr 27, 2021

fixed: v0.9.4 higher version

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants