-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 substitute a model with "string" #2969
Comments
Assuming from the code you shared, that you're using
usage both in parameter and e.g as property could be implemented as in example below:
which produces the following output:
please close ticket is this solves your issue |
@frantuma thank you, it works (leaving out |
I have a model class that can appear as a
@PathParam
,@QueryParam
or inside complex response and request objects.The class uses custom serialization:
plus a custom
javax.ws.rs.ext.ParamConverterProvider
.The serializer/deserializer converts it from/to a string, meaning that a
userIdentity
can be either an ID or an email. It works.Unfortunately, I can't get swagger-core to generate an API documentation that lists fields/parameters of type UserIdentity as being strings actually.
Instead, I get:
and
Is there a way to get an output like this?
and no model generated for
UserIdentity
?Alternatively a model for
UserIdentity
that makes it clear that it is actually just a string?The text was updated successfully, but these errors were encountered: