Skip to content
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

[BUG] Merging referenced parameter does not work in 3.1.0 #19077

Open
4 of 6 tasks
bug-brain opened this issue Jul 4, 2024 · 0 comments
Open
4 of 6 tasks

[BUG] Merging referenced parameter does not work in 3.1.0 #19077

bug-brain opened this issue Jul 4, 2024 · 0 comments

Comments

@bug-brain
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The parameters of a path item and an operation object do not get merged if the spec version is 3.1.0 and they both contain a referenced parameter.

openapi-generator version

7.7.0

OpenAPI declaration file content or url
openapi: 3.1.0
info:
  title: Open API
  version: 1.0.0
paths:
  /{path}:
    parameters:
      - $ref: "#/components/parameters/path"
    get:
      parameters:
        - $ref: "#/components/parameters/query"
      summary: Returns a list of users.
      responses:
        200:
          description: get something
          content:
            application/json:
              schema: 
                type: string
components:
  parameters:
    path:
      name: path
      in: path
      required: true
      schema:
        type: string
    query:
      name: query
      in: query
      required: false
      schema:
        type: string
Generation Details

I have tried a handful of generators with their default configs and each time the path parameter was missing in the generated output while the query parameter was present. Going back to version 3.0.2, only using one parameters array or inlining the parameters all fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant