From 7089e517bb81cd8a2179bb102a8615f91e5b9729 Mon Sep 17 00:00:00 2001 From: Konstantin Barabanov Date: Sun, 25 Jul 2021 23:35:13 +0300 Subject: [PATCH 1/2] .gitbugtraq support --- .gitbugtraq | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitbugtraq diff --git a/.gitbugtraq b/.gitbugtraq new file mode 100644 index 0000000..91f6a0c --- /dev/null +++ b/.gitbugtraq @@ -0,0 +1,4 @@ +[bugtraq] + url = https://github.com/simplesmiler/taxios/issues/%BUGID% + loglinkregex = "#\\d+" + logregex = \\d+ \ No newline at end of file From 2341d75812c3464486358c0de89d8fd08f079035 Mon Sep 17 00:00:00 2001 From: Konstantin Barabanov Date: Sun, 25 Jul 2021 23:35:45 +0300 Subject: [PATCH 2/2] feat: support octet-stream for request body type (#5) --- packages/taxios-generate/src/bin.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/taxios-generate/src/bin.ts b/packages/taxios-generate/src/bin.ts index 84fafe6..bef4345 100644 --- a/packages/taxios-generate/src/bin.ts +++ b/packages/taxios-generate/src/bin.ts @@ -344,9 +344,13 @@ async function main(): Promise { 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) {