File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/typescript/model
samples/openapi3/client/petstore/typescript/builds Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,10 +31,13 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3131let enumsMap: Set<string > = new Set<string >([
3232 { {#models} }
3333 { {#model} }
34+ { {#isEnum} }
35+ "{ {classname} }{ {enumName} }",
36+ { {/isEnum} }
3437 { {#hasEnums} }
3538 { {#vars} }
3639 { {#isEnum} }
37- "{ {classname} }{ {enumName} }",
40+ "{ {classname} }{ {enumName} }",
3841 { {/isEnum} }
3942 { {/vars} }
4043 { {/hasEnums} }
@@ -45,7 +48,9 @@ let enumsMap: Set<string> = new Set<string>([
4548let typeMap: { [index: string]: any} = {
4649 {{#models} }
4750 { {#model} }
51+ { {^isEnum} }
4852 "{ {classname} }": { {classname} },
53+ { {/isEnum} }
4954 { {/model} }
5055 { {/models} }
5156}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { HttpFile } from '../http/http{{extensionForDeno}}';
1111* { {{description} }}
1212*/
1313{ {/description} }
14+ { {^isEnum} }
1415export class { {classname} } { {#parent} }extends { {{parent} }} { {/parent} }{
1516{{#vars} }
1617{ {#description} }
@@ -75,5 +76,9 @@ export type {{classname}}{{enumName}} ={{#allowableValues}}{{#values}} "{{.}}" {
7576{ {/vars} }
7677
7778{ {/hasEnums} }
79+ { {/isEnum} }
80+ { {#isEnum} }
81+ export type { {classname} } ={ {#allowableValues} }{ {#values} } "{ {.} }" { {^-last} }|{ {/-last} }{ {/values} }{ {/allowableValues} };
82+ { {/isEnum} }
7883{ {/model} }
7984{ {/models} }
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3535
3636
3737let enumsMap : Set < string > = new Set < string > ( [
38- "OrderStatusEnum" ,
39- "PetStatusEnum" ,
38+ "OrderStatusEnum" ,
39+ "PetStatusEnum" ,
4040] ) ;
4141
4242let typeMap : { [ index : string ] : any } = {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3535
3636
3737let enumsMap : Set < string > = new Set < string > ( [
38- "OrderStatusEnum" ,
39- "PetStatusEnum" ,
38+ "OrderStatusEnum" ,
39+ "PetStatusEnum" ,
4040] ) ;
4141
4242let typeMap : { [ index : string ] : any } = {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3535
3636
3737let enumsMap : Set < string > = new Set < string > ( [
38- "OrderStatusEnum" ,
39- "PetStatusEnum" ,
38+ "OrderStatusEnum" ,
39+ "PetStatusEnum" ,
4040] ) ;
4141
4242let typeMap : { [ index : string ] : any } = {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3535
3636
3737let enumsMap : Set < string > = new Set < string > ( [
38- "OrderStatusEnum" ,
39- "PetStatusEnum" ,
38+ "OrderStatusEnum" ,
39+ "PetStatusEnum" ,
4040] ) ;
4141
4242let typeMap : { [ index : string ] : any } = {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
3535
3636
3737let enumsMap : Set < string > = new Set < string > ( [
38- "OrderStatusEnum" ,
39- "PetStatusEnum" ,
38+ "OrderStatusEnum" ,
39+ "PetStatusEnum" ,
4040] ) ;
4141
4242let typeMap : { [ index : string ] : any } = {
You can’t perform that action at this time.
0 commit comments