Class 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.
    • Constructor Detail

      • CppBoostBeastOpenAPINormalizer

        public CppBoostBeastOpenAPINormalizer​(io.swagger.v3.oas.models.OpenAPI openAPI,
                                              Map<String,​String> inputRules)
    • Method Detail

      • processSimplifyAnyOf

        protected io.swagger.v3.oas.models.media.Schema processSimplifyAnyOf​(io.swagger.v3.oas.models.media.Schema schema)
        Description copied from class: OpenAPINormalizer
        If 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:
        processSimplifyAnyOf in class OpenAPINormalizer
        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: OpenAPINormalizer
        If 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:
        processSimplifyOneOf in class OpenAPINormalizer
        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: OpenAPINormalizer
        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.
        Overrides:
        processSimplifyAnyOfStringAndEnumString in class OpenAPINormalizer
        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: OpenAPINormalizer
        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.
        Overrides:
        processSimplifyOneOfEnum in class OpenAPINormalizer
        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: OpenAPINormalizer
        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.
        Overrides:
        processSimplifyAnyOfEnum in class OpenAPINormalizer
        Parameters:
        schema - Schema
        Returns:
        Schema