Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitbugtraq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[bugtraq]
url = https://github.com/simplesmiler/taxios/issues/%BUGID%
loglinkregex = "#\\d+"
logregex = \\d+
4 changes: 4 additions & 0 deletions packages/taxios-generate/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,13 @@ async function main(): Promise<number> {
requestBody.content['application/x-www-form-urlencoded'],
);
const jsonMediaType = maybe(requestBody.content['application/json']);
const blobMediaType = maybe(requestBody.content['application/octet-stream']);
if (formDataMediaType) {
// @NOTE: Form data currently can not be typed further, so we ignore everything else
operationProperties.push({ name: 'body', type: 'FormData', hasQuestionToken: !required });
} else if (blobMediaType) {
// @NOTE: Blob currently can not be typed further, so we ignore everything else
operationProperties.push({ name: 'body', type: 'Blob', hasQuestionToken: !required });
} else if (jsonMediaType) {
const schema = jsonMediaType.schema;
if (!schema) {
Expand Down