From 173c1e2c83bb57c04b7030d748ac95e10df0c51d Mon Sep 17 00:00:00 2001 From: Adam Basfop Cavendish Date: Sat, 24 Oct 2026 00:05:53 +0800 Subject: [PATCH] refactor: structure TypeScript error classes - Emit generated error classes through TypeSpec, FieldSpec, and FunSpec while preserving ResponseError inheritance, readonly details, constructors, and response-header accessors. - Keep anonymous error-detail aliases unchanged until sigil-stitch supports inline object or record type names instead of adding a raw-source workaround. - Pin the structured class and header-method rendering and synchronize the resulting TypeScript golden layout without changing non-whitespace output. --- .../typescript/fetch/sigil_emit_api.rs | 256 +++++++++++++----- .../apis/AdditionalPropertiesApi.ts.golden | 13 +- .../api-interface/apis/EntriesApi.ts.golden | 20 +- .../apis/TransferApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/TestResourceApi.ts.golden | 9 +- .../apis/ItemsApi.ts.golden | 5 +- .../apis/UsersApi.ts.golden | 5 +- .../enum-repr/apis/EnumReprApi.ts.golden | 21 +- .../apis/MediaApi.ts.golden | 25 +- .../minimal/apis/DefaultApi.ts.golden | 5 +- .../apis/MultipartApi.ts.golden | 9 +- .../apis/TransferApi.ts.golden | 5 +- .../apis/MultipartApi.ts.golden | 5 +- .../apis/TransferApi.ts.golden | 5 +- .../apis/TestApiApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 9 +- .../nested-nullable/apis/ValuesApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 17 +- .../petstore/apis/PetApi.ts.golden | 32 ++- .../petstore/apis/StoreApi.ts.golden | 17 +- .../petstore/apis/UserApi.ts.golden | 29 +- .../query-param-enum/apis/ItemsApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/DefaultApi.ts.golden | 33 ++- .../apis/WidgetApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 9 +- .../apis/WidgetApi.ts.golden | 5 +- .../apis/FooApi.ts.golden | 5 +- .../apis/ResponsesApi.ts.golden | 21 +- .../server-object/apis/DefaultApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 13 +- .../ts-enum-const/apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/MultipartApi.ts.golden | 5 +- .../apis/ResponsesApi.ts.golden | 21 +- .../apis/TestResourceApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 4 +- .../apis/TestResourceApi.ts.golden | 9 +- .../apis/EnumReprApi.ts.golden | 21 +- .../apis/PetApi.ts.golden | 32 ++- .../apis/StoreApi.ts.golden | 17 +- .../apis/UserApi.ts.golden | 29 +- .../apis/DefaultApi.ts.golden | 4 +- .../ts-toolchain-vp/apis/DefaultApi.ts.golden | 5 +- .../ts-type-guards/apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 9 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/DefaultApi.ts.golden | 5 +- .../apis/ResourcesApi.ts.golden | 13 +- 85 files changed, 676 insertions(+), 317 deletions(-) diff --git a/src/generators/typescript/fetch/sigil_emit_api.rs b/src/generators/typescript/fetch/sigil_emit_api.rs index 722f4a938..250026385 100644 --- a/src/generators/typescript/fetch/sigil_emit_api.rs +++ b/src/generators/typescript/fetch/sigil_emit_api.rs @@ -39,7 +39,7 @@ use sigil_stitch::prelude::sigil_quote; use sigil_stitch::spec::field_spec::FieldSpec; use sigil_stitch::spec::file_spec::FileSpec; use sigil_stitch::spec::fun_spec::FunSpec; -use sigil_stitch::spec::modifiers::{DeclarationContext, TypeKind, Visibility}; +use sigil_stitch::spec::modifiers::{TypeKind, Visibility}; use sigil_stitch::spec::parameter_spec::ParameterSpec; use sigil_stitch::spec::type_spec::TypeSpec; use sigil_stitch::spec::where_spec::{CallableParam, CallableParamPresence}; @@ -179,7 +179,10 @@ fn emit_api_file( for accessor in build_success_header_accessors(ops, ir)? { fb = fb.add_function(accessor); } - fb = fb.add_code(build_error_types_block(ops, ir)?); + for (detail_alias, error_class) in build_error_types(ops, ir)? { + fb = fb.add_code(detail_alias); + fb = fb.add_type(error_class); + } fb = fb.add_type(build_api_interface(&interface_name, ops)?); @@ -314,11 +317,11 @@ fn build_success_header_accessors( Ok(accessors) } -fn build_error_types_block( +fn build_error_types( ops: &[&IrOperation], ir: &IrSpec, -) -> Result { - let mut cb = CodeBlock::builder(); +) -> Result, SigilStitchError> { + let mut error_types = Vec::new(); for op in ops { let detail_alias = error_detail_alias_name(op); let class_name = error_class_name(op); @@ -327,73 +330,116 @@ fn build_error_types_block( .iter() .filter(|resp| !is_success_status(&resp.status)) .collect(); - cb.add(&format!("export type {detail_alias} =\n"), vec![]); - let mut used = HashSet::new(); - for (idx, resp) in error_responses.iter().enumerate() { - let prefix = if idx == 0 { " " } else { " | " }; - let kind = unique_ts_kind(&response_detail_kind(&resp.status), &mut used); - let status_ty = resp - .status - .parse::() - .ok() - .map(|n| n.to_string()) - .unwrap_or_else(|| "number".to_string()); - let value_ty = response_value_type(resp); - cb.add(prefix, vec![]); - cb.add( - &format!( - "{{ kind: '{}'; status: {}; raw: Response; value(): Promise<%T> }}\n", - kind, status_ty - ), - vec![Arg::TypeName(value_ty)], - ); - } - let prefix = if error_responses.is_empty() { - " " - } else { - " | " - }; - cb.add( - &format!( - "{prefix}{{ kind: 'unexpected'; status: number; raw: Response; value(): Promise<%T> }};\n" - ), - vec![Arg::TypeName(TypeName::primitive("Blob"))], - ); - cb.add_line(); + let detail_alias_block = build_error_detail_alias_block(&detail_alias, &error_responses)?; + let error_class = build_error_class(&class_name, &detail_alias, op, ir)?; + error_types.push((detail_alias_block, error_class)); + } + Ok(error_types) +} + +fn build_error_detail_alias_block( + detail_alias: &str, + error_responses: &[&IrResponse], +) -> Result { + let mut cb = CodeBlock::builder(); + cb.add(&format!("export type {detail_alias} =\n"), vec![]); + let mut used = HashSet::new(); + for (idx, resp) in error_responses.iter().enumerate() { + let prefix = if idx == 0 { " " } else { " | " }; + let kind = unique_ts_kind(&response_detail_kind(&resp.status), &mut used); + let status_ty = resp + .status + .parse::() + .ok() + .map(|n| n.to_string()) + .unwrap_or_else(|| "number".to_string()); + let value_ty = response_value_type(resp); + cb.add(prefix, vec![]); cb.add( &format!( - "export class {class_name} extends %T {{\n readonly detail: {detail_alias};\n\n constructor(response: Response, detail: {detail_alias}, msg = 'Response returned an error code') {{\n super(response, msg);\n this.detail = detail;\n }}\n" + "{{ kind: '{}'; status: {}; raw: Response; value(): Promise<%T> }}\n", + kind, status_ty ), - vec![Arg::TypeName(rt_value("ResponseError"))], - ); - cb.add("%>", ()); - let headers = collect_response_headers( - op.responses - .iter() - .filter(|response| !is_success_status(&response.status)), - ir, + vec![Arg::TypeName(value_ty)], ); - let method_names = unique_response_header_accessor_names(&headers, |wire_name| { - format!("get{}Header", wire_name.to_pascal_case()) - }); - for (header, method_name) in headers.iter().zip(method_names) { - cb.add_line(); - cb.add_code( - build_ts_header_accessor( - &method_name, - None, - header, - "this.response.headers", - false, - )? - .emit(&TypeScript::new(), DeclarationContext::Member)?, - ); - } - cb.add("%<}\n\n", ()); } + let prefix = if error_responses.is_empty() { + " " + } else { + " | " + }; + cb.add( + &format!( + "{prefix}{{ kind: 'unexpected'; status: number; raw: Response; value(): Promise<%T> }};\n" + ), + vec![Arg::TypeName(TypeName::primitive("Blob"))], + ); cb.build() } +fn build_error_class( + class_name: &str, + detail_alias: &str, + op: &IrOperation, + ir: &IrSpec, +) -> Result { + let constructor_body = sigil_quote!(TypeScript { + super(response, msg); + this.detail = detail; + })?; + let default_message = sigil_quote!(TypeScript { + $S("Response returned an error code") + })?; + let constructor = FunSpec::builder("constructor") + .is_constructor() + .add_param(ParameterSpec::of( + "response", + TypeName::primitive("Response"), + )) + .add_param(ParameterSpec::of( + "detail", + TypeName::primitive(detail_alias), + )) + .add_param( + ParameterSpec::builder("msg", TypeName::primitive("")) + .default_value(default_message) + .build()?, + ) + .body(constructor_body) + .build()?; + + let mut class = TypeSpec::builder(class_name, TypeKind::Class) + .visibility(Visibility::Public) + .extends(rt_value("ResponseError")) + .add_field( + FieldSpec::builder("detail", TypeName::primitive(detail_alias)) + .is_readonly() + .build()?, + ) + .add_method(constructor); + + let headers = collect_response_headers( + op.responses + .iter() + .filter(|response| !is_success_status(&response.status)), + ir, + ); + let method_names = unique_response_header_accessor_names(&headers, |wire_name| { + format!("get{}Header", wire_name.to_pascal_case()) + }); + for (header, method_name) in headers.iter().zip(method_names) { + class = class.add_method(build_ts_header_accessor( + &method_name, + None, + header, + "this.response.headers", + false, + )?); + } + + class.build() +} + fn build_ts_header_accessor( name: &str, parameter: Option, @@ -2285,6 +2331,14 @@ mod tests { crate::ir::lower::lower(parsed).expect("API interface fixture lowers") } + fn typed_error_ir() -> IrSpec { + let parsed = crate::parser::parse_content_yaml(include_str!( + "../../../../tests/fixtures/valid/typed-error-responses.yaml" + )) + .expect("typed error fixture parses"); + crate::ir::lower::lower(parsed).expect("typed error fixture lowers") + } + #[test] fn api_callable_parameters_preserve_request_and_override_presence() { let ir = api_interface_ir(); @@ -2394,6 +2448,80 @@ export interface EntriesApiInterface { Ok(()) } + #[test] + fn error_class_uses_structured_declaration_and_header_methods() -> Result<(), SigilStitchError> + { + let ir = typed_error_ir(); + let op = ir + .operations + .iter() + .find(|op| op.operation_id == "createResource") + .expect("typed error operation exists"); + let class = build_error_class("CreateResourceError", "CreateResourceErrorDetail", op, &ir)?; + let fragments = class.emit(&TypeScript::new())?; + let block = sigil_quote!(TypeScript { $C_each(fragments) })?; + assert_rendered!( + TypeScript::new(), + width = 100, + block, + r#"import { ResponseError } from '../runtime/runtime'; + +export class CreateResourceError extends ResponseError { + readonly detail: CreateResourceErrorDetail; + + constructor(response: Response, detail: CreateResourceErrorDetail, + msg = 'Response returned an error code' + ) { + super(response, msg); + this.detail = detail; + } + + get1RetryAfterHeader(): string | undefined { + return this.response.headers.get('1-Retry-After') ?? undefined; + } + + getRetryAfterHeader(): string | undefined { + return this.response.headers.get('Retry-After') ?? undefined; + } + + getRetryAfterHeader2(): string | undefined { + return this.response.headers.get('Retry_After') ?? undefined; + } + + getXRateLimitEnabledHeader(): boolean | undefined { + const value = this.response.headers.get('X-Rate-Limit-Enabled'); + if (value === 'true') { + return true; + } + if (value === 'false') { + return false; + } + return undefined; + } + + getXRateLimitRatioHeader(): number | undefined { + const value = this.response.headers.get('X-Rate-Limit-Ratio'); + if (value === null || !/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(value)) { + return undefined; + } + const parsed = Number(value); + return Number.isFinite(parsed) ? parsed : undefined; + } + + getXRateLimitRemainingHeader(): number | undefined { + const value = this.response.headers.get('X-Rate-Limit-Remaining'); + if (value === null || !/^[+-]?\d+$/.test(value)) { + return undefined; + } + const parsed = Number(value); + return Number.isSafeInteger(parsed) ? parsed : undefined; + } +} +"# + ); + Ok(()) + } + #[test] fn error_throw_composes_lazy_array_conversion_and_imports() -> Result<(), SigilStitchError> { let ir = response_dispatch_ir(); diff --git a/tests/golden/typescript/typescript-fetch/additional-properties/apis/AdditionalPropertiesApi.ts.golden b/tests/golden/typescript/typescript-fetch/additional-properties/apis/AdditionalPropertiesApi.ts.golden index 84d970aaa..37a77f53f 100644 --- a/tests/golden/typescript/typescript-fetch/additional-properties/apis/AdditionalPropertiesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/additional-properties/apis/AdditionalPropertiesApi.ts.golden @@ -42,7 +42,9 @@ export type PostLeafErrorDetail = export class PostLeafError extends ResponseError { readonly detail: PostLeafErrorDetail; - constructor(response: Response, detail: PostLeafErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostLeafErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -55,7 +57,9 @@ export type PostMiddleErrorDetail = export class PostMiddleError extends ResponseError { readonly detail: PostMiddleErrorDetail; - constructor(response: Response, detail: PostMiddleErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostMiddleErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -68,13 +72,14 @@ export type PostRootErrorDetail = export class PostRootError extends ResponseError { readonly detail: PostRootErrorDetail; - constructor(response: Response, detail: PostRootErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostRootErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface AdditionalPropertiesApiInterface { postLeafRaw: (requestParameters: ApiPostLeafRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/api-interface/apis/EntriesApi.ts.golden b/tests/golden/typescript/typescript-fetch/api-interface/apis/EntriesApi.ts.golden index b30a691d2..1d8a87ec5 100644 --- a/tests/golden/typescript/typescript-fetch/api-interface/apis/EntriesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/api-interface/apis/EntriesApi.ts.golden @@ -51,7 +51,9 @@ export type CookieInputErrorDetail = export class CookieInputError extends ResponseError { readonly detail: CookieInputErrorDetail; - constructor(response: Response, detail: CookieInputErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CookieInputErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -63,7 +65,9 @@ export type GetEntriesErrorDetail = export class GetEntriesError extends ResponseError { readonly detail: GetEntriesErrorDetail; - constructor(response: Response, detail: GetEntriesErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetEntriesErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -75,7 +79,9 @@ export type NoInputErrorDetail = export class NoInputError extends ResponseError { readonly detail: NoInputErrorDetail; - constructor(response: Response, detail: NoInputErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: NoInputErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -87,7 +93,9 @@ export type OptionalInputErrorDetail = export class OptionalInputError extends ResponseError { readonly detail: OptionalInputErrorDetail; - constructor(response: Response, detail: OptionalInputErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: OptionalInputErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -99,13 +107,13 @@ export type SubmitErrorDetail = export class SubmitError extends ResponseError { readonly detail: SubmitErrorDetail; - constructor(response: Response, detail: SubmitErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SubmitErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface EntriesApiInterface { cookieInputRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/binary-transfer-media-types/apis/TransferApi.ts.golden b/tests/golden/typescript/typescript-fetch/binary-transfer-media-types/apis/TransferApi.ts.golden index 1af9bcf17..00fb0559f 100644 --- a/tests/golden/typescript/typescript-fetch/binary-transfer-media-types/apis/TransferApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/binary-transfer-media-types/apis/TransferApi.ts.golden @@ -33,7 +33,9 @@ export type DownloadAssetErrorDetail = export class DownloadAssetError extends ResponseError { readonly detail: DownloadAssetErrorDetail; - constructor(response: Response, detail: DownloadAssetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DownloadAssetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -46,13 +48,14 @@ export type UploadAssetErrorDetail = export class UploadAssetError extends ResponseError { readonly detail: UploadAssetErrorDetail; - constructor(response: Response, detail: UploadAssetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UploadAssetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TransferApiInterface { downloadAssetRaw: (requestParameters: ApiDownloadAssetRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/comprehensive-schemas/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/comprehensive-schemas/apis/DefaultApi.ts.golden index cbaf4610c..47c451637 100644 --- a/tests/golden/typescript/typescript-fetch/comprehensive-schemas/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/comprehensive-schemas/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/delete-with-response-schema/apis/TestResourceApi.ts.golden b/tests/golden/typescript/typescript-fetch/delete-with-response-schema/apis/TestResourceApi.ts.golden index 6804fde07..941ac4891 100644 --- a/tests/golden/typescript/typescript-fetch/delete-with-response-schema/apis/TestResourceApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/delete-with-response-schema/apis/TestResourceApi.ts.golden @@ -37,7 +37,9 @@ export type CreateTestResourceErrorDetail = export class CreateTestResourceError extends ResponseError { readonly detail: CreateTestResourceErrorDetail; - constructor(response: Response, detail: CreateTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -51,13 +53,14 @@ export type DeleteTestResourceErrorDetail = export class DeleteTestResourceError extends ResponseError { readonly detail: DeleteTestResourceErrorDetail; - constructor(response: Response, detail: DeleteTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TestResourceApiInterface { createTestResourceRaw: (requestParameters: ApiCreateTestResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/ItemsApi.ts.golden b/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/ItemsApi.ts.golden index 9cefef07d..481cb04e7 100644 --- a/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/ItemsApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/ItemsApi.ts.golden @@ -33,13 +33,14 @@ export type CreateItemWithBodyConflictErrorDetail = export class CreateItemWithBodyConflictError extends ResponseError { readonly detail: CreateItemWithBodyConflictErrorDetail; - constructor(response: Response, detail: CreateItemWithBodyConflictErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateItemWithBodyConflictErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ItemsApiInterface { createItemWithBodyConflictRaw: (requestParameters: ApiCreateItemWithBodyConflictRequest, initOverrides?: RequestInit diff --git a/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/UsersApi.ts.golden b/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/UsersApi.ts.golden index 290f58634..191d7ecc9 100644 --- a/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/UsersApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/duplicate-param-names/apis/UsersApi.ts.golden @@ -36,13 +36,14 @@ export type GetUserByIdDuplicateErrorDetail = export class GetUserByIdDuplicateError extends ResponseError { readonly detail: GetUserByIdDuplicateErrorDetail; - constructor(response: Response, detail: GetUserByIdDuplicateErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetUserByIdDuplicateErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface UsersApiInterface { getUserByIdDuplicateRaw: (requestParameters: ApiGetUserByIdDuplicateRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/enum-repr/apis/EnumReprApi.ts.golden b/tests/golden/typescript/typescript-fetch/enum-repr/apis/EnumReprApi.ts.golden index 01261daeb..c122fa9be 100644 --- a/tests/golden/typescript/typescript-fetch/enum-repr/apis/EnumReprApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/enum-repr/apis/EnumReprApi.ts.golden @@ -60,7 +60,9 @@ export type HandleAdjacentlyTaggedErrorDetail = export class HandleAdjacentlyTaggedError extends ResponseError { readonly detail: HandleAdjacentlyTaggedErrorDetail; - constructor(response: Response, detail: HandleAdjacentlyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleAdjacentlyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -73,7 +75,9 @@ export type HandleExternallyTaggedErrorDetail = export class HandleExternallyTaggedError extends ResponseError { readonly detail: HandleExternallyTaggedErrorDetail; - constructor(response: Response, detail: HandleExternallyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleExternallyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -86,7 +90,9 @@ export type HandleInternallyTaggedErrorDetail = export class HandleInternallyTaggedError extends ResponseError { readonly detail: HandleInternallyTaggedErrorDetail; - constructor(response: Response, detail: HandleInternallyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleInternallyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -99,7 +105,9 @@ export type HandleMixedErrorDetail = export class HandleMixedError extends ResponseError { readonly detail: HandleMixedErrorDetail; - constructor(response: Response, detail: HandleMixedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleMixedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -112,13 +120,14 @@ export type HandleUntaggedErrorDetail = export class HandleUntaggedError extends ResponseError { readonly detail: HandleUntaggedErrorDetail; - constructor(response: Response, detail: HandleUntaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleUntaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface EnumReprApiInterface { handleAdjacentlyTaggedRaw: (requestParameters: ApiHandleAdjacentlyTaggedRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/media-type-selection/apis/MediaApi.ts.golden b/tests/golden/typescript/typescript-fetch/media-type-selection/apis/MediaApi.ts.golden index 8a0d0daaf..3712875af 100644 --- a/tests/golden/typescript/typescript-fetch/media-type-selection/apis/MediaApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/media-type-selection/apis/MediaApi.ts.golden @@ -52,7 +52,9 @@ export type SendJsonPreferredErrorDetail = export class SendJsonPreferredError extends ResponseError { readonly detail: SendJsonPreferredErrorDetail; - constructor(response: Response, detail: SendJsonPreferredErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendJsonPreferredErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -64,7 +66,9 @@ export type SendParameterizedMultipartErrorDetail = export class SendParameterizedMultipartError extends ResponseError { readonly detail: SendParameterizedMultipartErrorDetail; - constructor(response: Response, detail: SendParameterizedMultipartErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendParameterizedMultipartErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -76,7 +80,9 @@ export type SendVendorJsonErrorDetail = export class SendVendorJsonError extends ResponseError { readonly detail: SendVendorJsonErrorDetail; - constructor(response: Response, detail: SendVendorJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendVendorJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -88,7 +94,9 @@ export type GetOctetPreferredErrorDetail = export class GetOctetPreferredError extends ResponseError { readonly detail: GetOctetPreferredErrorDetail; - constructor(response: Response, detail: GetOctetPreferredErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetOctetPreferredErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -100,7 +108,9 @@ export type GetTextPreferredErrorDetail = export class GetTextPreferredError extends ResponseError { readonly detail: GetTextPreferredErrorDetail; - constructor(response: Response, detail: GetTextPreferredErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetTextPreferredErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -112,13 +122,14 @@ export type GetVendorJsonErrorDetail = export class GetVendorJsonError extends ResponseError { readonly detail: GetVendorJsonErrorDetail; - constructor(response: Response, detail: GetVendorJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetVendorJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface MediaApiInterface { sendJsonPreferredRaw: (requestParameters: ApiSendJsonPreferredRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/minimal/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/minimal/apis/DefaultApi.ts.golden index cc06a9c6d..da9a867eb 100644 --- a/tests/golden/typescript/typescript-fetch/minimal/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/minimal/apis/DefaultApi.ts.golden @@ -17,13 +17,14 @@ export type GetTestErrorDetail = export class GetTestError extends ResponseError { readonly detail: GetTestErrorDetail; - constructor(response: Response, detail: GetTestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetTestErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getTestRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; getTest: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/multipart-edge-cases/apis/MultipartApi.ts.golden b/tests/golden/typescript/typescript-fetch/multipart-edge-cases/apis/MultipartApi.ts.golden index 050373bae..a4c8b9429 100644 --- a/tests/golden/typescript/typescript-fetch/multipart-edge-cases/apis/MultipartApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/multipart-edge-cases/apis/MultipartApi.ts.golden @@ -32,7 +32,9 @@ export type SendOptionalPartsErrorDetail = export class SendOptionalPartsError extends ResponseError { readonly detail: SendOptionalPartsErrorDetail; - constructor(response: Response, detail: SendOptionalPartsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendOptionalPartsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -44,13 +46,14 @@ export type SendTextFieldsErrorDetail = export class SendTextFieldsError extends ResponseError { readonly detail: SendTextFieldsErrorDetail; - constructor(response: Response, detail: SendTextFieldsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendTextFieldsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface MultipartApiInterface { sendOptionalPartsRaw: (requestParameters: ApiSendOptionalPartsRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/multipart-explicit-encoding/apis/TransferApi.ts.golden b/tests/golden/typescript/typescript-fetch/multipart-explicit-encoding/apis/TransferApi.ts.golden index 6bd43d51e..176d0d510 100644 --- a/tests/golden/typescript/typescript-fetch/multipart-explicit-encoding/apis/TransferApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/multipart-explicit-encoding/apis/TransferApi.ts.golden @@ -23,13 +23,14 @@ export type UploadEncodedAssetErrorDetail = export class UploadEncodedAssetError extends ResponseError { readonly detail: UploadEncodedAssetErrorDetail; - constructor(response: Response, detail: UploadEncodedAssetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UploadEncodedAssetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TransferApiInterface { uploadEncodedAssetRaw: (requestParameters: ApiUploadEncodedAssetRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/multipart-nested-object-parts/apis/MultipartApi.ts.golden b/tests/golden/typescript/typescript-fetch/multipart-nested-object-parts/apis/MultipartApi.ts.golden index 2d482ebbb..2500897eb 100644 --- a/tests/golden/typescript/typescript-fetch/multipart-nested-object-parts/apis/MultipartApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/multipart-nested-object-parts/apis/MultipartApi.ts.golden @@ -23,13 +23,14 @@ export type SendNestedObjectPartErrorDetail = export class SendNestedObjectPartError extends ResponseError { readonly detail: SendNestedObjectPartErrorDetail; - constructor(response: Response, detail: SendNestedObjectPartErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendNestedObjectPartErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface MultipartApiInterface { sendNestedObjectPartRaw: (requestParameters: ApiSendNestedObjectPartRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/multipart-unsupported-schema/apis/TransferApi.ts.golden b/tests/golden/typescript/typescript-fetch/multipart-unsupported-schema/apis/TransferApi.ts.golden index d3228e5c9..fcbbd8291 100644 --- a/tests/golden/typescript/typescript-fetch/multipart-unsupported-schema/apis/TransferApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/multipart-unsupported-schema/apis/TransferApi.ts.golden @@ -22,13 +22,14 @@ export type UploadRawMultipartErrorDetail = export class UploadRawMultipartError extends ResponseError { readonly detail: UploadRawMultipartErrorDetail; - constructor(response: Response, detail: UploadRawMultipartErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UploadRawMultipartErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TransferApiInterface { uploadRawMultipartRaw: (requestParameters: ApiUploadRawMultipartRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/multiple-similar-request-schemas/apis/TestApiApi.ts.golden b/tests/golden/typescript/typescript-fetch/multiple-similar-request-schemas/apis/TestApiApi.ts.golden index f56dcc884..913a673b3 100644 --- a/tests/golden/typescript/typescript-fetch/multiple-similar-request-schemas/apis/TestApiApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/multiple-similar-request-schemas/apis/TestApiApi.ts.golden @@ -34,7 +34,9 @@ export type CreateTypeAErrorDetail = export class CreateTypeAError extends ResponseError { readonly detail: CreateTypeAErrorDetail; - constructor(response: Response, detail: CreateTypeAErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTypeAErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -46,13 +48,14 @@ export type CreateTypeBErrorDetail = export class CreateTypeBError extends ResponseError { readonly detail: CreateTypeBErrorDetail; - constructor(response: Response, detail: CreateTypeBErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTypeBErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TestApiApiInterface { createTypeARaw: (requestParameters: ApiCreateTypeARequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/naming-conventions/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/naming-conventions/apis/DefaultApi.ts.golden index 99707443c..19b735388 100644 --- a/tests/golden/typescript/typescript-fetch/naming-conventions/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/naming-conventions/apis/DefaultApi.ts.golden @@ -42,7 +42,9 @@ export type GetWithQueryParamsErrorDetail = export class GetWithQueryParamsError extends ResponseError { readonly detail: GetWithQueryParamsErrorDetail; - constructor(response: Response, detail: GetWithQueryParamsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetWithQueryParamsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -54,13 +56,14 @@ export type TestNamingConventionsErrorDetail = export class TestNamingConventionsError extends ResponseError { readonly detail: TestNamingConventionsErrorDetail; - constructor(response: Response, detail: TestNamingConventionsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestNamingConventionsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getWithQueryParamsRaw: (requestParameters: ApiGetWithQueryParamsRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/nested-nullable/apis/ValuesApi.ts.golden b/tests/golden/typescript/typescript-fetch/nested-nullable/apis/ValuesApi.ts.golden index 35e0f7215..427814cb4 100644 --- a/tests/golden/typescript/typescript-fetch/nested-nullable/apis/ValuesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/nested-nullable/apis/ValuesApi.ts.golden @@ -27,13 +27,14 @@ string[] | null>> } export class GetValuesError extends ResponseError { readonly detail: GetValuesErrorDetail; - constructor(response: Response, detail: GetValuesErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetValuesErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ValuesApiInterface { getValuesRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/optional-request-bodies/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/optional-request-bodies/apis/DefaultApi.ts.golden index a53e59c88..61fc90333 100644 --- a/tests/golden/typescript/typescript-fetch/optional-request-bodies/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/optional-request-bodies/apis/DefaultApi.ts.golden @@ -47,7 +47,9 @@ export type SendOptionalBinaryErrorDetail = export class SendOptionalBinaryError extends ResponseError { readonly detail: SendOptionalBinaryErrorDetail; - constructor(response: Response, detail: SendOptionalBinaryErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendOptionalBinaryErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -59,7 +61,9 @@ export type SendOptionalJsonErrorDetail = export class SendOptionalJsonError extends ResponseError { readonly detail: SendOptionalJsonErrorDetail; - constructor(response: Response, detail: SendOptionalJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendOptionalJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -71,7 +75,9 @@ export type SendOptionalTextErrorDetail = export class SendOptionalTextError extends ResponseError { readonly detail: SendOptionalTextErrorDetail; - constructor(response: Response, detail: SendOptionalTextErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendOptionalTextErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -83,13 +89,14 @@ export type SendRequiredJsonErrorDetail = export class SendRequiredJsonError extends ResponseError { readonly detail: SendRequiredJsonErrorDetail; - constructor(response: Response, detail: SendRequiredJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendRequiredJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { sendOptionalBinaryRaw: (requestParameters: ApiSendOptionalBinaryRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/petstore/apis/PetApi.ts.golden b/tests/golden/typescript/typescript-fetch/petstore/apis/PetApi.ts.golden index c8553744f..1246ec2b2 100644 --- a/tests/golden/typescript/typescript-fetch/petstore/apis/PetApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/petstore/apis/PetApi.ts.golden @@ -113,7 +113,9 @@ export type UpdatePetErrorDetail = export class UpdatePetError extends ResponseError { readonly detail: UpdatePetErrorDetail; - constructor(response: Response, detail: UpdatePetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdatePetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -127,7 +129,8 @@ export type AddPetErrorDetail = export class AddPetError extends ResponseError { readonly detail: AddPetErrorDetail; - constructor(response: Response, detail: AddPetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: AddPetErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -140,7 +143,9 @@ export type FindPetsByStatusErrorDetail = export class FindPetsByStatusError extends ResponseError { readonly detail: FindPetsByStatusErrorDetail; - constructor(response: Response, detail: FindPetsByStatusErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: FindPetsByStatusErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -153,7 +158,9 @@ export type FindPetsByTagsErrorDetail = export class FindPetsByTagsError extends ResponseError { readonly detail: FindPetsByTagsErrorDetail; - constructor(response: Response, detail: FindPetsByTagsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: FindPetsByTagsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -167,7 +174,9 @@ export type GetPetByIdErrorDetail = export class GetPetByIdError extends ResponseError { readonly detail: GetPetByIdErrorDetail; - constructor(response: Response, detail: GetPetByIdErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetPetByIdErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -180,7 +189,9 @@ export type UpdatePetWithFormErrorDetail = export class UpdatePetWithFormError extends ResponseError { readonly detail: UpdatePetWithFormErrorDetail; - constructor(response: Response, detail: UpdatePetWithFormErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdatePetWithFormErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -193,7 +204,9 @@ export type DeletePetErrorDetail = export class DeletePetError extends ResponseError { readonly detail: DeletePetErrorDetail; - constructor(response: Response, detail: DeletePetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeletePetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -205,13 +218,14 @@ export type UploadFileErrorDetail = export class UploadFileError extends ResponseError { readonly detail: UploadFileErrorDetail; - constructor(response: Response, detail: UploadFileErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UploadFileErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface PetApiInterface { updatePetRaw: (requestParameters: ApiUpdatePetRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/petstore/apis/StoreApi.ts.golden b/tests/golden/typescript/typescript-fetch/petstore/apis/StoreApi.ts.golden index cadc0fe4c..9e891d26b 100644 --- a/tests/golden/typescript/typescript-fetch/petstore/apis/StoreApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/petstore/apis/StoreApi.ts.golden @@ -49,7 +49,9 @@ export type GetInventoryErrorDetail = export class GetInventoryError extends ResponseError { readonly detail: GetInventoryErrorDetail; - constructor(response: Response, detail: GetInventoryErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetInventoryErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -62,7 +64,9 @@ export type PlaceOrderErrorDetail = export class PlaceOrderError extends ResponseError { readonly detail: PlaceOrderErrorDetail; - constructor(response: Response, detail: PlaceOrderErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PlaceOrderErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -76,7 +80,9 @@ export type GetOrderByIdErrorDetail = export class GetOrderByIdError extends ResponseError { readonly detail: GetOrderByIdErrorDetail; - constructor(response: Response, detail: GetOrderByIdErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetOrderByIdErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -90,13 +96,14 @@ export type DeleteOrderErrorDetail = export class DeleteOrderError extends ResponseError { readonly detail: DeleteOrderErrorDetail; - constructor(response: Response, detail: DeleteOrderErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteOrderErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface StoreApiInterface { getInventoryRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/petstore/apis/UserApi.ts.golden b/tests/golden/typescript/typescript-fetch/petstore/apis/UserApi.ts.golden index f64223349..44b0a06d4 100644 --- a/tests/golden/typescript/typescript-fetch/petstore/apis/UserApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/petstore/apis/UserApi.ts.golden @@ -84,7 +84,9 @@ export type CreateUserErrorDetail = export class CreateUserError extends ResponseError { readonly detail: CreateUserErrorDetail; - constructor(response: Response, detail: CreateUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -96,7 +98,9 @@ export type CreateUsersWithListInputErrorDetail = export class CreateUsersWithListInputError extends ResponseError { readonly detail: CreateUsersWithListInputErrorDetail; - constructor(response: Response, detail: CreateUsersWithListInputErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateUsersWithListInputErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -109,7 +113,9 @@ export type LoginUserErrorDetail = export class LoginUserError extends ResponseError { readonly detail: LoginUserErrorDetail; - constructor(response: Response, detail: LoginUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: LoginUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -121,7 +127,9 @@ export type LogoutUserErrorDetail = export class LogoutUserError extends ResponseError { readonly detail: LogoutUserErrorDetail; - constructor(response: Response, detail: LogoutUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: LogoutUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -135,7 +143,9 @@ export type GetUserByNameErrorDetail = export class GetUserByNameError extends ResponseError { readonly detail: GetUserByNameErrorDetail; - constructor(response: Response, detail: GetUserByNameErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetUserByNameErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -149,7 +159,9 @@ export type UpdateUserErrorDetail = export class UpdateUserError extends ResponseError { readonly detail: UpdateUserErrorDetail; - constructor(response: Response, detail: UpdateUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdateUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -163,13 +175,14 @@ export type DeleteUserErrorDetail = export class DeleteUserError extends ResponseError { readonly detail: DeleteUserErrorDetail; - constructor(response: Response, detail: DeleteUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface UserApiInterface { createUserRaw: (requestParameters: ApiCreateUserRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/query-param-enum/apis/ItemsApi.ts.golden b/tests/golden/typescript/typescript-fetch/query-param-enum/apis/ItemsApi.ts.golden index 13a5945a8..4b09e2ea3 100644 --- a/tests/golden/typescript/typescript-fetch/query-param-enum/apis/ItemsApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/query-param-enum/apis/ItemsApi.ts.golden @@ -28,13 +28,14 @@ export type GetItemsErrorDetail = export class GetItemsError extends ResponseError { readonly detail: GetItemsErrorDetail; - constructor(response: Response, detail: GetItemsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetItemsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ItemsApiInterface { getItemsRaw: (requestParameters: ApiGetItemsRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-all-optional-properties/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-all-optional-properties/apis/DefaultApi.ts.golden index 90af0f149..d87141c14 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-all-optional-properties/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-all-optional-properties/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-array-of-inline-objects/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-array-of-inline-objects/apis/DefaultApi.ts.golden index 2a73d5ec7..e9cbb7ca4 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-array-of-inline-objects/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-array-of-inline-objects/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-array-of-referenced-types/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-array-of-referenced-types/apis/DefaultApi.ts.golden index d61b031b3..01cb052e1 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-array-of-referenced-types/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-array-of-referenced-types/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-array-with-reference-property/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-array-with-reference-property/apis/DefaultApi.ts.golden index 7abf23479..f91510f74 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-array-with-reference-property/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-array-with-reference-property/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-complex-array-structure/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-complex-array-structure/apis/DefaultApi.ts.golden index 649a6d17e..0174ac0b1 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-complex-array-structure/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-complex-array-structure/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-deeply-nested-inline/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-deeply-nested-inline/apis/DefaultApi.ts.golden index 786a8d2d6..0f3ff0377 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-deeply-nested-inline/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-deeply-nested-inline/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-empty-array/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-empty-array/apis/DefaultApi.ts.golden index 045dfc542..93bd0bc22 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-empty-array/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-empty-array/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-inline-object-with-array/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-inline-object-with-array/apis/DefaultApi.ts.golden index dcdecbf5a..967902b89 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-inline-object-with-array/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-inline-object-with-array/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-inline-object/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-inline-object/apis/DefaultApi.ts.golden index 0491d6821..4887cf7cf 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-inline-object/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-inline-object/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-mixed-property-types/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-mixed-property-types/apis/DefaultApi.ts.golden index f21e0f943..9bd6dd9f9 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-mixed-property-types/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-mixed-property-types/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-nested-object-reference/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-nested-object-reference/apis/DefaultApi.ts.golden index 094fbdb8b..7739d09e3 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-nested-object-reference/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-nested-object-reference/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-inline-objects/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-inline-objects/apis/DefaultApi.ts.golden index b57f30253..d06bedb9f 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-inline-objects/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-inline-objects/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-referenced-types/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-referenced-types/apis/DefaultApi.ts.golden index 9d0424387..f417169a8 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-referenced-types/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-optional-array-of-referenced-types/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-optional-inline-object/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-optional-inline-object/apis/DefaultApi.ts.golden index 3b3bb27c9..35e2f0e64 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-optional-inline-object/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-optional-inline-object/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-optional-nested-object-reference/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-optional-nested-object-reference/apis/DefaultApi.ts.golden index 503ce5848..676316870 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-optional-nested-object-reference/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-optional-nested-object-reference/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-primitive-array/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-primitive-array/apis/DefaultApi.ts.golden index c4a073263..78d31daf3 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-primitive-array/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-primitive-array/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/recursive-json-self-referential-object/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/recursive-json-self-referential-object/apis/DefaultApi.ts.golden index 63747d50c..15710eba0 100644 --- a/tests/golden/typescript/typescript-fetch/recursive-json-self-referential-object/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/recursive-json-self-referential-object/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type GetFooErrorDetail = export class GetFooError extends ResponseError { readonly detail: GetFooErrorDetail; - constructor(response: Response, detail: GetFooErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetFooErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getFooRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; getFoo: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/request-body-content-types/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/request-body-content-types/apis/DefaultApi.ts.golden index e90312d9d..6a0b1caff 100644 --- a/tests/golden/typescript/typescript-fetch/request-body-content-types/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/request-body-content-types/apis/DefaultApi.ts.golden @@ -75,7 +75,9 @@ export type PostBinaryErrorDetail = export class PostBinaryError extends ResponseError { readonly detail: PostBinaryErrorDetail; - constructor(response: Response, detail: PostBinaryErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostBinaryErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -87,7 +89,9 @@ export type PostFormErrorDetail = export class PostFormError extends ResponseError { readonly detail: PostFormErrorDetail; - constructor(response: Response, detail: PostFormErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostFormErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -99,7 +103,9 @@ export type PostJsonErrorDetail = export class PostJsonError extends ResponseError { readonly detail: PostJsonErrorDetail; - constructor(response: Response, detail: PostJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -111,7 +117,9 @@ export type PostJsonOrXmlErrorDetail = export class PostJsonOrXmlError extends ResponseError { readonly detail: PostJsonOrXmlErrorDetail; - constructor(response: Response, detail: PostJsonOrXmlErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostJsonOrXmlErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -123,7 +131,9 @@ export type PatchMergeJsonErrorDetail = export class PatchMergeJsonError extends ResponseError { readonly detail: PatchMergeJsonErrorDetail; - constructor(response: Response, detail: PatchMergeJsonErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PatchMergeJsonErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -135,7 +145,9 @@ export type PostTextErrorDetail = export class PostTextError extends ResponseError { readonly detail: PostTextErrorDetail; - constructor(response: Response, detail: PostTextErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostTextErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -147,7 +159,9 @@ export type PostXmlErrorDetail = export class PostXmlError extends ResponseError { readonly detail: PostXmlErrorDetail; - constructor(response: Response, detail: PostXmlErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PostXmlErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -159,13 +173,14 @@ export type GetXmlResponseErrorDetail = export class GetXmlResponseError extends ResponseError { readonly detail: GetXmlResponseErrorDetail; - constructor(response: Response, detail: GetXmlResponseErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetXmlResponseErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { postBinaryRaw: (requestParameters: ApiPostBinaryRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/response-body-default-and-exact/apis/WidgetApi.ts.golden b/tests/golden/typescript/typescript-fetch/response-body-default-and-exact/apis/WidgetApi.ts.golden index bb5ee3003..297ccbd78 100644 --- a/tests/golden/typescript/typescript-fetch/response-body-default-and-exact/apis/WidgetApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/response-body-default-and-exact/apis/WidgetApi.ts.golden @@ -20,13 +20,14 @@ export type GetWidgetErrorDetail = export class GetWidgetError extends ResponseError { readonly detail: GetWidgetErrorDetail; - constructor(response: Response, detail: GetWidgetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetWidgetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface WidgetApiInterface { getWidgetRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/response-body-fallback/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/response-body-fallback/apis/DefaultApi.ts.golden index 4a77d4ff5..b489b23ce 100644 --- a/tests/golden/typescript/typescript-fetch/response-body-fallback/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/response-body-fallback/apis/DefaultApi.ts.golden @@ -23,7 +23,9 @@ export type GetFallbackNoBodyErrorDetail = export class GetFallbackNoBodyError extends ResponseError { readonly detail: GetFallbackNoBodyErrorDetail; - constructor(response: Response, detail: GetFallbackNoBodyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetFallbackNoBodyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -36,13 +38,14 @@ export type GetFallbackWithBodyErrorDetail = export class GetFallbackWithBodyError extends ResponseError { readonly detail: GetFallbackWithBodyErrorDetail; - constructor(response: Response, detail: GetFallbackWithBodyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetFallbackWithBodyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getFallbackNoBodyRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/response-body-multi-status-responses/apis/WidgetApi.ts.golden b/tests/golden/typescript/typescript-fetch/response-body-multi-status-responses/apis/WidgetApi.ts.golden index 0b47e405b..d39886d5f 100644 --- a/tests/golden/typescript/typescript-fetch/response-body-multi-status-responses/apis/WidgetApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/response-body-multi-status-responses/apis/WidgetApi.ts.golden @@ -22,13 +22,14 @@ export type ListWidgetsErrorDetail = export class ListWidgetsError extends ResponseError { readonly detail: ListWidgetsErrorDetail; - constructor(response: Response, detail: ListWidgetsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ListWidgetsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface WidgetApiInterface { listWidgetsRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/response-body-no-response-body/apis/FooApi.ts.golden b/tests/golden/typescript/typescript-fetch/response-body-no-response-body/apis/FooApi.ts.golden index 0829a5697..48c3963b3 100644 --- a/tests/golden/typescript/typescript-fetch/response-body-no-response-body/apis/FooApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/response-body-no-response-body/apis/FooApi.ts.golden @@ -26,13 +26,14 @@ export type UpdateFooBarErrorDetail = export class UpdateFooBarError extends ResponseError { readonly detail: UpdateFooBarErrorDetail; - constructor(response: Response, detail: UpdateFooBarErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdateFooBarErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface FooApiInterface { updateFooBarRaw: (requestParameters: ApiUpdateFooBarRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/response-dispatch/apis/ResponsesApi.ts.golden b/tests/golden/typescript/typescript-fetch/response-dispatch/apis/ResponsesApi.ts.golden index ec4112113..1357bb8bf 100644 --- a/tests/golden/typescript/typescript-fetch/response-dispatch/apis/ResponsesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/response-dispatch/apis/ResponsesApi.ts.golden @@ -35,7 +35,9 @@ export type ReadDefaultErrorDetail = export class ReadDefaultError extends ResponseError { readonly detail: ReadDefaultErrorDetail; - constructor(response: Response, detail: ReadDefaultErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadDefaultErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -48,7 +50,9 @@ export type ReadErrorOnlyErrorDetail = export class ReadErrorOnlyError extends ResponseError { readonly detail: ReadErrorOnlyErrorDetail; - constructor(response: Response, detail: ReadErrorOnlyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadErrorOnlyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -67,7 +71,9 @@ export type ReadMixedErrorDetail = export class ReadMixedError extends ResponseError { readonly detail: ReadMixedErrorDetail; - constructor(response: Response, detail: ReadMixedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadMixedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -79,7 +85,9 @@ export type ReadSuccessOnlyErrorDetail = export class ReadSuccessOnlyError extends ResponseError { readonly detail: ReadSuccessOnlyErrorDetail; - constructor(response: Response, detail: ReadSuccessOnlyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadSuccessOnlyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -93,13 +101,14 @@ export type ReadWildcardsErrorDetail = export class ReadWildcardsError extends ResponseError { readonly detail: ReadWildcardsErrorDetail; - constructor(response: Response, detail: ReadWildcardsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadWildcardsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ResponsesApiInterface { readDefaultRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/server-object/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/server-object/apis/DefaultApi.ts.golden index 19783a9c1..87f99b7c2 100644 --- a/tests/golden/typescript/typescript-fetch/server-object/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/server-object/apis/DefaultApi.ts.golden @@ -32,7 +32,9 @@ export type GetAllUsersErrorDetail = export class GetAllUsersError extends ResponseError { readonly detail: GetAllUsersErrorDetail; - constructor(response: Response, detail: GetAllUsersErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetAllUsersErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -45,13 +47,14 @@ export type GetUserByIdErrorDetail = export class GetUserByIdError extends ResponseError { readonly detail: GetUserByIdErrorDetail; - constructor(response: Response, detail: GetUserByIdErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetUserByIdErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getAllUsersRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/server-path-prefix/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/server-path-prefix/apis/DefaultApi.ts.golden index 59e434b7a..ab5dfc208 100644 --- a/tests/golden/typescript/typescript-fetch/server-path-prefix/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/server-path-prefix/apis/DefaultApi.ts.golden @@ -30,7 +30,9 @@ export type HealthCheckErrorDetail = export class HealthCheckError extends ResponseError { readonly detail: HealthCheckErrorDetail; - constructor(response: Response, detail: HealthCheckErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HealthCheckErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -42,7 +44,9 @@ export type ListUsersErrorDetail = export class ListUsersError extends ResponseError { readonly detail: ListUsersErrorDetail; - constructor(response: Response, detail: ListUsersErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ListUsersErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -54,13 +58,14 @@ export type GetUserErrorDetail = export class GetUserError extends ResponseError { readonly detail: GetUserErrorDetail; - constructor(response: Response, detail: GetUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { healthCheckRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-enum-const/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-enum-const/apis/DefaultApi.ts.golden index 4a283f475..dae35e80a 100644 --- a/tests/golden/typescript/typescript-fetch/ts-enum-const/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-enum-const/apis/DefaultApi.ts.golden @@ -18,13 +18,14 @@ export type GetItemsErrorDetail = export class GetItemsError extends ResponseError { readonly detail: GetItemsErrorDetail; - constructor(response: Response, detail: GetItemsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetItemsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getItemsRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; getItems: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-intersection/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-intersection/apis/DefaultApi.ts.golden index ef3473f64..5bf4c8f68 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-intersection/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-intersection/apis/DefaultApi.ts.golden @@ -24,13 +24,14 @@ export type TestIntersectionErrorDetail = export class TestIntersectionError extends ResponseError { readonly detail: TestIntersectionErrorDetail; - constructor(response: Response, detail: TestIntersectionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestIntersectionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testIntersectionRaw: (requestParameters: ApiTestIntersectionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-multipart-parts/apis/MultipartApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-multipart-parts/apis/MultipartApi.ts.golden index bccb766f2..32575a76a 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-multipart-parts/apis/MultipartApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-multipart-parts/apis/MultipartApi.ts.golden @@ -24,13 +24,14 @@ export type SendNestedObjectPartErrorDetail = export class SendNestedObjectPartError extends ResponseError { readonly detail: SendNestedObjectPartErrorDetail; - constructor(response: Response, detail: SendNestedObjectPartErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: SendNestedObjectPartErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface MultipartApiInterface { sendNestedObjectPartRaw: (requestParameters: ApiSendNestedObjectPartRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-dispatch/apis/ResponsesApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-dispatch/apis/ResponsesApi.ts.golden index b07f3532b..95d19bb74 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-dispatch/apis/ResponsesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-dispatch/apis/ResponsesApi.ts.golden @@ -36,7 +36,9 @@ export type ReadDefaultErrorDetail = export class ReadDefaultError extends ResponseError { readonly detail: ReadDefaultErrorDetail; - constructor(response: Response, detail: ReadDefaultErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadDefaultErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -49,7 +51,9 @@ export type ReadErrorOnlyErrorDetail = export class ReadErrorOnlyError extends ResponseError { readonly detail: ReadErrorOnlyErrorDetail; - constructor(response: Response, detail: ReadErrorOnlyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadErrorOnlyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -68,7 +72,9 @@ export type ReadMixedErrorDetail = export class ReadMixedError extends ResponseError { readonly detail: ReadMixedErrorDetail; - constructor(response: Response, detail: ReadMixedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadMixedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -80,7 +86,9 @@ export type ReadSuccessOnlyErrorDetail = export class ReadSuccessOnlyError extends ResponseError { readonly detail: ReadSuccessOnlyErrorDetail; - constructor(response: Response, detail: ReadSuccessOnlyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadSuccessOnlyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -94,13 +102,14 @@ export type ReadWildcardsErrorDetail = export class ReadWildcardsError extends ResponseError { readonly detail: ReadWildcardsErrorDetail; - constructor(response: Response, detail: ReadWildcardsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: ReadWildcardsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ResponsesApiInterface { readDefaultRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-only-types/apis/TestResourceApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-only-types/apis/TestResourceApi.ts.golden index 9c4b5aa4e..d8b5d36bb 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-only-types/apis/TestResourceApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-response-only-types/apis/TestResourceApi.ts.golden @@ -40,7 +40,9 @@ export type CreateTestResourceErrorDetail = export class CreateTestResourceError extends ResponseError { readonly detail: CreateTestResourceErrorDetail; - constructor(response: Response, detail: CreateTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -54,13 +56,14 @@ export type DeleteTestResourceErrorDetail = export class DeleteTestResourceError extends ResponseError { readonly detail: DeleteTestResourceErrorDetail; - constructor(response: Response, detail: DeleteTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TestResourceApiInterface { createTestResourceRaw: (requestParameters: ApiCreateTestResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-plain-internal/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-plain-internal/apis/DefaultApi.ts.golden index 5fede1013..6023585ca 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-plain-internal/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-plain-internal/apis/DefaultApi.ts.golden @@ -25,13 +25,14 @@ export type PreviewErrorDetail = export class PreviewError extends ResponseError { readonly detail: PreviewErrorDetail; - constructor(response: Response, detail: PreviewErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PreviewErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { previewRaw: (requestParameters: ApiPreviewRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-variant-with-discriminator/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-variant-with-discriminator/apis/DefaultApi.ts.golden index bef2df360..6e58335b2 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-variant-with-discriminator/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union-variant-with-discriminator/apis/DefaultApi.ts.golden @@ -27,13 +27,14 @@ export type CreateSetupErrorDetail = export class CreateSetupError extends ResponseError { readonly detail: CreateSetupErrorDetail; - constructor(response: Response, detail: CreateSetupErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateSetupErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createSetupRaw: (requestParameters: ApiCreateSetupRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union/apis/DefaultApi.ts.golden index 9971ee612..0506144e0 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-tagged-union/apis/DefaultApi.ts.golden @@ -25,13 +25,14 @@ export type CreateContainerErrorDetail = export class CreateContainerError extends ResponseError { readonly detail: CreateContainerErrorDetail; - constructor(response: Response, detail: CreateContainerErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateContainerErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createContainerRaw: (requestParameters: ApiCreateContainerRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-union/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-union/apis/DefaultApi.ts.golden index a7144f69b..c3e520c6b 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-union/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case-union/apis/DefaultApi.ts.golden @@ -24,13 +24,14 @@ export type TestUnionErrorDetail = export class TestUnionError extends ResponseError { readonly detail: TestUnionErrorDetail; - constructor(response: Response, detail: TestUnionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestUnionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testUnionRaw: (requestParameters: ApiTestUnionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case/apis/DefaultApi.ts.golden index 6fc5cd4ab..a8d87182d 100644 --- a/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-property-naming-camel-case/apis/DefaultApi.ts.golden @@ -43,7 +43,9 @@ export type GetWithQueryParamsErrorDetail = export class GetWithQueryParamsError extends ResponseError { readonly detail: GetWithQueryParamsErrorDetail; - constructor(response: Response, detail: GetWithQueryParamsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetWithQueryParamsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -55,13 +57,14 @@ export type TestNamingConventionsErrorDetail = export class TestNamingConventionsError extends ResponseError { readonly detail: TestNamingConventionsErrorDetail; - constructor(response: Response, detail: TestNamingConventionsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestNamingConventionsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getWithQueryParamsRaw: (requestParameters: ApiGetWithQueryParamsRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-camel-case-tagged-nullable-unions/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-camel-case-tagged-nullable-unions/apis/DefaultApi.ts.golden index e442da197..caf5beaaf 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-camel-case-tagged-nullable-unions/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-camel-case-tagged-nullable-unions/apis/DefaultApi.ts.golden @@ -24,13 +24,14 @@ export type CreateFooEnvelopeErrorDetail = export class CreateFooEnvelopeError extends ResponseError { readonly detail: CreateFooEnvelopeErrorDetail; - constructor(response: Response, detail: CreateFooEnvelopeErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateFooEnvelopeErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createFooEnvelopeRaw: (requestParameters: ApiCreateFooEnvelopeRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-comprehensive/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-comprehensive/apis/DefaultApi.ts.golden index cbaf4610c..47c451637 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-comprehensive/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-comprehensive/apis/DefaultApi.ts.golden @@ -18,13 +18,13 @@ export type TestErrorDetail = export class TestError extends ResponseError { readonly detail: TestErrorDetail; - constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; test: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-delete-response/apis/TestResourceApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-delete-response/apis/TestResourceApi.ts.golden index 9c4b5aa4e..d8b5d36bb 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-delete-response/apis/TestResourceApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-delete-response/apis/TestResourceApi.ts.golden @@ -40,7 +40,9 @@ export type CreateTestResourceErrorDetail = export class CreateTestResourceError extends ResponseError { readonly detail: CreateTestResourceErrorDetail; - constructor(response: Response, detail: CreateTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -54,13 +56,14 @@ export type DeleteTestResourceErrorDetail = export class DeleteTestResourceError extends ResponseError { readonly detail: DeleteTestResourceErrorDetail; - constructor(response: Response, detail: DeleteTestResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteTestResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface TestResourceApiInterface { createTestResourceRaw: (requestParameters: ApiCreateTestResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-enum-repr/apis/EnumReprApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-enum-repr/apis/EnumReprApi.ts.golden index 01261daeb..c122fa9be 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-enum-repr/apis/EnumReprApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-enum-repr/apis/EnumReprApi.ts.golden @@ -60,7 +60,9 @@ export type HandleAdjacentlyTaggedErrorDetail = export class HandleAdjacentlyTaggedError extends ResponseError { readonly detail: HandleAdjacentlyTaggedErrorDetail; - constructor(response: Response, detail: HandleAdjacentlyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleAdjacentlyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -73,7 +75,9 @@ export type HandleExternallyTaggedErrorDetail = export class HandleExternallyTaggedError extends ResponseError { readonly detail: HandleExternallyTaggedErrorDetail; - constructor(response: Response, detail: HandleExternallyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleExternallyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -86,7 +90,9 @@ export type HandleInternallyTaggedErrorDetail = export class HandleInternallyTaggedError extends ResponseError { readonly detail: HandleInternallyTaggedErrorDetail; - constructor(response: Response, detail: HandleInternallyTaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleInternallyTaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -99,7 +105,9 @@ export type HandleMixedErrorDetail = export class HandleMixedError extends ResponseError { readonly detail: HandleMixedErrorDetail; - constructor(response: Response, detail: HandleMixedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleMixedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -112,13 +120,14 @@ export type HandleUntaggedErrorDetail = export class HandleUntaggedError extends ResponseError { readonly detail: HandleUntaggedErrorDetail; - constructor(response: Response, detail: HandleUntaggedErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleUntaggedErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface EnumReprApiInterface { handleAdjacentlyTaggedRaw: (requestParameters: ApiHandleAdjacentlyTaggedRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/PetApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/PetApi.ts.golden index c8553744f..1246ec2b2 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/PetApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/PetApi.ts.golden @@ -113,7 +113,9 @@ export type UpdatePetErrorDetail = export class UpdatePetError extends ResponseError { readonly detail: UpdatePetErrorDetail; - constructor(response: Response, detail: UpdatePetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdatePetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -127,7 +129,8 @@ export type AddPetErrorDetail = export class AddPetError extends ResponseError { readonly detail: AddPetErrorDetail; - constructor(response: Response, detail: AddPetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: AddPetErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -140,7 +143,9 @@ export type FindPetsByStatusErrorDetail = export class FindPetsByStatusError extends ResponseError { readonly detail: FindPetsByStatusErrorDetail; - constructor(response: Response, detail: FindPetsByStatusErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: FindPetsByStatusErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -153,7 +158,9 @@ export type FindPetsByTagsErrorDetail = export class FindPetsByTagsError extends ResponseError { readonly detail: FindPetsByTagsErrorDetail; - constructor(response: Response, detail: FindPetsByTagsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: FindPetsByTagsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -167,7 +174,9 @@ export type GetPetByIdErrorDetail = export class GetPetByIdError extends ResponseError { readonly detail: GetPetByIdErrorDetail; - constructor(response: Response, detail: GetPetByIdErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetPetByIdErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -180,7 +189,9 @@ export type UpdatePetWithFormErrorDetail = export class UpdatePetWithFormError extends ResponseError { readonly detail: UpdatePetWithFormErrorDetail; - constructor(response: Response, detail: UpdatePetWithFormErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdatePetWithFormErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -193,7 +204,9 @@ export type DeletePetErrorDetail = export class DeletePetError extends ResponseError { readonly detail: DeletePetErrorDetail; - constructor(response: Response, detail: DeletePetErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeletePetErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -205,13 +218,14 @@ export type UploadFileErrorDetail = export class UploadFileError extends ResponseError { readonly detail: UploadFileErrorDetail; - constructor(response: Response, detail: UploadFileErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UploadFileErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface PetApiInterface { updatePetRaw: (requestParameters: ApiUpdatePetRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/StoreApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/StoreApi.ts.golden index cadc0fe4c..9e891d26b 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/StoreApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/StoreApi.ts.golden @@ -49,7 +49,9 @@ export type GetInventoryErrorDetail = export class GetInventoryError extends ResponseError { readonly detail: GetInventoryErrorDetail; - constructor(response: Response, detail: GetInventoryErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetInventoryErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -62,7 +64,9 @@ export type PlaceOrderErrorDetail = export class PlaceOrderError extends ResponseError { readonly detail: PlaceOrderErrorDetail; - constructor(response: Response, detail: PlaceOrderErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: PlaceOrderErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -76,7 +80,9 @@ export type GetOrderByIdErrorDetail = export class GetOrderByIdError extends ResponseError { readonly detail: GetOrderByIdErrorDetail; - constructor(response: Response, detail: GetOrderByIdErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetOrderByIdErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -90,13 +96,14 @@ export type DeleteOrderErrorDetail = export class DeleteOrderError extends ResponseError { readonly detail: DeleteOrderErrorDetail; - constructor(response: Response, detail: DeleteOrderErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteOrderErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface StoreApiInterface { getInventoryRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/UserApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/UserApi.ts.golden index f64223349..44b0a06d4 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/UserApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-petstore/apis/UserApi.ts.golden @@ -84,7 +84,9 @@ export type CreateUserErrorDetail = export class CreateUserError extends ResponseError { readonly detail: CreateUserErrorDetail; - constructor(response: Response, detail: CreateUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -96,7 +98,9 @@ export type CreateUsersWithListInputErrorDetail = export class CreateUsersWithListInputError extends ResponseError { readonly detail: CreateUsersWithListInputErrorDetail; - constructor(response: Response, detail: CreateUsersWithListInputErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateUsersWithListInputErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -109,7 +113,9 @@ export type LoginUserErrorDetail = export class LoginUserError extends ResponseError { readonly detail: LoginUserErrorDetail; - constructor(response: Response, detail: LoginUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: LoginUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -121,7 +127,9 @@ export type LogoutUserErrorDetail = export class LogoutUserError extends ResponseError { readonly detail: LogoutUserErrorDetail; - constructor(response: Response, detail: LogoutUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: LogoutUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -135,7 +143,9 @@ export type GetUserByNameErrorDetail = export class GetUserByNameError extends ResponseError { readonly detail: GetUserByNameErrorDetail; - constructor(response: Response, detail: GetUserByNameErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetUserByNameErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -149,7 +159,9 @@ export type UpdateUserErrorDetail = export class UpdateUserError extends ResponseError { readonly detail: UpdateUserErrorDetail; - constructor(response: Response, detail: UpdateUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: UpdateUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -163,13 +175,14 @@ export type DeleteUserErrorDetail = export class DeleteUserError extends ResponseError { readonly detail: DeleteUserErrorDetail; - constructor(response: Response, detail: DeleteUserErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: DeleteUserErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface UserApiInterface { createUserRaw: (requestParameters: ApiCreateUserRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-self-referential-object/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-self-referential-object/apis/DefaultApi.ts.golden index 48ada1543..3bf11af03 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-self-referential-object/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp-self-referential-object/apis/DefaultApi.ts.golden @@ -19,13 +19,13 @@ export type GetFooErrorDetail = export class GetFooError extends ResponseError { readonly detail: GetFooErrorDetail; - constructor(response: Response, detail: GetFooErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetFooErrorDetail, msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { getFooRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; getFoo: (initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp/apis/DefaultApi.ts.golden index 9971ee612..0506144e0 100644 --- a/tests/golden/typescript/typescript-fetch/ts-toolchain-vp/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-toolchain-vp/apis/DefaultApi.ts.golden @@ -25,13 +25,14 @@ export type CreateContainerErrorDetail = export class CreateContainerError extends ResponseError { readonly detail: CreateContainerErrorDetail; - constructor(response: Response, detail: CreateContainerErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateContainerErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createContainerRaw: (requestParameters: ApiCreateContainerRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/ts-type-guards/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/ts-type-guards/apis/DefaultApi.ts.golden index 994da1825..eb4036c75 100644 --- a/tests/golden/typescript/typescript-fetch/ts-type-guards/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/ts-type-guards/apis/DefaultApi.ts.golden @@ -22,13 +22,14 @@ export type HandleEventErrorDetail = export class HandleEventError extends ResponseError { readonly detail: HandleEventErrorDetail; - constructor(response: Response, detail: HandleEventErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: HandleEventErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { handleEventRaw: (requestParameters: ApiHandleEventRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-complex-union/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-complex-union/apis/DefaultApi.ts.golden index da4e24bdc..0af5df24f 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-complex-union/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-complex-union/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestComplexUnionErrorDetail = export class TestComplexUnionError extends ResponseError { readonly detail: TestComplexUnionErrorDetail; - constructor(response: Response, detail: TestComplexUnionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestComplexUnionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testComplexUnionRaw: (requestParameters: ApiTestComplexUnionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-inline-discriminator-only/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-inline-discriminator-only/apis/DefaultApi.ts.golden index 2f0c49e26..6d105bdc2 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-inline-discriminator-only/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-inline-discriminator-only/apis/DefaultApi.ts.golden @@ -32,13 +32,14 @@ export type CreateEventErrorDetail = export class CreateEventError extends ResponseError { readonly detail: CreateEventErrorDetail; - constructor(response: Response, detail: CreateEventErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateEventErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createEventRaw: (requestParameters: ApiCreateEventRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-internally-tagged/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-internally-tagged/apis/DefaultApi.ts.golden index bc68898af..745d7deaa 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-internally-tagged/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-internally-tagged/apis/DefaultApi.ts.golden @@ -25,13 +25,14 @@ export type CreateResourceErrorDetail = export class CreateResourceError extends ResponseError { readonly detail: CreateResourceErrorDetail; - constructor(response: Response, detail: CreateResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createResourceRaw: (requestParameters: ApiCreateResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-long-names/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-long-names/apis/DefaultApi.ts.golden index 5933bf670..ceb254be4 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-long-names/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-long-names/apis/DefaultApi.ts.golden @@ -25,13 +25,14 @@ export type CreateResourceErrorDetail = export class CreateResourceError extends ResponseError { readonly detail: CreateResourceErrorDetail; - constructor(response: Response, detail: CreateResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createResourceRaw: (requestParameters: ApiCreateResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-mixed-unit-and-allof/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-mixed-unit-and-allof/apis/DefaultApi.ts.golden index 15afe4ddf..eceef0ffc 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-mixed-unit-and-allof/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-mixed-unit-and-allof/apis/DefaultApi.ts.golden @@ -28,13 +28,14 @@ export type CreateResourceErrorDetail = export class CreateResourceError extends ResponseError { readonly detail: CreateResourceErrorDetail; - constructor(response: Response, detail: CreateResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createResourceRaw: (requestParameters: ApiCreateResourceRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-multiple/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-multiple/apis/DefaultApi.ts.golden index e421b2491..851b035a7 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-multiple/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-multiple/apis/DefaultApi.ts.golden @@ -35,7 +35,9 @@ export type CreateContainerErrorDetail = export class CreateContainerError extends ResponseError { readonly detail: CreateContainerErrorDetail; - constructor(response: Response, detail: CreateContainerErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateContainerErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -47,13 +49,14 @@ export type CreateVolumeErrorDetail = export class CreateVolumeError extends ResponseError { readonly detail: CreateVolumeErrorDetail; - constructor(response: Response, detail: CreateVolumeErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateVolumeErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createContainerRaw: (requestParameters: ApiCreateContainerRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-with-refs/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-with-refs/apis/DefaultApi.ts.golden index fa32944ae..4f4e55e81 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-with-refs/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-discriminated-union-with-refs/apis/DefaultApi.ts.golden @@ -24,13 +24,14 @@ export type CreateContainerErrorDetail = export class CreateContainerError extends ResponseError { readonly detail: CreateContainerErrorDetail; - constructor(response: Response, detail: CreateContainerErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateContainerErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createContainerRaw: (requestParameters: ApiCreateContainerRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-intersection-allof/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-intersection-allof/apis/DefaultApi.ts.golden index 6eeabd3fa..c8fdf5fcf 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-intersection-allof/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-intersection-allof/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestIntersectionErrorDetail = export class TestIntersectionError extends ResponseError { readonly detail: TestIntersectionErrorDetail; - constructor(response: Response, detail: TestIntersectionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestIntersectionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testIntersectionRaw: (requestParameters: ApiTestIntersectionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-intersection-with-nullable-reference/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-intersection-with-nullable-reference/apis/DefaultApi.ts.golden index 8d8d74105..b70ed6bf5 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-intersection-with-nullable-reference/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-intersection-with-nullable-reference/apis/DefaultApi.ts.golden @@ -31,7 +31,9 @@ export type CreateTestErrorDetail = export class CreateTestError extends ResponseError { readonly detail: CreateTestErrorDetail; - constructor(response: Response, detail: CreateTestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateTestErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -43,13 +45,14 @@ export type GetTestErrorDetail = export class GetTestError extends ResponseError { readonly detail: GetTestErrorDetail; - constructor(response: Response, detail: GetTestErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: GetTestErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { createTestRaw: (requestParameters: ApiCreateTestRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-nested-union/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-nested-union/apis/DefaultApi.ts.golden index 52dd8e7fd..16c117e46 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-nested-union/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-nested-union/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestNestedUnionErrorDetail = export class TestNestedUnionError extends ResponseError { readonly detail: TestNestedUnionErrorDetail; - constructor(response: Response, detail: TestNestedUnionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestNestedUnionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testNestedUnionRaw: (requestParameters: ApiTestNestedUnionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-simple-type-alias/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-simple-type-alias/apis/DefaultApi.ts.golden index 228c311a9..b8f68b6c5 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-simple-type-alias/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-simple-type-alias/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestSimpleAliasErrorDetail = export class TestSimpleAliasError extends ResponseError { readonly detail: TestSimpleAliasErrorDetail; - constructor(response: Response, detail: TestSimpleAliasErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestSimpleAliasErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testSimpleAliasRaw: (requestParameters: ApiTestSimpleAliasRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-union-mixed/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-union-mixed/apis/DefaultApi.ts.golden index 632c55d39..dfe4a5a48 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-union-mixed/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-union-mixed/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestMixedUnionErrorDetail = export class TestMixedUnionError extends ResponseError { readonly detail: TestMixedUnionErrorDetail; - constructor(response: Response, detail: TestMixedUnionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestMixedUnionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testMixedUnionRaw: (requestParameters: ApiTestMixedUnionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-any/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-any/apis/DefaultApi.ts.golden index fa731418e..1fed80700 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-any/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-any/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestUnionWithAnyErrorDetail = export class TestUnionWithAnyError extends ResponseError { readonly detail: TestUnionWithAnyErrorDetail; - constructor(response: Response, detail: TestUnionWithAnyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestUnionWithAnyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testUnionWithAnyRaw: (requestParameters: ApiTestUnionWithAnyRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-inline-objects/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-inline-objects/apis/DefaultApi.ts.golden index e3c2f80b3..cc14caa29 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-inline-objects/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-inline-objects/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestUnionWithInlineObjectsErrorDetail = export class TestUnionWithInlineObjectsError extends ResponseError { readonly detail: TestUnionWithInlineObjectsErrorDetail; - constructor(response: Response, detail: TestUnionWithInlineObjectsErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestUnionWithInlineObjectsErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testUnionWithInlineObjectsRaw: (requestParameters: ApiTestUnionWithInlineObjectsRequest, initOverrides?: RequestInit diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-interfaces/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-interfaces/apis/DefaultApi.ts.golden index 4442ed1f2..937c6bbaf 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-interfaces/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-interfaces/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestUnionErrorDetail = export class TestUnionError extends ResponseError { readonly detail: TestUnionErrorDetail; - constructor(response: Response, detail: TestUnionErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestUnionErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testUnionRaw: (requestParameters: ApiTestUnionRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-primitives/apis/DefaultApi.ts.golden b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-primitives/apis/DefaultApi.ts.golden index c8b84d323..90993fd52 100644 --- a/tests/golden/typescript/typescript-fetch/type-aliases-union-with-primitives/apis/DefaultApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/type-aliases-union-with-primitives/apis/DefaultApi.ts.golden @@ -23,13 +23,14 @@ export type TestUnionPrimitivesErrorDetail = export class TestUnionPrimitivesError extends ResponseError { readonly detail: TestUnionPrimitivesErrorDetail; - constructor(response: Response, detail: TestUnionPrimitivesErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: TestUnionPrimitivesErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface DefaultApiInterface { testUnionPrimitivesRaw: (requestParameters: ApiTestUnionPrimitivesRequest, initOverrides?: RequestInit | InitOverrideFunction) => Promise; diff --git a/tests/golden/typescript/typescript-fetch/typed-error-responses/apis/ResourcesApi.ts.golden b/tests/golden/typescript/typescript-fetch/typed-error-responses/apis/ResourcesApi.ts.golden index 64442112d..144f27da5 100644 --- a/tests/golden/typescript/typescript-fetch/typed-error-responses/apis/ResourcesApi.ts.golden +++ b/tests/golden/typescript/typescript-fetch/typed-error-responses/apis/ResourcesApi.ts.golden @@ -63,7 +63,9 @@ export type CheckNoSuccessBodyErrorDetail = export class CheckNoSuccessBodyError extends ResponseError { readonly detail: CheckNoSuccessBodyErrorDetail; - constructor(response: Response, detail: CheckNoSuccessBodyErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CheckNoSuccessBodyErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -87,7 +89,9 @@ export type CreateResourceErrorDetail = export class CreateResourceError extends ResponseError { readonly detail: CreateResourceErrorDetail; - constructor(response: Response, detail: CreateResourceErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateResourceErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } @@ -141,13 +145,14 @@ export type CreateResourceWithWildcardSuccessErrorDetail = export class CreateResourceWithWildcardSuccessError extends ResponseError { readonly detail: CreateResourceWithWildcardSuccessErrorDetail; - constructor(response: Response, detail: CreateResourceWithWildcardSuccessErrorDetail, msg = 'Response returned an error code') { + constructor(response: Response, detail: CreateResourceWithWildcardSuccessErrorDetail, + msg = 'Response returned an error code' + ) { super(response, msg); this.detail = detail; } } - export interface ResourcesApiInterface { checkNoSuccessBodyRaw: (initOverrides?: RequestInit | InitOverrideFunction) => Promise;