Skip to content

Commit a7401b8

Browse files
authored
Merge pull request #704 from Azquelt/tck-schema-npe
TCK: Don't assume every Media Type has a schema
2 parents 591909d + 6360973 commit a7401b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tck/src/main/java/org/eclipse/microprofile/openapi/filter/AirlinesOASFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public APIResponse filterAPIResponse(APIResponse apiResponse) {
128128
if (content != null) {
129129
if (content.hasMediaType("application/json")) {
130130
Schema schema = content.getMediaType("application/json").getSchema();
131-
if ("child - id of the new review".equals(schema.getDescription())) {
131+
if (schema != null && "child - id of the new review".equals(schema.getDescription())) {
132132
schema.setDescription("parent - id of the new review");
133133
}
134134
}

0 commit comments

Comments
 (0)