swagger-api / swagger-api/swagger-codegen
[JAVA] api Object used in api's body instead of actual type
@gracekarina is already working on this.
Since Apr 22, 2020.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
the api body parameter is of type Object instead of the required type , even though the required type is being generated correctly
Swagger-codegen version
3.0.5 - had this issue since moving to open api from swagger
Swagger declaration file content or url
https://gist.github.com/asafbennatan/313fd8ff8c042f7047a2cdef264b3118
Command line used for generation
java -jar \modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i C:\Users\asaf\IdeaProjects\swagger-downloader\target\openapi.json -l java -o samples\client\petstore\jersey2 --library=jersey2 -DdateLibrary=joda -DhideGenerationTimestamp=true
Steps to reproduce
1.run command above
2. check TenantsApi file , notice the header for the method is:
public Tenant updateTenant(Object body, String authenticationkey) throws ApiException
where it should be:
public Tenant updateTenant(TenantUpdate body, String authenticationkey) throws ApiException
Related issues/PRs
when using typescript generator the issue is the same ( this makes me think the issue is unrelated to specific generator)
generated output:
(will be available for the next 30 days )
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.