You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check additionalProperties for inline models
if (schema.getAdditionalProperties() != null) {
if (schema.getAdditionalProperties() instanceof Schema) {
Schema inner = (Schema) schema.getAdditionalProperties();
if (inner != null) {
String schemaName = resolveModelName(schema.getTitle(), modelPrefix + this.inlineSchemaOptions.get("MAP_ITEM_SUFFIX"));
// Recurse to create $refs for inner models
gatherInlineModels(inner, schemaName);
if (isModelNeeded(inner)) {
// If this schema should be split into its own model, do so
Schema refSchema = this.makeSchemaInComponents(schemaName, inner);
schema.setAdditionalProperties(refSchema);
}
}
}
}
instead of schema.getTitle() inner schema title inner.getTitle() should be used.
openapi-generator version
6.6.0, but bug is still in trunk
Generation Details
spring generator for Java
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered:
vlsergey
changed the title
[BUG] Mistype in InlineModelResolver leads to autogenerated class name instead of speciifed by title
[BUG] Mistype in InlineModelResolver leads to autogenerated class name instead of specified by title
May 5, 2024
Bug Report Checklist
Description
The problem occurs with following input:
I expect number of value class to be
TestValueModel
. Instead it is generated as RootValue.This is happens because of mistype in InlineModelResolver :: gatherInlineModels at line 317:
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
Line 317 in f145b89
instead of
schema.getTitle()
inner schema titleinner.getTitle()
should be used.openapi-generator version
6.6.0, but bug is still in trunk
Generation Details
spring
generator for JavaSteps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: