ApiModelProperty different behavior readOnly and AccessMode.READ_ONLY
See original GitHub issueApiModelProperty.readOnly mark Deprecated with link to accessMode but it have different behavior.
if I mark
@ApiModelProperty(value = "some description", readOnly = true) private ZonedDateTime created;
I got on /v2/api-docs
"created":{"type":"string","format":"date-time","description":"some description","readOnly":true}
Whenever I mark
@ApiModelProperty(value = "some description", accessMode = AccessMode.READ_ONLY) private ZonedDateTime created;
I got on /v2/api-docs
"created":{"type":"string","format":"date-time","description":"some description"}
No chance to avoid usage deprecated field and got readonly flag in result schema description. Is it bug of accessMode or readonly miss mark Deprecated? version 2.9.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Swagger ApiModelProperty access - java - Stack Overflow
Allows a model property to be designated as read only. It will hide property from request and shows for a response only. @ApiModelProperty(readOnly...
Read more >Clash when required=false and readOnly=true in ...
@ApiModelProperty(value = "End timestamp of the resource", readOnly = true) ... Read-only and “required" are different, please take a look at the javadocs ......
Read more >Guide - 7.10.12.2 Migrating to OpenApi 3.0 and Swagger 2.X ...
Only if the decorated getter is an array type. @APIModelProperty(readOnly = true), @Schema(accessMode=AccessMode.READ_ONLY) ...
Read more >ApiModelProperty (swagger-annotations 1.6.9 API)
readOnly. @Deprecated public abstract boolean readOnly. Deprecated. As of 1.5.19, replaced by accessMode(). Allows a model property to be designated as read ......
Read more >Using Transactions for Read-Only Operations - Baeldung
Another important point when dealing with a transaction with multiple statements is to consider the behavior determined by the isolation level, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
any news on this?
This will be addressed in the next patch along with moving to swagger-core 1.6.x