@@ -3690,6 +3690,9 @@ export { OpenAPI } from './core/OpenAPI';
3690
3690
export type { OpenAPIConfig } from './core/OpenAPI';
3691
3691
3692
3692
export type { _default } from './models/_default';
3693
+ export type { AnyOfAnyAndNull } from './models/AnyOfAnyAndNull';
3694
+ export type { AnyOfArrays } from './models/AnyOfArrays';
3695
+ export type { ArrayWithAnyOfProperties } from './models/ArrayWithAnyOfProperties';
3693
3696
export type { ArrayWithArray } from './models/ArrayWithArray';
3694
3697
export type { ArrayWithBooleans } from './models/ArrayWithBooleans';
3695
3698
export type { ArrayWithNumbers } from './models/ArrayWithNumbers';
@@ -3708,6 +3711,7 @@ export type { CompositionWithAllOfAndNullable } from './models/CompositionWithAl
3708
3711
export type { CompositionWithAnyOf } from './models/CompositionWithAnyOf';
3709
3712
export type { CompositionWithAnyOfAndNullable } from './models/CompositionWithAnyOfAndNullable';
3710
3713
export type { CompositionWithAnyOfAnonymous } from './models/CompositionWithAnyOfAnonymous';
3714
+ export type { CompositionWithNestedAnyAndTypeNull } from './models/CompositionWithNestedAnyAndTypeNull';
3711
3715
export type { CompositionWithNestedAnyOfAndNull } from './models/CompositionWithNestedAnyOfAndNull';
3712
3716
export type { CompositionWithOneOf } from './models/CompositionWithOneOf';
3713
3717
export type { CompositionWithOneOfAndComplexArrayDictionary } from './models/CompositionWithOneOfAndComplexArrayDictionary';
@@ -3764,6 +3768,9 @@ export type { SimpleString } from './models/SimpleString';
3764
3768
export type { SimpleStringWithPattern } from './models/SimpleStringWithPattern';
3765
3769
3766
3770
export { $_default } from './schemas/$_default';
3771
+ export { $AnyOfAnyAndNull } from './schemas/$AnyOfAnyAndNull';
3772
+ export { $AnyOfArrays } from './schemas/$AnyOfArrays';
3773
+ export { $ArrayWithAnyOfProperties } from './schemas/$ArrayWithAnyOfProperties';
3767
3774
export { $ArrayWithArray } from './schemas/$ArrayWithArray';
3768
3775
export { $ArrayWithBooleans } from './schemas/$ArrayWithBooleans';
3769
3776
export { $ArrayWithNumbers } from './schemas/$ArrayWithNumbers';
@@ -3782,6 +3789,7 @@ export { $CompositionWithAllOfAndNullable } from './schemas/$CompositionWithAllO
3782
3789
export { $CompositionWithAnyOf } from './schemas/$CompositionWithAnyOf';
3783
3790
export { $CompositionWithAnyOfAndNullable } from './schemas/$CompositionWithAnyOfAndNullable';
3784
3791
export { $CompositionWithAnyOfAnonymous } from './schemas/$CompositionWithAnyOfAnonymous';
3792
+ export { $CompositionWithNestedAnyAndTypeNull } from './schemas/$CompositionWithNestedAnyAndTypeNull';
3785
3793
export { $CompositionWithNestedAnyOfAndNull } from './schemas/$CompositionWithNestedAnyOfAndNull';
3786
3794
export { $CompositionWithOneOf } from './schemas/$CompositionWithOneOf';
3787
3795
export { $CompositionWithOneOfAndComplexArrayDictionary } from './schemas/$CompositionWithOneOfAndComplexArrayDictionary';
@@ -3873,6 +3881,53 @@ export type _default = {
3873
3881
"
3874
3882
`;
3875
3883
3884
+ exports[`v3 should generate: test/generated/v3/models/AnyOfAnyAndNull.ts 1`] = `
3885
+ "/* generated using openapi-typescript-codegen -- do no edit */
3886
+ /* istanbul ignore file */
3887
+ /* tslint:disable */
3888
+ /* eslint-disable */
3889
+ export type AnyOfAnyAndNull = {
3890
+ data?: (any | null);
3891
+ };
3892
+
3893
+ "
3894
+ `;
3895
+
3896
+ exports[`v3 should generate: test/generated/v3/models/AnyOfArrays.ts 1`] = `
3897
+ "/* generated using openapi-typescript-codegen -- do no edit */
3898
+ /* istanbul ignore file */
3899
+ /* tslint:disable */
3900
+ /* eslint-disable */
3901
+ /**
3902
+ * This is a simple array with any of properties
3903
+ */
3904
+ export type AnyOfArrays = {
3905
+ results?: Array<({
3906
+ foo?: string;
3907
+ } | {
3908
+ bar?: string;
3909
+ })>;
3910
+ };
3911
+
3912
+ "
3913
+ `;
3914
+
3915
+ exports[`v3 should generate: test/generated/v3/models/ArrayWithAnyOfProperties.ts 1`] = `
3916
+ "/* generated using openapi-typescript-codegen -- do no edit */
3917
+ /* istanbul ignore file */
3918
+ /* tslint:disable */
3919
+ /* eslint-disable */
3920
+ /**
3921
+ * This is a simple array with any of properties
3922
+ */
3923
+ export type ArrayWithAnyOfProperties = Array<({
3924
+ foo?: string;
3925
+ } | {
3926
+ bar?: string;
3927
+ })>;
3928
+ "
3929
+ `;
3930
+
3876
3931
exports[`v3 should generate: test/generated/v3/models/ArrayWithArray.ts 1`] = `
3877
3932
"/* generated using openapi-typescript-codegen -- do no edit */
3878
3933
/* istanbul ignore file */
@@ -4135,6 +4190,23 @@ export type CompositionWithAnyOfAnonymous = {
4135
4190
"
4136
4191
`;
4137
4192
4193
+ exports[`v3 should generate: test/generated/v3/models/CompositionWithNestedAnyAndTypeNull.ts 1`] = `
4194
+ "/* generated using openapi-typescript-codegen -- do no edit */
4195
+ /* istanbul ignore file */
4196
+ /* tslint:disable */
4197
+ /* eslint-disable */
4198
+ import type { ModelWithArray } from './ModelWithArray';
4199
+ import type { ModelWithDictionary } from './ModelWithDictionary';
4200
+ /**
4201
+ * This is a model with nested 'any of' property with a type null
4202
+ */
4203
+ export type CompositionWithNestedAnyAndTypeNull = {
4204
+ propA?: ((ModelWithDictionary | null) | (ModelWithArray | null));
4205
+ };
4206
+
4207
+ "
4208
+ `;
4209
+
4138
4210
exports[`v3 should generate: test/generated/v3/models/CompositionWithNestedAnyOfAndNull.ts 1`] = `
4139
4211
"/* generated using openapi-typescript-codegen -- do no edit */
4140
4212
/* istanbul ignore file */
@@ -5054,6 +5126,86 @@ export const $_default = {
5054
5126
"
5055
5127
`;
5056
5128
5129
+ exports[`v3 should generate: test/generated/v3/schemas/$AnyOfAnyAndNull.ts 1`] = `
5130
+ "/* generated using openapi-typescript-codegen -- do no edit */
5131
+ /* istanbul ignore file */
5132
+ /* tslint:disable */
5133
+ /* eslint-disable */
5134
+ export const $AnyOfAnyAndNull = {
5135
+ properties: {
5136
+ data: {
5137
+ type: 'any-of',
5138
+ contains: [{
5139
+ properties: {
5140
+ },
5141
+ }, {
5142
+ type: 'null',
5143
+ }],
5144
+ },
5145
+ },
5146
+ } as const;
5147
+ "
5148
+ `;
5149
+
5150
+ exports[`v3 should generate: test/generated/v3/schemas/$AnyOfArrays.ts 1`] = `
5151
+ "/* generated using openapi-typescript-codegen -- do no edit */
5152
+ /* istanbul ignore file */
5153
+ /* tslint:disable */
5154
+ /* eslint-disable */
5155
+ export const $AnyOfArrays = {
5156
+ description: \`This is a simple array with any of properties\`,
5157
+ properties: {
5158
+ results: {
5159
+ type: 'array',
5160
+ contains: {
5161
+ type: 'any-of',
5162
+ contains: [{
5163
+ properties: {
5164
+ foo: {
5165
+ type: 'string',
5166
+ },
5167
+ },
5168
+ }, {
5169
+ properties: {
5170
+ bar: {
5171
+ type: 'string',
5172
+ },
5173
+ },
5174
+ }],
5175
+ },
5176
+ },
5177
+ },
5178
+ } as const;
5179
+ "
5180
+ `;
5181
+
5182
+ exports[`v3 should generate: test/generated/v3/schemas/$ArrayWithAnyOfProperties.ts 1`] = `
5183
+ "/* generated using openapi-typescript-codegen -- do no edit */
5184
+ /* istanbul ignore file */
5185
+ /* tslint:disable */
5186
+ /* eslint-disable */
5187
+ export const $ArrayWithAnyOfProperties = {
5188
+ type: 'array',
5189
+ contains: {
5190
+ type: 'any-of',
5191
+ contains: [{
5192
+ properties: {
5193
+ foo: {
5194
+ type: 'string',
5195
+ },
5196
+ },
5197
+ }, {
5198
+ properties: {
5199
+ bar: {
5200
+ type: 'string',
5201
+ },
5202
+ },
5203
+ }],
5204
+ },
5205
+ } as const;
5206
+ "
5207
+ `;
5208
+
5057
5209
exports[`v3 should generate: test/generated/v3/schemas/$ArrayWithArray.ts 1`] = `
5058
5210
"/* generated using openapi-typescript-codegen -- do no edit */
5059
5211
/* istanbul ignore file */
@@ -5386,6 +5538,37 @@ export const $CompositionWithAnyOfAnonymous = {
5386
5538
"
5387
5539
`;
5388
5540
5541
+ exports[`v3 should generate: test/generated/v3/schemas/$CompositionWithNestedAnyAndTypeNull.ts 1`] = `
5542
+ "/* generated using openapi-typescript-codegen -- do no edit */
5543
+ /* istanbul ignore file */
5544
+ /* tslint:disable */
5545
+ /* eslint-disable */
5546
+ export const $CompositionWithNestedAnyAndTypeNull = {
5547
+ description: \`This is a model with nested 'any of' property with a type null\`,
5548
+ properties: {
5549
+ propA: {
5550
+ type: 'any-of',
5551
+ contains: [{
5552
+ type: 'any-of',
5553
+ contains: [{
5554
+ type: 'ModelWithDictionary',
5555
+ }, {
5556
+ type: 'null',
5557
+ }],
5558
+ }, {
5559
+ type: 'any-of',
5560
+ contains: [{
5561
+ type: 'ModelWithArray',
5562
+ }, {
5563
+ type: 'null',
5564
+ }],
5565
+ }],
5566
+ },
5567
+ },
5568
+ } as const;
5569
+ "
5570
+ `;
5571
+
5389
5572
exports[`v3 should generate: test/generated/v3/schemas/$CompositionWithNestedAnyOfAndNull.ts 1`] = `
5390
5573
"/* generated using openapi-typescript-codegen -- do no edit */
5391
5574
/* istanbul ignore file */
0 commit comments