Closed ursm closed 5 months ago
Hey, @ursm, thanks for the issue!
Skooma comes with only application/json
parser out of the box, to parse multipart/form-data
(or xml, etc) we need to register a new parser. You can find an example multipart/form-data
parser in this comment: https://github.com/skryukov/skooma/issues/16#issuecomment-2044271205 The bad news is that I tried it on ddbj/api and test failed 😅
Hey, @skryukov, thanks for the reply.
I see, I understand it well. I was able to make skooma recognize the parsed body with the code you gave me. I think the rest of the errors are a problem with my schema, so I will try and work on it. Thanks again for letting me know and for trying to run the test!
Hello,
I recently updated skooma to 0.3.1 (0.3.0 did the same) and now my tests that POST in multipart/form-data are failing.
The schema uses a property called db as discriminator, but skooma does not seem to have access to it. https://github.com/ddbj/ddbj-repository/blob/ac23cbb67979c946024a4d2448b1342f465d6c59/schema/openapi.yml#L1378
In this situation, I checked the
__getobj__
of JSONSkooma::JSONNode and it contains the multipart/form-data body as a string before parsing.If you can tell me if I am missing something, I would appreciate it. Thanks.
EDIT:
I tried specifying the Content-Type as follows, but there was no change.