Skip to content

Parameter style definitions inconsistent with the examples #1945

Closed
@vvanpo

Description

@vvanpo

The style values table has a type column which I assume indicates which data types can be serialized using that style (e.g. a deepObject style on a query parameter for any data type other than object would constitute an invalid spec), in the same way that I assume the in column determines which locations each style is valid in.

But this is not consistent with the examples, and further brings up some curiosities:

  • The simple parameter style only supports arrays, yet it is the default style for path parameters and the only style for header parameters.
    • Is this supposed to mean header parameters are only ever allowed to be arrays? No primitives can ever be passed to a header parameter?
    • There is an example path parameter object that uses the default style—simple—that contradicts this by defining a schema with data type string.
  • In the style examples table pipeDelimited and spaceDelimited both offer examples of serialized objects, not just arrays, and the simple style has examples of an object as well as a string primitive.

These contradictions imply that my initial assumption about the type column in the style values table is incorrect. But there is no explanation about what it is supposed to indicate, then.

Metadata

Metadata

Assignees

Labels

examplesrequests for more or better examples in the specificationparam serializationIssues related to parameter and/or header serialization

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions