Skip to content

Documentation for OpenAPI's Header Object should be verbose #1965

Closed

Description

@shockey

Context: I'm implementing support for examples in an OpenAPI tool.

I have a pretty good working knowledge of the Specification, but to make sure I didn't miss anything, I Cmd+F'd the 3.0.2 document for examples. and took note of which objects mention it. I missed Header Object in my list, because it only mentions that it derives itself from the Parameter Object, lacking a full documentation block that enumerates the keys that it supports.

I only noticed this because I was looking up Header Object specifically, for an unrelated task.

Activity

  1. added
    clarificationrequests to clarify, but not change, part of the spec
    on Jan 28, 2024
  2. handrews commented on May 24, 2024

    @handrews
    Member

    Probably a better way to solve this problem would be by looking at the schema (although it is currently in need of some help, or at least our schema publishing process is). But that's a place for explicit enumeration, while the spec is more for human readability.

  3. handrews commented on May 27, 2024

    @handrews
    Member

    @OAI/tsc review request: do we want to repeat things in the Header Object section or leave it as-is?

  4. added this to the v3.0.4 milestone on May 27, 2024
  5. ralfhandl commented on May 28, 2024

    @ralfhandl
    Contributor

    Let's spell out explicitly which fixed fields a Header Object has, instead of requiring every reader to do the mental excercise:

    The Header Object follows the structure of the Parameter Object with the following changes:

    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. in MUST NOT be specified, it is implicitly in header.
    3. All traits that are affected by the location MUST be applicable to a location of header (for example, style).

    This already rules out half of the fixed fields of a parameter object, as our favorite allowEmptyValue already states that it only applies to query parameters 😄.

    In recent Moonwalk discussions we figured out that headers and parameters are quite different beasts shaped by different boundary conditions, and these significant differences confirm our finding.

  6. darrelmiller commented on May 30, 2024

    @darrelmiller
    Member

    TDC decision to add a fixed fields table to make it clear which fields a header object has. Also valuable to call out where header fields are different than parameter fields.

  7. self-assigned this
    on May 30, 2024
  8. handrews commented on Jun 21, 2024

    @handrews
    Member

    PR merged for 3.0.4 and ported to 3.1.1 via PR #3921!

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

Metadata

Metadata

Assignees

Labels

clarificationrequests to clarify, but not change, part of the speceditorialWording and stylistic issues

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions