|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`v2 should generate: ./test/generated/v2/client.ts 1`] = ` |
4 |
| -"/* istanbul ignore file */ |
5 |
| -/* tslint:disable */ |
6 |
| -/* eslint-disable */ |
7 |
| -import type { BaseHttpRequest } from './core/BaseHttpRequest'; |
8 |
| -import type { OpenAPIConfig } from './core/OpenAPI'; |
9 |
| -import { FetchHttpRequest } from './core/FetchHttpRequest'; |
10 |
| - |
11 |
| -import { CollectionFormatService } from './services/CollectionFormatService'; |
12 |
| -import { ComplexService } from './services/ComplexService'; |
13 |
| -import { DefaultService } from './services/DefaultService'; |
14 |
| -import { DefaultsService } from './services/DefaultsService'; |
15 |
| -import { DescriptionsService } from './services/DescriptionsService'; |
16 |
| -import { DuplicateService } from './services/DuplicateService'; |
17 |
| -import { ErrorService } from './services/ErrorService'; |
18 |
| -import { HeaderService } from './services/HeaderService'; |
19 |
| -import { MultipleTags1Service } from './services/MultipleTags1Service'; |
20 |
| -import { MultipleTags2Service } from './services/MultipleTags2Service'; |
21 |
| -import { MultipleTags3Service } from './services/MultipleTags3Service'; |
22 |
| -import { NoContentService } from './services/NoContentService'; |
23 |
| -import { ParametersService } from './services/ParametersService'; |
24 |
| -import { ResponseService } from './services/ResponseService'; |
25 |
| -import { SimpleService } from './services/SimpleService'; |
26 |
| -import { TypesService } from './services/TypesService'; |
27 |
| - |
28 |
| -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; |
29 |
| - |
30 |
| -export class DemoAppClient { |
31 |
| - |
32 |
| - public readonly collectionFormat: CollectionFormatService; |
33 |
| - public readonly complex: ComplexService; |
34 |
| - public readonly default: DefaultService; |
35 |
| - public readonly defaults: DefaultsService; |
36 |
| - public readonly descriptions: DescriptionsService; |
37 |
| - public readonly duplicate: DuplicateService; |
38 |
| - public readonly error: ErrorService; |
39 |
| - public readonly header: HeaderService; |
40 |
| - public readonly multipleTags1: MultipleTags1Service; |
41 |
| - public readonly multipleTags2: MultipleTags2Service; |
42 |
| - public readonly multipleTags3: MultipleTags3Service; |
43 |
| - public readonly noContent: NoContentService; |
44 |
| - public readonly parameters: ParametersService; |
45 |
| - public readonly response: ResponseService; |
46 |
| - public readonly simple: SimpleService; |
47 |
| - public readonly types: TypesService; |
48 |
| - |
49 |
| - public readonly request: BaseHttpRequest; |
50 |
| - |
51 |
| - constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { |
52 |
| - this.request = new HttpRequest({ |
53 |
| - BASE: config?.BASE ?? 'http://localhost:3000/base', |
54 |
| - VERSION: config?.VERSION ?? '1.0', |
55 |
| - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, |
56 |
| - CREDENTIALS: config?.CREDENTIALS ?? 'include', |
57 |
| - TOKEN: config?.TOKEN, |
58 |
| - USERNAME: config?.USERNAME, |
59 |
| - PASSWORD: config?.PASSWORD, |
60 |
| - HEADERS: config?.HEADERS, |
61 |
| - ENCODE_PATH: config?.ENCODE_PATH, |
62 |
| - }); |
63 |
| - |
64 |
| - this.collectionFormat = new CollectionFormatService(this.request); |
65 |
| - this.complex = new ComplexService(this.request); |
66 |
| - this.default = new DefaultService(this.request); |
67 |
| - this.defaults = new DefaultsService(this.request); |
68 |
| - this.descriptions = new DescriptionsService(this.request); |
69 |
| - this.duplicate = new DuplicateService(this.request); |
70 |
| - this.error = new ErrorService(this.request); |
71 |
| - this.header = new HeaderService(this.request); |
72 |
| - this.multipleTags1 = new MultipleTags1Service(this.request); |
73 |
| - this.multipleTags2 = new MultipleTags2Service(this.request); |
74 |
| - this.multipleTags3 = new MultipleTags3Service(this.request); |
75 |
| - this.noContent = new NoContentService(this.request); |
76 |
| - this.parameters = new ParametersService(this.request); |
77 |
| - this.response = new ResponseService(this.request); |
78 |
| - this.simple = new SimpleService(this.request); |
79 |
| - this.types = new TypesService(this.request); |
80 |
| - } |
81 |
| -}" |
82 |
| -`; |
83 |
| - |
84 | 3 | exports[`v2 should generate: ./test/generated/v2/core/ApiError.ts 1`] = `
|
85 | 4 | "/* istanbul ignore file */
|
86 | 5 | /* tslint:disable */
|
@@ -3030,99 +2949,6 @@ export class TypesService {
|
3030 | 2949 | }"
|
3031 | 2950 | `;
|
3032 | 2951 |
|
3033 |
| -exports[`v3 should generate: ./test/generated/v3/client.ts 1`] = ` |
3034 |
| -"/* istanbul ignore file */ |
3035 |
| -/* tslint:disable */ |
3036 |
| -/* eslint-disable */ |
3037 |
| -import type { BaseHttpRequest } from './core/BaseHttpRequest'; |
3038 |
| -import type { OpenAPIConfig } from './core/OpenAPI'; |
3039 |
| -import { FetchHttpRequest } from './core/FetchHttpRequest'; |
3040 |
| - |
3041 |
| -import { CollectionFormatService } from './services/CollectionFormatService'; |
3042 |
| -import { ComplexService } from './services/ComplexService'; |
3043 |
| -import { DefaultService } from './services/DefaultService'; |
3044 |
| -import { DefaultsService } from './services/DefaultsService'; |
3045 |
| -import { DescriptionsService } from './services/DescriptionsService'; |
3046 |
| -import { DuplicateService } from './services/DuplicateService'; |
3047 |
| -import { ErrorService } from './services/ErrorService'; |
3048 |
| -import { FormDataService } from './services/FormDataService'; |
3049 |
| -import { HeaderService } from './services/HeaderService'; |
3050 |
| -import { MultipartService } from './services/MultipartService'; |
3051 |
| -import { MultipleTags1Service } from './services/MultipleTags1Service'; |
3052 |
| -import { MultipleTags2Service } from './services/MultipleTags2Service'; |
3053 |
| -import { MultipleTags3Service } from './services/MultipleTags3Service'; |
3054 |
| -import { NoContentService } from './services/NoContentService'; |
3055 |
| -import { ParametersService } from './services/ParametersService'; |
3056 |
| -import { RequestBodyService } from './services/RequestBodyService'; |
3057 |
| -import { ResponseService } from './services/ResponseService'; |
3058 |
| -import { SimpleService } from './services/SimpleService'; |
3059 |
| -import { TypesService } from './services/TypesService'; |
3060 |
| -import { UploadService } from './services/UploadService'; |
3061 |
| - |
3062 |
| -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; |
3063 |
| - |
3064 |
| -export class DemoAppClient { |
3065 |
| - |
3066 |
| - public readonly collectionFormat: CollectionFormatService; |
3067 |
| - public readonly complex: ComplexService; |
3068 |
| - public readonly default: DefaultService; |
3069 |
| - public readonly defaults: DefaultsService; |
3070 |
| - public readonly descriptions: DescriptionsService; |
3071 |
| - public readonly duplicate: DuplicateService; |
3072 |
| - public readonly error: ErrorService; |
3073 |
| - public readonly formData: FormDataService; |
3074 |
| - public readonly header: HeaderService; |
3075 |
| - public readonly multipart: MultipartService; |
3076 |
| - public readonly multipleTags1: MultipleTags1Service; |
3077 |
| - public readonly multipleTags2: MultipleTags2Service; |
3078 |
| - public readonly multipleTags3: MultipleTags3Service; |
3079 |
| - public readonly noContent: NoContentService; |
3080 |
| - public readonly parameters: ParametersService; |
3081 |
| - public readonly requestBody: RequestBodyService; |
3082 |
| - public readonly response: ResponseService; |
3083 |
| - public readonly simple: SimpleService; |
3084 |
| - public readonly types: TypesService; |
3085 |
| - public readonly upload: UploadService; |
3086 |
| - |
3087 |
| - public readonly request: BaseHttpRequest; |
3088 |
| - |
3089 |
| - constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { |
3090 |
| - this.request = new HttpRequest({ |
3091 |
| - BASE: config?.BASE ?? 'http://localhost:3000/base', |
3092 |
| - VERSION: config?.VERSION ?? '1.0', |
3093 |
| - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, |
3094 |
| - CREDENTIALS: config?.CREDENTIALS ?? 'include', |
3095 |
| - TOKEN: config?.TOKEN, |
3096 |
| - USERNAME: config?.USERNAME, |
3097 |
| - PASSWORD: config?.PASSWORD, |
3098 |
| - HEADERS: config?.HEADERS, |
3099 |
| - ENCODE_PATH: config?.ENCODE_PATH, |
3100 |
| - }); |
3101 |
| - |
3102 |
| - this.collectionFormat = new CollectionFormatService(this.request); |
3103 |
| - this.complex = new ComplexService(this.request); |
3104 |
| - this.default = new DefaultService(this.request); |
3105 |
| - this.defaults = new DefaultsService(this.request); |
3106 |
| - this.descriptions = new DescriptionsService(this.request); |
3107 |
| - this.duplicate = new DuplicateService(this.request); |
3108 |
| - this.error = new ErrorService(this.request); |
3109 |
| - this.formData = new FormDataService(this.request); |
3110 |
| - this.header = new HeaderService(this.request); |
3111 |
| - this.multipart = new MultipartService(this.request); |
3112 |
| - this.multipleTags1 = new MultipleTags1Service(this.request); |
3113 |
| - this.multipleTags2 = new MultipleTags2Service(this.request); |
3114 |
| - this.multipleTags3 = new MultipleTags3Service(this.request); |
3115 |
| - this.noContent = new NoContentService(this.request); |
3116 |
| - this.parameters = new ParametersService(this.request); |
3117 |
| - this.requestBody = new RequestBodyService(this.request); |
3118 |
| - this.response = new ResponseService(this.request); |
3119 |
| - this.simple = new SimpleService(this.request); |
3120 |
| - this.types = new TypesService(this.request); |
3121 |
| - this.upload = new UploadService(this.request); |
3122 |
| - } |
3123 |
| -}" |
3124 |
| -`; |
3125 |
| - |
3126 | 2952 | exports[`v3 should generate: ./test/generated/v3/core/ApiError.ts 1`] = `
|
3127 | 2953 | "/* istanbul ignore file */
|
3128 | 2954 | /* tslint:disable */
|
|
0 commit comments