forked from loafle/openapi-generator-original
better null check for response (#9105)
This commit is contained in:
parent
ab6c6962c2
commit
8d372fa66a
@ -813,6 +813,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
schemas.put(opId, requestSchema);
|
||||
}
|
||||
// process all response bodies
|
||||
if (op.getValue().getResponses() != null) {
|
||||
for (Map.Entry<String, ApiResponse> ar : op.getValue().getResponses().entrySet()) {
|
||||
ApiResponse a = ModelUtils.getReferencedApiResponse(openAPI, ar.getValue());
|
||||
Schema responseSchema = ModelUtils.getSchemaFromResponse(a);
|
||||
@ -823,6 +824,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// also add all properties of all schemas to be checked for oneOf
|
||||
Map<String, Schema> propertySchemas = new HashMap<String, Schema>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user