Manweill / swagger-axios-codegen

swagger client to use axios and typescript
MIT License
306 stars 83 forks source link

Problems with multipart/form-data request generations #93

Closed klimentru1986 closed 4 years ago

klimentru1986 commented 4 years ago

I need to generate api with a multipart/form-data, but is's not work.

I found a problem.

The type in the old version swagger 2.0 was in a consumes section.

The type in the current version is placed in a content section.

You check only consumes section in you library. And the api with the multipart/form-data type isn't generated.

https://github.com/Manweill/swagger-axios-codegen/blob/v0.3/src/requestCodegen/index.ts#L25

Please fix it.

Manweill commented 4 years ago

@klimentru1986 Welcome to PR.

klimentru1986 commented 4 years ago

@klimentru1986 Welcome to PR.

Done. #94