Skip to content

Commit f4d5b09

Browse files
timonbacksam0r040
andauthored
chore(example): Improve nullability docs (#1486)
Co-authored-by: sam0r040 <[email protected]>
1 parent 6a44954 commit f4d5b09

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/dtos/RequiredAndNullablePayloadDto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
1111
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
1212

13-
@Schema(description = "Another payload model")
13+
@Schema(description = "Demonstrate required and nullable. Note, @Schema is only descriptive without nullability check")
1414
@Data
1515
@AllArgsConstructor
1616
@NoArgsConstructor

springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@
13091309
"description": "This field must be present, and value cannot be null"
13101310
}
13111311
},
1312-
"description": "Another payload model",
1312+
"description": "Demonstrate required and nullable. Note, @Schema is only descriptive without nullability check",
13131313
"examples": [
13141314
{
13151315
"enumField": "COMPLEX1",
@@ -1326,7 +1326,7 @@
13261326
],
13271327
"x-json-schema": {
13281328
"$schema": "https://json-schema.org/draft-04/schema#",
1329-
"description": "Another payload model",
1329+
"description": "Demonstrate required and nullable. Note, @Schema is only descriptive without nullability check",
13301330
"properties": {
13311331
"enumField": {
13321332
"description": "Follows OpenAPI 3.1 spec",

springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,8 @@ components:
958958
requiredField:
959959
type: string
960960
description: "This field must be present, and value cannot be null"
961-
description: Another payload model
961+
description: "Demonstrate required and nullable. Note, @Schema is only descriptive\
962+
\ without nullability check"
962963
examples:
963964
- enumField: COMPLEX1
964965
notRequiredField: string
@@ -971,7 +972,8 @@ components:
971972
- requiredField
972973
x-json-schema:
973974
$schema: https://json-schema.org/draft-04/schema#
974-
description: Another payload model
975+
description: "Demonstrate required and nullable. Note, @Schema is only descriptive\
976+
\ without nullability check"
975977
properties:
976978
enumField:
977979
description: Follows OpenAPI 3.1 spec

0 commit comments

Comments
 (0)