question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ApiModelProperty different behavior readOnly and AccessMode.READ_ONLY

See original GitHub issue

ApiModelProperty.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:open
  • Created 5 years ago
  • Reactions:12
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ckotharicommented, Apr 15, 2020

any news on this?

1reaction
dilipkrishcommented, Jul 13, 2020

This will be addressed in the next patch along with moving to swagger-core 1.6.x

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found