OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I have a multipart/form-data endpoint which has a picture object with a file field (binary). The problem with this is that the picture objects gets stringified as a JSON object. Is there a work around for this? I'm using openapitools to generate the models and create the services in Angular, and I'm getting an error when I try to generate:
Model FileUploadRequest not generated since it's marked as unused (due to form parameters) and 'skipFormModel' (global property) set to true (default)
yarn openapi-generator generate -i ./swagger.json -g typescript-angular -c -c ./openapitools.config.json
which raise Model FileUploadRequest not generated since it's marked as unused (due to form parameters) and 'skipFormModel' (global property) set to true (default)
Bug Report Checklist
Description
I have a
multipart/form-data
endpoint which has apicture
object with a file field (binary). The problem with this is that the picture objects gets stringified as a JSON object. Is there a work around for this? I'm usingopenapitools
to generate the models and create the services in Angular, and I'm getting an error when I try to generate:Model FileUploadRequest not generated since it's marked as unused (due to form parameters) and 'skipFormModel' (global property) set to true (default)
openapi-generator version
I'm using the openapi-generator 6.2.1
OpenAPI declaration file content or url
This is the schema for the request body:
And this is the schema for the
picture
field.Generation Details
yarn openapi-generator generate -i ./swagger.json -g typescript-angular -c -c ./openapitools.config.json which raise
Model FileUploadRequest not generated since it's marked as unused (due to form parameters) and 'skipFormModel' (global property) set to true (default)
Related issues/PRs
Could not find any.