Skip to content
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

Parameter explode handling doesn't handle it being an optional field #26

Closed
TristanSpeakEasy opened this issue Dec 1, 2022 · 3 comments
Assignees

Comments

@TristanSpeakEasy
Copy link
Contributor

At the moment it seems the v3.Parameter's explode field is just a boolean. Meaning if its not set in the OpenAPI document it will default to the boolean's zero value of false. But in the case of query parameters for example, the default value should be true, and because the type is boolean (as opposed to *boolean) I can't tell if it is unset in the document and I should default handling of explode to true.

@daveshanley
Copy link
Member

Good call, will address this in a patch.

@daveshanley daveshanley self-assigned this Dec 1, 2022
@TristanSpeakEasy
Copy link
Contributor Author

Just adding to this the v3.Encoding explode field should be handle the same (as a pointer) as it can default to true as well if style == form and its not provided

daveshanley added a commit that referenced this issue Dec 1, 2022
…onal property using pointer. #26

@TristanSpeakEasy notes: "At the moment it seems the v3.Parameter's explode field is just a boolean. Meaning if its not set in the OpenAPI document it will default to the boolean's zero value of false. But in the case of query parameters for example, the default value should be true, and because the type is boolean (as opposed to *boolean) I can't tell if it is unset in the document and I should default handling of explode to true."

Both `explode` properties have been moved to optional properties using pointers.

Signed-off-by: Dave Shanley <dave@quobix.com>
@daveshanley
Copy link
Member

Fixed in v0.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants