node-red/node-red-nodegen

add support for methods consuming `multipart/form-data`

kastentx opened this issue · 1 comments

currently, POST requests that consume multipart/form-data require additional steps after the node generator 'generation' process to submit payload data in the proper format.

Since these types of requests are common for APIs that accept file uploads, it would be good to have a way to generate this code automatically when defined in the OpenAPI spec.

I agree with your opinion because multipart/form-data is commonly used in uploading both binary data and parameters. As you know, the dependent swagger-js-codegen has a maintenance problem. It will not support multipart/form-data in the future because there are no maintainers in the project. Therefore, to support multipart/form-data, I think that one of the solutions is to add code into forked swagger-js-codegen and publish it using another module name on npmjs. I found that you modified the code on your following repository.
kastentx/swagger-js-codegen@afe0913
If your module works correctly, I welcome your pull request to use your forked swagger-js-codegen module in dependencies.