File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
src/cloudevents/tools/generator/readme-generator Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -199,16 +199,20 @@ export class ReadmeIndexGenerator {
199199 return this . metadata . schema_labels [ baseName ] ;
200200 }
201201
202- if ( category === "profile" ) return "Profile" ;
203- if ( category === "definitions" ) return this . getSchemaName ( filename ) ;
204- if ( category === "data" ) {
205- return this . getSchemaName ( filename ) . replace ( " Data" , " Data" ) ;
206- }
207- if ( category === "events" ) {
208- return this . getSchemaName ( filename ) . replace ( " Event" , " Event" ) ;
202+ let schemaType : string ;
203+
204+ switch ( category ) {
205+ case "profile" :
206+ schemaType = "Profile" ;
207+ break ;
208+ case "events" :
209+ schemaType = this . getSchemaName ( filename ) . toLowerCase ( ) ;
210+ break ;
211+ default :
212+ schemaType = this . getSchemaName ( filename ) ;
209213 }
210214
211- return this . getSchemaName ( filename ) ;
215+ return schemaType ;
212216 }
213217
214218 /**
You can’t perform that action at this time.
0 commit comments