-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Style Values and Style Examples for consistency #3682
Comments
Please refer to the 3.1.1 specification in the v3.1.1-dev branch, as there have already been some corrections to this area of the specification. It does appear that the table is incorrect for |
Why does it make sense to allow primitives for spaceDelimited and pipeDelimited? The description for these two styles is specific to arrays.
|
I'm coming at it from the perspective of a request/response validation author, where we're taking data in a request or response and deserializing it into a data structure. From this angle, allowing more types means fewer places where the validation would error out because of the wrong type being specified in the schema, but indeed it doesn't add any value to allow it (the application might as well accept an array with a single value). |
Update: we discussed this PR at the TSC meeting today (#3672) and decided:
Therefore -- @charjr: could you possibly revert the changes to spaceDelimited and pipeDelimited in your PRs? I think then we should be able to review and merge them quickly (e.g. before or by the next TSC meeting). thanks! |
@karenetheridge I've updated each PR to remove the Hopefully it's ready to go, if not let me know. |
looks great, thank you! |
I've added comments/suggestions to all 3 PRs following the discussion at the meeting today. |
@karenetheridge updated, let me know if it needs any further changes. |
All of these PRs were merged so I'm assuming this is resolved. Closing. |
What I Thought I Understood
Looking at Style Values what I grasp is this:
array
object
primitive
,array
orobject
style
type
in
primitive
,array
,object
path
primitive
,array
,object
path
primitive
,array
,object
query
,cookie
collectionFormat
with acsv
(whenexplode
is false) ormulti
(whenexplode
is true) value from OpenAPI 2.0.array
path
,header
collectionFormat
with acsv
value from OpenAPI 2.0.array
query
collectionFormat
equal tossv
from OpenAPI 2.0.array
query
collectionFormat
equal topipes
from OpenAPI 2.0.object
query
What I Expect
What I expect to see when I look at Style Examples is this:
style
explode
empty
string
array
object
What I See
What I actually find on Style Examples is this:
primitive
,array
orobject
(which conflicts with what I read earlier)array
orobject
(which conflicts with what I read earlier)object
primitive
,array
orobject
style
explode
empty
string
array
object
What I Think Needs Correcting
Please correct me if I'm wrong, but my expectation is this:
style
type
in
primitive
,array
,object
path
primitive
,array
,object
path
primitive
,array
,object
query
,cookie
collectionFormat
with acsv
(whenexplode
is false) ormulti
(whenexplode
is true) value from OpenAPI 2.0.primitive
,array
,object
path
,header
collectionFormat
with acsv
value from OpenAPI 2.0.array
,object
query
collectionFormat
equal tossv
from OpenAPI 2.0.array
,object
query
collectionFormat
equal topipes
from OpenAPI 2.0.object
query
If this is the case, please let me know and I will make a PR to close it.
The text was updated successfully, but these errors were encountered: