Closed Liooo closed 1 month ago
this part might have been my misunderstanding, seems like ParseMultipartForm does render format 2.
though ogen generated code uses ParseMultipartForm() from standard http package before its own parsing logic, and seems like this one accepts the format 1. only
The solution may be just about supporting encoding
field and allowing explode: false
.
problem
currently the gen code from the schema below raises invalid length uuid error, when receiving multiple array items
here, there seems to be multiple possible ways to describe array in multipart/form-data as I looked shallowly on the internet (no canonical information like RFC kind), for example:
1. single key comma separated
2. multiple keys
------WebKitFormBoundaryBrahBrah Content-Disposition: form-data; name="ids"
the error above occurs when format 1. is specified, because ogen uses hardcoded
Explode:true
for the array decoding, and then parse comma separated values as a single uuidsolution
set Explode to false for multipart array
others
encoding
field that can be used to specify thestyle
andexplode
of multipart data, which was introduced from OpenAPI3.1 , ideally we might wanna see this field somedayParseMultipartForm()
from standard http package before its own parsing logic, and seems like this one accepts the format 1. only (forformat 2. and 3. only first item is picked and the rest is ignoredthis might not be true), and might need more investigation to thoroughly support things