File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,9 @@ function generateSchemaTypes(
9292 for ( const schema of schemasType . getProperties ( ) ) {
9393 const schemaType = schema . getValueDeclaration ( ) ?. getType ( ) ;
9494 if ( schemaType ) {
95- const schemaName =
96- schema . getName ( ) === "Client" ? "ClientSchema" : schema . getName ( ) ;
95+ const schemaName = (
96+ schema . getName ( ) === "Client" ? "ClientSchema" : schema . getName ( )
97+ ) . replaceAll ( / - / g, "_" ) ;
9798 types . push ( `export type ${ schemaName } = ${ schemaType . getText ( ) } ;` ) ;
9899 }
99100 }
Original file line number Diff line number Diff line change @@ -335,3 +335,4 @@ export type BulkJobStatus = {
335335 total : number ;
336336} ;
337337export type ClientSchema = { id ?: string } ;
338+ export type schema_Something = { id ?: string } ;
Original file line number Diff line number Diff line change @@ -531,6 +531,9 @@ export interface components {
531531 Client : {
532532 id ?: string ;
533533 } ;
534+ "schema-Something" : {
535+ id ?: string ;
536+ } ;
534537 } ;
535538 responses : {
536539 /** @description Bad request due to invalid input */
Original file line number Diff line number Diff line change @@ -530,3 +530,10 @@ components:
530530 id :
531531 type : string
532532
533+ # this is dummy schema to check hyphen replacement
534+ schema-Something :
535+ type : object
536+ properties :
537+ id :
538+ type : string
539+
You can’t perform that action at this time.
0 commit comments