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

Cannot use the /docs to verify API #10121

Open
tracyliang77 opened this issue Mar 22, 2020 · 0 comments
Open

Cannot use the /docs to verify API #10121

tracyliang77 opened this issue Mar 22, 2020 · 0 comments

Comments

@tracyliang77
Copy link

#9786 ### Description

I am starting to use the swagger-codegen. I build and try to run the PetStore nodejs server sample.
The server is started correctly at HTTP://localhost:8080/. Anyway when I try to verify APi, there are two issues:

  1. On HTTP://localhost:8080/docs, choose one API, eg, /pet/1/uploadImage, it actually cannot specify anything for body. Similar to other API, you cannot specify the body also.
  2. When the requestBody is "multipart/form-data", even though I try to use other API testing tool(Eg, postman) to specify the body of API /pet/1/uploadImage, only "additionalMetadata" get all body input, while "file" and "petId" is empty for the controller method. Should the controller only has one parameter for whole body?
Swagger-codegen version

I am using latest code of branch 3.0.0.

Swagger declaration file content or url

I did not make a line of code change for the testing.

Command line used for generation
Steps to reproduce
  1. git clone -b 3.0.0 https://github.com/swagger-api/swagger-codegen
  2. cd swagger-codegen/samples/server/petstore/nodejs
  3. npm install
  4. npm start
  5. HTTP://localhost:8080/docs
  6. go to /pet/{id}/uploadImage API and cannot find way to specify body parameters.
  7. use postman to specify body parameters for same API, but controller does not accept multi body parameters.
Related issues/PRs
Suggest a fix/enhancement
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

No branches or pull requests

1 participant