Skip to content

Should style: form examples include ? prefix? If so, what about spaceDelimited, pipeDelimited, and deepObject? #3849

@handrews

Description

@handrews

The examples for the simple, label, and matrix styles exactly match the corresponding RFC6570 output, including the initial ; for matrix or . for label.

RFC6570 form expansion includes the ? initial character, for the same reasons as the initial ; and . for matrix and label. In PR #3818 I note that that has implications for how multiple form parameters are translated to a form that could be assed to an RFC6570 implementation.

But the example table for form does not show the ? character, which seems incorrect to me. In issue #1945 (comment), @darrelmiller notes:

The examples were created primarily around what would a URI Template library do with the values. The examples should be consistent with the style constraints

This implies to me that the ? should be present. However that also raises some questions:

  1. Would example/examples in each Parameter Object each have the ? prefix, even though in a full query string only one of them will be next to it? Note that this does not mean that the others would use RFC6570's & operator, which I explained in more detail in PR Appendix on RFC6570-derived behavior + allowReserved (3.0.4) #3818
  2. How does that fit with having to manually work around RFC6570's lack of support for form: style, allowReserved: true? (See also Appendix on RFC6570-derived behavior + allowReserved (3.0.4) #3818 (comment))
  3. spaceDelimited and pipeDelimited are like style: form, explode: false, but with , replaced by space or |, so should their examples also show the ?
  4. likewise, deepObject is like style: form, explode: true but with more complex names, so should it also show the ?

Metadata

Metadata

Assignees

Labels

clarificationrequests to clarify, but not change, part of the specparam 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