@@ -34,6 +34,7 @@ Options
3434 --root-types (optional) Export schemas types at root level
3535 --root-types-no-schema-prefix (optional)
3636 Do not add "Schema" prefix to types at the root level (should only be used with --root-types)
37+ --root-types-keep-casing Keep casing of root types (should only be used with --root-types)
3738 --make-paths-enum Generate ApiPaths enum for all paths
3839` ;
3940
@@ -64,6 +65,10 @@ if (args.includes("--root-types-no-schema-prefix") && !args.includes("--root-typ
6465 // biome-ignore lint/suspicious/noConsole: this is a CLI
6566 console . warn ( "--root-types-no-schema-prefix has no effect without --root-types flag" ) ;
6667}
68+ if ( args . includes ( "--root-types-keep-casing" ) && ! args . includes ( "--root-types" ) ) {
69+ // biome-ignore lint/suspicious/noConsole: this is a CLI
70+ console . warn ( "--root-types-keep-casing has no effect without --root-types flag" ) ;
71+ }
6772
6873const flags = parser ( args , {
6974 boolean : [
@@ -86,6 +91,7 @@ const flags = parser(args, {
8691 "pathParamsAsTypes" ,
8792 "rootTypes" ,
8893 "rootTypesNoSchemaPrefix" ,
94+ "rootTypesKeepCasing" ,
8995 "makePathsEnum" ,
9096 "generatePathParams" ,
9197 ] ,
@@ -150,6 +156,7 @@ async function generateSchema(schema, { redocly, silent = false }) {
150156 pathParamsAsTypes : flags . pathParamsAsTypes ,
151157 rootTypes : flags . rootTypes ,
152158 rootTypesNoSchemaPrefix : flags . rootTypesNoSchemaPrefix ,
159+ rootTypesKeepCasing : flags . rootTypesKeepCasing ,
153160 makePathsEnum : flags . makePathsEnum ,
154161 generatePathParams : flags . generatePathParams ,
155162 redocly,
0 commit comments