Skip to content

v3.2: Should the example field be deprecated (Parameter, Header, and Media Type Objects) #4661

Open
@handrews

Description

@handrews

The Parameter, Header, and Media Type Objects all support both an example field (singular) and an examples field (plural) that uses Example Objects. The example field is equivalent to the value field in an Example Object.

Due to PR #4647 introducing new Example Object fields with more well-defined behavior, we are considering deprecateding value and externalValue in favor of the new fields (see Issue #4660).

Should we also deprecate example? It pretty much exists as a more convenient alternative to value for people who don't want to name their examples.

Alternatives and variations:

  • @mikekistler is in favor of keeping it
  • @karenetheridge suggested just discouraging its use rather than formally deprecating it
  • @handrews notes that the empty string is a valid JSON/YAML key and could be a good convention for people who just want one unnamed example. Such an unnamed example could also be a signal to tools that if they only show one, show the unnamed one. (However, writing of himself in the third person, @handrews suspects most people will find this too cryptic and weird)

Metadata

Metadata

Assignees

No one assigned

    Labels

    example obj/keywordsIssues with the Example Object or exampel(s) keywords

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions