Conversation
| `Could not parse '${allMediaTypes}', because it is not supported. Generation will continue with 'any'. This might lead to errors at runtime.` | ||
| ); | ||
| return { type: 'any' }; | ||
| return { schema: { type: 'any' }, mediaType: 'application/json ' }; |
Member
There was a problem hiding this comment.
Suggested change
| return { schema: { type: 'any' }, mediaType: 'application/json ' }; | |
| return { schema: { type: 'any' }, mediaType: 'application/json' }; |
Comment on lines
+192
to
+197
| const formData = new FormData(); | ||
| for (const key in body) { | ||
| // TODO: is it enough to just append the body[key] or does it need to be stringified? | ||
| formData.append(key, body[key]); | ||
| } | ||
| return formData; |
Member
There was a problem hiding this comment.
The parquet API requires filenames (formData.append(key, body[key], 'name.parquet');). One way to avoid this issue would be to use File (which supports filenames).
We also need to consider using the form-data package which has wide support for streaming input data.
| const schema = mediaType?.schema; | ||
| if (schema) { | ||
| return parseSchema(schema, refs, options); | ||
|
|
Member
There was a problem hiding this comment.
IIRC the spec has some rules for inferring the media type, otherwise we should perhaps keep the media type optional (also to avoid breaking changes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the capability to use formdata in the openapi requestbuilder.