v3.3: parameter style amendments#5080
Merged
handrews merged 5 commits intoOAI:v3.3-devfrom Oct 30, 2025
Merged
Conversation
RFC6570 section 3.2.1 says: "A variable that is undefined (Section 2.3) has no value and is ignored by the expansion process. If all of the variables in an expression are undefined, then the expression's expansion is the empty string." ..therefore the provided examples for the "matrix" and "label" styles are incorrect -- the full expansion is the empty string, with no leader/prefix.
handrews
reviewed
Oct 28, 2025
Expansions using "style": "simple", "explode": true do not include the parameter name in the expansion.
8ef7aab to
bd97d2e
Compare
Member
Author
|
edits pushed, as discussed. |
miqui
approved these changes
Oct 30, 2025
ralfhandl
approved these changes
Oct 30, 2025
handrews
approved these changes
Oct 30, 2025
This was referenced Oct 30, 2025
karenetheridge
added a commit
to karenetheridge/OpenAPI-Modern
that referenced
this pull request
Jan 26, 2026
… and RFC6570 - simple, matrix and label styles fully supported - parsing as arrays and objects now supported via hints from the schema "type" keyword Some previously-todo test cases have been corrected to match the examples in the spec at https://spec.openapis.org/oas/v3.2.0#parameter-object. In addition, some corrections to the OAS regarding null values have been made, given inconsistencies with RFC6570; see OAI/OpenAPI-Specification#5080 RFC6570 3.2.2 (style=simple): For each defined variable in the variable-list, perform variable expansion, as defined in Section 3.2.1, with the allowed characters being those in the unreserved set. If more than one variable has a defined value, append a comma (",") to the result string as a separator between variable expansions. RFC6570 3.2.5 (style=label): For each defined variable in the variable-list, append "." to the result string and then perform variable expansion, as defined in Section 3.2.1, with the allowed characters being those in the unreserved set. RFC6570 3.2.7 (style=matrix): For each defined variable in the variable-list: o append ";" to the result string; o if the variable has a simple string value or no explode modifier is given, then: * append the variable name (encoded as if it were a literal string) to the result string; * if the variable's value is not empty, append "=" to the result string; o perform variable expansion, as defined in Section 3.2.1, with the allowed characters being those in the unreserved set. RFC6570 3.2.1 (applies to all styles): A variable that is undefined (Section 2.3) has no value and is ignored by the expansion process. If all of the variables in an expression are undefined, then the expression's expansion is the empty string. For a variable that is a list of values, expansion depends on both the expression type and the presence of an explode modifier. If there is no explode modifier, the expansion consists of a comma- separated concatenation of the defined member string values. If there is an explode modifier and the expression type expands named parameters (";", "?", or "&"), then the list is expanded as if it were an associative array in which each member value is paired with the list's varname. Otherwise, the value will be expanded as if it were a list of separate variable values, each value separated by the expression type's associated separator as defined by the table above. For a variable that is an associative array, expansion depends on both the expression type and the presence of an explode modifier. If there is no explode modifier, expansion consists of appending a comma-separated concatenation of each (name, value) pair that has a defined value. If there is an explode modifier, expansion consists of appending each pair that has a defined value as either "name=value" or, if the value is the empty string and the expression type does not indicate form-style parameters (i.e., not a "?" or "&" type), simply "name". Both name and value strings are encoded in the same way as simple string values. A separator string is appended between defined pairs[.]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been working through the parameter templating section and filling in some of the styles that I had not previously implemented, and cross-checking against RFC6570, and I found these issues with the "in: path" styles.
Each commit explains the reasoning for the change.
I made the changes against v3.3-dev, but I think they could probably go back to 3.1 and 3.2 as well?