Class CppBoostBeastModelCodegen.CppBoostBeastOpenAPINormalizer
- java.lang.Object
-
- org.openapitools.codegen.OpenAPINormalizer
-
- org.openapitools.codegen.languages.CppBoostBeastModelCodegen.CppBoostBeastOpenAPINormalizer
-
- Enclosing class:
- CppBoostBeastModelCodegen
public static class CppBoostBeastModelCodegen.CppBoostBeastOpenAPINormalizer extends OpenAPINormalizer
Generator-specific normalizer that preserves composition structure (branch cardinality, null multiplicity, original keyword) for all oneOf/anyOf/anyOf-string-enum schemas. Set-equivalent simplification happens later in the generator's semantic analyzer (processComposedModel), never in the pre-descriptor normalizer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openapitools.codegen.OpenAPINormalizer
OpenAPINormalizer.BaseFilter, OpenAPINormalizer.Filter, OpenAPINormalizer.SecuritySchemesFilter
-
-
Field Summary
-
Fields inherited from class org.openapitools.codegen.OpenAPINormalizer
APPLICATION_OCTET_STREAM, LOGGER, openAPI
-
-
Constructor Summary
Constructors Constructor Description CppBoostBeastOpenAPINormalizer(io.swagger.v3.oas.models.OpenAPI openAPI, Map<String,String> inputRules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.swagger.v3.oas.models.media.SchemaprocessSimplifyAnyOf(io.swagger.v3.oas.models.media.Schema schema)If the schema is anyOf and the sub-schemas is null, set `nullable: true` instead.protected io.swagger.v3.oas.models.media.SchemaprocessSimplifyAnyOfEnum(io.swagger.v3.oas.models.media.Schema schema)If the schema is anyOf and all sub-schemas are enums (with one or more values), then simplify it to a single enum schema containing all the values.protected io.swagger.v3.oas.models.media.SchemaprocessSimplifyAnyOfStringAndEnumString(io.swagger.v3.oas.models.media.Schema schema)If the schema is anyOf and the sub-schemas are either string or enum of string, then simplify it to just enum of string as many generators do not yet support anyOf.protected io.swagger.v3.oas.models.media.SchemaprocessSimplifyOneOf(io.swagger.v3.oas.models.media.Schema schema)If the schema is oneOf and the sub-schemas is null, set `nullable: true` instead.protected io.swagger.v3.oas.models.media.SchemaprocessSimplifyOneOfEnum(io.swagger.v3.oas.models.media.Schema schema)If the schema is oneOf and all sub-schemas are enums (with one or more values), then simplify it to a single enum schema containing all the values.-
Methods inherited from class org.openapitools.codegen.OpenAPINormalizer
createFilter, createNormalizer, createSecuritySchemesFilter, ensureInheritanceForDiscriminatorMapping, ensureInheritanceForDiscriminatorMappings, fixSelfReferenceSchema, getDiscriminatorValue, getRule, isContentMediaType, isSelfReference, isStringTypeOrTypeAbsent, markSchemaAsVisited, normalize, normalizeAllOf, normalizeAllOfWithProperties, normalizeAnyOf, normalizeArraySchema, normalizeBinaryContentSchema31, normalizeBooleanSchema, normalizeComplexComposedSchema, normalizeComponentsHeaders, normalizeComponentsResponses, normalizeComponentsSchemas, normalizeComponentsSecuritySchemes, normalizeContent, normalizeHeaders, normalizeInfo, normalizeIntegerSchema, normalizeMapSchema, normalizeOneOf, normalizeOperation, normalizeParameters, normalizePaths, normalizeProperties, normalizeReferenceSchema, normalizeRequestBody, normalizeResponse, normalizeResponses, normalizeSchema, normalizeSimpleSchema, processAddUnsignedToIntegerWithInvalidMaxValue, processFixDuplicatedOperationId, processKeepOnlyFirstTagInOperation, processNormalize31Spec, processNormalizeOtherThanObjectWithProperties, processRefactorAllOfWithPropertiesOnly, processRemoveAnyOfOneOfAndKeepPropertiesOnly, processRemoveXInternalFromOperation, processReplaceOneOfByMapping, processRules, processSetArraytoNullable, processSetMapToNullable, processSetPrimitiveTypesToNullable, processSetTagsForAllOperations, processSetTagsToOperationId, processSetTagsToVendorExtension, processSimplifyBooleanEnum, processUseAllOfRefAsParent, refactorAllOfWithMetadataOnlySchemas, removeUnsupportedSchemasFromAllOf, setNullable, simplifyComposedSchemaWithEnums, skipNormalization
-
-
-
-
Method Detail
-
processSimplifyAnyOf
protected io.swagger.v3.oas.models.media.Schema processSimplifyAnyOf(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:OpenAPINormalizerIf the schema is anyOf and the sub-schemas is null, set `nullable: true` instead. If there's only one sub-schema, simply return the sub-schema directly.- Overrides:
processSimplifyAnyOfin classOpenAPINormalizer- Parameters:
schema- Schema- Returns:
- Schema
-
processSimplifyOneOf
protected io.swagger.v3.oas.models.media.Schema processSimplifyOneOf(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:OpenAPINormalizerIf the schema is oneOf and the sub-schemas is null, set `nullable: true` instead. If there's only one sub-schema, simply return the sub-schema directly.- Overrides:
processSimplifyOneOfin classOpenAPINormalizer- Parameters:
schema- Schema- Returns:
- Schema
-
processSimplifyAnyOfStringAndEnumString
protected io.swagger.v3.oas.models.media.Schema processSimplifyAnyOfStringAndEnumString(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:OpenAPINormalizerIf the schema is anyOf and the sub-schemas are either string or enum of string, then simplify it to just enum of string as many generators do not yet support anyOf.- Overrides:
processSimplifyAnyOfStringAndEnumStringin classOpenAPINormalizer- Parameters:
schema- Schema- Returns:
- Schema
-
processSimplifyOneOfEnum
protected io.swagger.v3.oas.models.media.Schema processSimplifyOneOfEnum(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:OpenAPINormalizerIf the schema is oneOf and all sub-schemas are enums (with one or more values), then simplify it to a single enum schema containing all the values.- Overrides:
processSimplifyOneOfEnumin classOpenAPINormalizer- Parameters:
schema- Schema- Returns:
- Schema
-
processSimplifyAnyOfEnum
protected io.swagger.v3.oas.models.media.Schema processSimplifyAnyOfEnum(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:OpenAPINormalizerIf the schema is anyOf and all sub-schemas are enums (with one or more values), then simplify it to a single enum schema containing all the values.- Overrides:
processSimplifyAnyOfEnumin classOpenAPINormalizer- Parameters:
schema- Schema- Returns:
- Schema
-
-