File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " swagger-typescript-api " : patch
3+ ---
4+
5+ Add test verifying primitive + object anyOf unions.
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ export type Test1 = {
6060 multiple : string | number ;
6161} | null;
6262
63+ export interface AddressCreationRequest {
64+ city ?: string ;
65+ }
66+
67+ export interface ContainerWithPrimitiveAnyOf {
68+ origin ?: string | AddressCreationRequest ;
69+ }
70+
6371export interface AdditionalObjectProperties {
6472 id ?: string ;
6573 [key : string ]: any ;
Original file line number Diff line number Diff line change 8383 }
8484 }
8585 },
86+ "AddressCreationRequest" : {
87+ "type" : " object" ,
88+ "properties" : {
89+ "city" : {
90+ "type" : " string"
91+ }
92+ }
93+ },
94+ "ContainerWithPrimitiveAnyOf" : {
95+ "type" : " object" ,
96+ "properties" : {
97+ "origin" : {
98+ "anyOf" : [
99+ {
100+ "type" : " string"
101+ },
102+ {
103+ "$ref" : " #/definitions/AddressCreationRequest"
104+ }
105+ ]
106+ }
107+ }
108+ },
86109 "AdditionalObjectProperties" : {
87110 "type" : " object" ,
88111 "properties" : {
You can’t perform that action at this time.
0 commit comments