-
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
A feature to have READ ONLY value fields on a model shown up in the swagger documentation #854
Comments
To be sure, I assume here that you're using the 1.5.X version of Swagger (we recently released M1 of it), as only Swagger 2.0 has support for a Have you seen #695? I'm not sure it adds support to parsing the Jackson annotations as you use them, but it does offer support using our own |
Yes, we're using swagger-jersey2-jaxrs_2.10 version 1.3.7. |
That's swagger-core 1.3.7 which produces Swagger 1.2 spec files. Unfortunately, there's no support for If it's important to you, you'd have to upgrade to the newer version. |
Ok thanks for the update. It is just I need to check whether our team can upgrade now, or need to wait to upgrade with some other groups within our company. |
No problem. Let us know if you need any assistance with it. The upgrade to 1.5.0-M1 should be as simple as changing the dependency, assuming you have no custom configuration (such as custom converters). Also, remember that as mentioned above, support for |
now the absence of a setter (via |
As a user of swagger, I want to have a feature to have READ ONLY value fields on a model shown up in the swagger documentation.
I.e. We have this field "lastUpdatedDateTime" that is only a READ ONLY field on the model, but we still want this field to show in the swagger specification/ documentation
As recommended when using Jackson 1.9 and higher, to support this READ ONLY field on the model, we use:
which means ONLY ignore on deserialization. (http://jackson.codehaus.org/1.9.9/javadoc/org/codehaus/jackson/annotate/JsonIgnore.html)
So, we want Swagger to parse it for READ ONLY fields to still showing up in the documentation.
The text was updated successfully, but these errors were encountered: