Skip to content

Commit

Permalink
feat(config schema): add openapi-normalizer generator property (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChamNouki authored Oct 8, 2024
1 parent 36aec42 commit c91d116
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions apps/generator-cli/src/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,68 @@
}
]
},
"openapi-normalizer": {
"description": "OpenAPI Normalizer transforms the input OpenAPI doc/spec (which may not perfectly conform to the specification) to make it workable with OpenAPI Generator.",
"type": "object",
"properties": {
"ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE": {
"description": "when set to true, auto fix integer with maximum value 4294967295 (2^32-1) or long with 18446744073709551615 (2^64-1) by adding x-unsigned to the schema",
"type": "boolean"
},
"FILTER": {
"description": "When set to operationId:addPet|getPetById for example, it will add x-internal:true to operations with operationId not equal to addPet/getPetById (which will have x-internal set to false) so that these operations marked as internal won't be generated",
"type": "string"
},
"KEEP_ONLY_FIRST_TAG_IN_OPERATION": {
"description": "when set to true, only keep the first tag in operation if there are more than one tag defined",
"type": "boolean"
},
"REF_AS_PARENT_IN_ALLOF": {
"description": "when set to true, child schemas in allOf is considered a parent if it's a $ref (instead of inline schema)",
"type": "boolean"
},
"REFACTOR_ALLOF_WITH_PROPERTIES_ONLY": {
"description": "When set to true, refactor schema with allOf and properties in the same level to a schema with allOf only and, the allOf contains a new schema containing the properties in the top level",
"type": "boolean"
},
"REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY": {
"description": "when set to true, oneOf/anyOf schema with only required properies only in a schema with properties will be removed",
"type": "boolean"
},
"REMOVE_X_INTERNAL": {
"description": "Set to true if you want to disable the default behavior of removing/hiding the x-internal in operations and model",
"type": "boolean"
},
"SET_CONTAINER_TO_NULLABLE": {
"description": "When set to array|set|map (or just array) for example, it will set nullable in array, set and map to true",
"type": "string"
},
"SET_PRIMITIVE_TYPES_TO_NULLABLE": {
"description": "When set to string|integer|number|boolean (or just string) for example, it will set the type to nullable (nullable: true)",
"type": "string"
},
"SET_TAGS_FOR_ALL_OPERATIONS": {
"description": "when set to a string value, tags in all operations will reset to the string value provided",
"type": "boolean"
},
"SET_TAGS_TO_OPERATIONID": {
"description": "when set to true, tags in all operations will be set to operationId or \"default\" if operationId is empty",
"type": "boolean"
},
"SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING": {
"description": "when set to true, simplify anyOf schema with string and enum of string to just string",
"type": "boolean"
},
"SIMPLIFY_BOOLEAN_ENUM": {
"description": "when set to true, convert boolean enum to just enum",
"type": "boolean"
},
"SIMPLIFY_ONEOF_ANYOF": {
"description": "when set to true, simplify oneOf/anyOf by 1) removing null (sub-schema) or enum of null (sub-schema) and setting nullable to true instead, and 2) simplifying oneOf/anyOf with a single sub-schema to just the sub-schema itself",
"type": "boolean"
}
}
},
"packageName": {
"type": "string",
"description": "package for generated classes (where supported)"
Expand Down

0 comments on commit c91d116

Please sign in to comment.