Skip to content

Commit

Permalink
reproduce: springwolfGH-723 enum serialization
Browse files Browse the repository at this point in the history
removed example in annotation
  • Loading branch information
timonback committed Nov 18, 2024
1 parent f05b0b2 commit da95cab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public class ExamplePayloadDto {
@Schema(description = "Some long field", example = "5", minimum = "0")
private long someLong;

@Schema(description = "Some enum field", example = "FOO2", requiredMode = REQUIRED)
@Schema(description = "Some enum field", requiredMode = REQUIRED)
private ExampleEnum someEnum;

@Schema(enumAsRef = true, example = "OK")
@Schema(enumAsRef = true)
@Getter
@RequiredArgsConstructor
@ToString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@
"INTERNAL_SERVER_ERROR"
],
"examples": [
"OK"
"\"OK\""
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ components:
- NOT_FOUND
- INTERNAL_SERVER_ERROR
examples:
- OK
- '"OK"'
x-json-schema:
$schema: https://json-schema.org/draft-04/schema#
description: Some enum field
Expand Down

0 comments on commit da95cab

Please sign in to comment.