I want swagger-codegen to generate a function Foo with two parameters of the same type. For example Foo(User first, User second).
For this to work, both "first" and "second" have the same $ref pointing to User.
However, in this case I can not have the redoc use two distinct description fields and I get that both "first" and "second" has the same description - the one pointed to by $ref.
What can I do to have something that generated code with the same classes as in the example of Foo but also allows for two different descriptions to be used ?
To add description to a $ref, you can wrap the $ref into allOf:
first: description: The first user allOf: - $ref: '#/definitions/User'
The description does work, however now the redoc does not recognize that the type of the first user is User and it is shown as type "object".
The swagger-codegen generates a Request class with no users as oppesed to the attempt in the post
It's a tooling bug then. You can submit bug reports in the GitHub repositores of those projects:
Swagger Codegen: https://github.com/swagger-api/swagger-codegen/issues