fix require var logging, don't matchGenerated if allOf skipped (#17746)

This commit is contained in:
Robert Stoll 2024-01-31 14:35:43 +01:00 committed by GitHub
parent 4d3121c32e
commit 2129b15c8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -3753,7 +3753,7 @@ public class DefaultCodegen implements CodegenConfig {
for (String r : required) { for (String r : required) {
if (!properties.containsKey(r)) { if (!properties.containsKey(r)) {
LOGGER.error("Required var %s not in properties", r); LOGGER.error("Required var {} not in properties", r);
} }
} }
return; return;

View File

@ -612,8 +612,8 @@ public class InlineModelResolver {
Schema innerModel = modelFromProperty(openAPI, component, innerModelName); Schema innerModel = modelFromProperty(openAPI, component, innerModelName);
// Recurse to create $refs for inner models // Recurse to create $refs for inner models
gatherInlineModels(innerModel, innerModelName); gatherInlineModels(innerModel, innerModelName);
String existing = matchGenerated(innerModel);
if (!skipAllOfInlineSchemas) { if (!skipAllOfInlineSchemas) {
String existing = matchGenerated(innerModel);
if (existing == null) { if (existing == null) {
innerModelName = addSchemas(innerModelName, innerModel); innerModelName = addSchemas(innerModelName, innerModel);
Schema schema = new Schema().$ref(innerModelName); Schema schema = new Schema().$ref(innerModelName);