You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the recent changes of getkin/kin-openapi#911, I was wondering if you'd be willing to support the same functionality, i.e. nested objects with arrays of primitives (for deepObjectexplode: true params). Arrays of objects are purposedly not supported
runtime currently parses nested objects with a primitive properly, e.g. ?nested[obj][nestedObj]=string
but it fails on a nested array (either ignoring an element when given one, or erroring out: https://github.com/oapi-codegen/runtime/blob/main/deepobject.go#L137).
It also errors out when the nested array field has a sibling field: Invalid format for parameter nested: error assigning value to destination: error assigning field [obj]: field [authors] is not present in destination object
As far as I've seen, it would also need changes to marshalDeepObject, since it adds array subscripts that would interfere with nested object keys, e.g. it marshals p[onas][Names][0]=Bill&p[onas][Names][1]=Frank instead of just p[onas][Names]=Bill&p[onas][Names]=Frank.
Probably missing other stuff. Please let me know if you have some thoughts on this. Some examples:
Due to the recent changes of getkin/kin-openapi#911, I was wondering if you'd be willing to support the same functionality, i.e. nested objects with arrays of primitives (for
deepObject
explode: true
params). Arrays of objects are purposedly not supportedruntime
currently parses nested objects with a primitive properly, e.g.?nested[obj][nestedObj]=string
but it fails on a nested array (either ignoring an element when given one, or erroring out: https://github.com/oapi-codegen/runtime/blob/main/deepobject.go#L137).
It also errors out when the nested array field has a sibling field:
Invalid format for parameter nested: error assigning value to destination: error assigning field [obj]: field [authors] is not present in destination object
As far as I've seen, it would also need changes to
marshalDeepObject
, since it adds array subscripts that would interfere with nested object keys, e.g. it marshalsp[onas][Names][0]=Bill&p[onas][Names][1]=Frank
instead of justp[onas][Names]=Bill&p[onas][Names]=Frank
.Probably missing other stuff. Please let me know if you have some thoughts on this. Some examples:
The text was updated successfully, but these errors were encountered: