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

Allow required as sibling of $ref (like summary/description) #2498

Open
radicarl opened this issue Mar 10, 2021 · 4 comments
Open

Allow required as sibling of $ref (like summary/description) #2498

radicarl opened this issue Mar 10, 2021 · 4 comments
Labels
re-use: traits/merges Selective or modified re-use

Comments

@radicarl
Copy link

Hello,

it would be great for reusability if I could overwrite the required field of parameter and header objects, like I can overwritesummary and description in OpenAPI 3.1.

paths:
  /my-resource:
    parameters:
      - $ref: '#/components/parameters/Accept'
        required: true
    get:
      # some definition

components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: false
      schema:
        type: string
@MikeRalphson
Copy link
Member

Thanks for this. We deliberately started small with the scope of this feature with the hope of collecting more data points about what properties people would find it useful to override. In this example we would currently have to say you could not override required: true of an in: path parameter with a false value, but otherwise, I can see how this would be useful.

@PixnBits
Copy link

maybe similar to #2089, PR to v3.1 in #2181

@JameelKhan9
Copy link

similar to #2026

@handrews
Copy link
Contributor

handrews commented Nov 7, 2022

Folks interested in this topic will likely be interested in the general referencing discussion that has recently started. Keywords adjacent to $ref outside of JSON Schema make for a very tricky topic.

@handrews handrews added re-use re-use: traits/merges Selective or modified re-use and removed $ref labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re-use: traits/merges Selective or modified re-use
Projects
None yet
Development

No branches or pull requests

5 participants