OAI / OAI/OpenAPI-Specification

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

Open
#2,498 5 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

param serialization re-use: traits/merges
Dominant language
Markdown
Stars
31.2k
Forks
9.2k
Avg merge
6h 37m
Merged PRs (30d)
27

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OpenAPI 3.1 rules for Parameter and Header Objects, then compare how sibling summary and description overrides are specified. Determine whether required may be overridden beside $ref and document the resulting specification behavior; done means the rule is unambiguous and consistent with the existing reference-object guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.