Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not creating response schema, when content type is application/octet-stream #72

Closed
codercengiz opened this issue Feb 20, 2022 · 1 comment · Fixed by #73
Closed

Not creating response schema, when content type is application/octet-stream #72

codercengiz opened this issue Feb 20, 2022 · 1 comment · Fixed by #73
Assignees

Comments

@codercengiz
Copy link

codercengiz commented Feb 20, 2022

When the content type is application/octet-stream, no schema is created for the response, but it is created for the request. In this case, if there is no schema, openapi-generator typescript-fetch throws an error after version 5.3.1.
like this: Undefined property/schema for 'SchemaFor200ResponseBodyApplicationOctetStream'

for request it creates :

"requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "uint8",
                }
              }
            }
          } 

But for response it creates any schema:

"responses": {
          "200": {
            "content": {
              "application/octet-stream": {}
            }
          },
@codercengiz codercengiz mentioned this issue Feb 20, 2022
@ralpha ralpha self-assigned this Feb 21, 2022
ralpha added a commit that referenced this issue Feb 21, 2022
@ralpha
Copy link
Collaborator

ralpha commented Feb 21, 2022

This indeed was a bug and fixed it in some other places too.
Thanks for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants