Removed deprecated code

This commit is contained in:
Ferdi Koomen 2023-04-10 12:40:26 +02:00
parent fa5dd81c94
commit 40cc25dd6d
2 changed files with 138 additions and 148 deletions

View File

@ -69,18 +69,4 @@ describe('bin', () => {
expect(result.stdout.toString()).toContain(`-o, --output <value>`);
expect(result.stderr.toString()).toBe('');
});
it('should still support the deprecated --postfix parameter', () => {
const result = crossSpawn.sync('node', [
'./bin/index.js',
'--input',
'./test/spec/v3.json',
'--output',
'./test/generated/bin',
'--postfix',
'Service',
]);
expect(result.stdout.toString()).toBe('');
expect(result.stderr.toString()).toBe('');
});
});

View File

@ -87,15 +87,13 @@ export interface OnCancel {
}
export class CancelablePromise<T> implements Promise<T> {
readonly [Symbol.toStringTag]!: string;
private _isResolved: boolean;
private _isRejected: boolean;
private _isCancelled: boolean;
private readonly _cancelHandlers: (() => void)[];
private readonly _promise: Promise<T>;
private _resolve?: (value: T | PromiseLike<T>) => void;
private _reject?: (reason?: any) => void;
#isResolved: boolean;
#isRejected: boolean;
#isCancelled: boolean;
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;
constructor(
executor: (
@ -151,6 +149,10 @@ export class CancelablePromise<T> implements Promise<T> {
});
}
get [Symbol.toStringTag]() {
return "Cancellable Promise";
}
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
@ -549,54 +551,54 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';
export type { _default as _defaultDto } from './models/_default';
export type { ArrayWithArray as ArrayWithArrayDto } from './models/ArrayWithArray';
export type { ArrayWithBooleans as ArrayWithBooleansDto } from './models/ArrayWithBooleans';
export type { ArrayWithNumbers as ArrayWithNumbersDto } from './models/ArrayWithNumbers';
export type { ArrayWithProperties as ArrayWithPropertiesDto } from './models/ArrayWithProperties';
export type { ArrayWithReferences as ArrayWithReferencesDto } from './models/ArrayWithReferences';
export type { ArrayWithStrings as ArrayWithStringsDto } from './models/ArrayWithStrings';
export type { CommentWithBackticks as CommentWithBackticksDto } from './models/CommentWithBackticks';
export type { CommentWithBreaks as CommentWithBreaksDto } from './models/CommentWithBreaks';
export type { CommentWithExpressionPlaceholders as CommentWithExpressionPlaceholdersDto } from './models/CommentWithExpressionPlaceholders';
export type { CommentWithQuotes as CommentWithQuotesDto } from './models/CommentWithQuotes';
export type { CommentWithReservedCharacters as CommentWithReservedCharactersDto } from './models/CommentWithReservedCharacters';
export type { CommentWithSlashes as CommentWithSlashesDto } from './models/CommentWithSlashes';
export type { Date as DateDto } from './models/Date';
export type { DictionaryWithArray as DictionaryWithArrayDto } from './models/DictionaryWithArray';
export type { DictionaryWithDictionary as DictionaryWithDictionaryDto } from './models/DictionaryWithDictionary';
export type { DictionaryWithProperties as DictionaryWithPropertiesDto } from './models/DictionaryWithProperties';
export type { DictionaryWithReference as DictionaryWithReferenceDto } from './models/DictionaryWithReference';
export type { DictionaryWithString as DictionaryWithStringDto } from './models/DictionaryWithString';
export type { EnumFromDescription as EnumFromDescriptionDto } from './models/EnumFromDescription';
export { EnumWithExtensions as EnumWithExtensionsDto } from './models/EnumWithExtensions';
export { EnumWithNumbers as EnumWithNumbersDto } from './models/EnumWithNumbers';
export { EnumWithStrings as EnumWithStringsDto } from './models/EnumWithStrings';
export type { ModelThatExtends as ModelThatExtendsDto } from './models/ModelThatExtends';
export type { ModelThatExtendsExtends as ModelThatExtendsExtendsDto } from './models/ModelThatExtendsExtends';
export type { ModelWithArray as ModelWithArrayDto } from './models/ModelWithArray';
export type { ModelWithBoolean as ModelWithBooleanDto } from './models/ModelWithBoolean';
export type { ModelWithCircularReference as ModelWithCircularReferenceDto } from './models/ModelWithCircularReference';
export type { ModelWithDictionary as ModelWithDictionaryDto } from './models/ModelWithDictionary';
export type { ModelWithDuplicateImports as ModelWithDuplicateImportsDto } from './models/ModelWithDuplicateImports';
export type { ModelWithDuplicateProperties as ModelWithDuplicatePropertiesDto } from './models/ModelWithDuplicateProperties';
export { ModelWithEnum as ModelWithEnumDto } from './models/ModelWithEnum';
export type { ModelWithEnumFromDescription as ModelWithEnumFromDescriptionDto } from './models/ModelWithEnumFromDescription';
export type { ModelWithInteger as ModelWithIntegerDto } from './models/ModelWithInteger';
export type { ModelWithNestedEnums as ModelWithNestedEnumsDto } from './models/ModelWithNestedEnums';
export type { ModelWithNestedProperties as ModelWithNestedPropertiesDto } from './models/ModelWithNestedProperties';
export type { ModelWithNullableString as ModelWithNullableStringDto } from './models/ModelWithNullableString';
export type { ModelWithOrderedProperties as ModelWithOrderedPropertiesDto } from './models/ModelWithOrderedProperties';
export type { ModelWithPattern as ModelWithPatternDto } from './models/ModelWithPattern';
export type { ModelWithProperties as ModelWithPropertiesDto } from './models/ModelWithProperties';
export type { ModelWithReference as ModelWithReferenceDto } from './models/ModelWithReference';
export type { ModelWithString as ModelWithStringDto } from './models/ModelWithString';
export type { SimpleBoolean as SimpleBooleanDto } from './models/SimpleBoolean';
export type { SimpleFile as SimpleFileDto } from './models/SimpleFile';
export type { SimpleInteger as SimpleIntegerDto } from './models/SimpleInteger';
export type { SimpleReference as SimpleReferenceDto } from './models/SimpleReference';
export type { SimpleString as SimpleStringDto } from './models/SimpleString';
export type { SimpleStringWithPattern as SimpleStringWithPatternDto } from './models/SimpleStringWithPattern';
export type { _default } from './models/_default';
export type { ArrayWithArray } from './models/ArrayWithArray';
export type { ArrayWithBooleans } from './models/ArrayWithBooleans';
export type { ArrayWithNumbers } from './models/ArrayWithNumbers';
export type { ArrayWithProperties } from './models/ArrayWithProperties';
export type { ArrayWithReferences } from './models/ArrayWithReferences';
export type { ArrayWithStrings } from './models/ArrayWithStrings';
export type { CommentWithBackticks } from './models/CommentWithBackticks';
export type { CommentWithBreaks } from './models/CommentWithBreaks';
export type { CommentWithExpressionPlaceholders } from './models/CommentWithExpressionPlaceholders';
export type { CommentWithQuotes } from './models/CommentWithQuotes';
export type { CommentWithReservedCharacters } from './models/CommentWithReservedCharacters';
export type { CommentWithSlashes } from './models/CommentWithSlashes';
export type { Date } from './models/Date';
export type { DictionaryWithArray } from './models/DictionaryWithArray';
export type { DictionaryWithDictionary } from './models/DictionaryWithDictionary';
export type { DictionaryWithProperties } from './models/DictionaryWithProperties';
export type { DictionaryWithReference } from './models/DictionaryWithReference';
export type { DictionaryWithString } from './models/DictionaryWithString';
export type { EnumFromDescription } from './models/EnumFromDescription';
export { EnumWithExtensions } from './models/EnumWithExtensions';
export { EnumWithNumbers } from './models/EnumWithNumbers';
export { EnumWithStrings } from './models/EnumWithStrings';
export type { ModelThatExtends } from './models/ModelThatExtends';
export type { ModelThatExtendsExtends } from './models/ModelThatExtendsExtends';
export type { ModelWithArray } from './models/ModelWithArray';
export type { ModelWithBoolean } from './models/ModelWithBoolean';
export type { ModelWithCircularReference } from './models/ModelWithCircularReference';
export type { ModelWithDictionary } from './models/ModelWithDictionary';
export type { ModelWithDuplicateImports } from './models/ModelWithDuplicateImports';
export type { ModelWithDuplicateProperties } from './models/ModelWithDuplicateProperties';
export { ModelWithEnum } from './models/ModelWithEnum';
export type { ModelWithEnumFromDescription } from './models/ModelWithEnumFromDescription';
export type { ModelWithInteger } from './models/ModelWithInteger';
export type { ModelWithNestedEnums } from './models/ModelWithNestedEnums';
export type { ModelWithNestedProperties } from './models/ModelWithNestedProperties';
export type { ModelWithNullableString } from './models/ModelWithNullableString';
export type { ModelWithOrderedProperties } from './models/ModelWithOrderedProperties';
export type { ModelWithPattern } from './models/ModelWithPattern';
export type { ModelWithProperties } from './models/ModelWithProperties';
export type { ModelWithReference } from './models/ModelWithReference';
export type { ModelWithString } from './models/ModelWithString';
export type { SimpleBoolean } from './models/SimpleBoolean';
export type { SimpleFile } from './models/SimpleFile';
export type { SimpleInteger } from './models/SimpleInteger';
export type { SimpleReference } from './models/SimpleReference';
export type { SimpleString } from './models/SimpleString';
export type { SimpleStringWithPattern } from './models/SimpleStringWithPattern';
export { $_default } from './schemas/$_default';
export { $ArrayWithArray } from './schemas/$ArrayWithArray';
@ -3180,15 +3182,13 @@ export interface OnCancel {
}
export class CancelablePromise<T> implements Promise<T> {
readonly [Symbol.toStringTag]!: string;
private _isResolved: boolean;
private _isRejected: boolean;
private _isCancelled: boolean;
private readonly _cancelHandlers: (() => void)[];
private readonly _promise: Promise<T>;
private _resolve?: (value: T | PromiseLike<T>) => void;
private _reject?: (reason?: any) => void;
#isResolved: boolean;
#isRejected: boolean;
#isCancelled: boolean;
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;
constructor(
executor: (
@ -3244,6 +3244,10 @@ export class CancelablePromise<T> implements Promise<T> {
});
}
get [Symbol.toStringTag]() {
return "Cancellable Promise";
}
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
@ -3642,74 +3646,74 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';
export type { _default as _defaultDto } from './models/_default';
export type { ArrayWithArray as ArrayWithArrayDto } from './models/ArrayWithArray';
export type { ArrayWithBooleans as ArrayWithBooleansDto } from './models/ArrayWithBooleans';
export type { ArrayWithNumbers as ArrayWithNumbersDto } from './models/ArrayWithNumbers';
export type { ArrayWithProperties as ArrayWithPropertiesDto } from './models/ArrayWithProperties';
export type { ArrayWithReferences as ArrayWithReferencesDto } from './models/ArrayWithReferences';
export type { ArrayWithStrings as ArrayWithStringsDto } from './models/ArrayWithStrings';
export type { CommentWithBackticks as CommentWithBackticksDto } from './models/CommentWithBackticks';
export type { CommentWithBreaks as CommentWithBreaksDto } from './models/CommentWithBreaks';
export type { CommentWithExpressionPlaceholders as CommentWithExpressionPlaceholdersDto } from './models/CommentWithExpressionPlaceholders';
export type { CommentWithQuotes as CommentWithQuotesDto } from './models/CommentWithQuotes';
export type { CommentWithReservedCharacters as CommentWithReservedCharactersDto } from './models/CommentWithReservedCharacters';
export type { CommentWithSlashes as CommentWithSlashesDto } from './models/CommentWithSlashes';
export type { CompositionBaseModel as CompositionBaseModelDto } from './models/CompositionBaseModel';
export type { CompositionExtendedModel as CompositionExtendedModelDto } from './models/CompositionExtendedModel';
export type { CompositionWithAllOfAndNullable as CompositionWithAllOfAndNullableDto } from './models/CompositionWithAllOfAndNullable';
export type { CompositionWithAnyOf as CompositionWithAnyOfDto } from './models/CompositionWithAnyOf';
export type { CompositionWithAnyOfAndNullable as CompositionWithAnyOfAndNullableDto } from './models/CompositionWithAnyOfAndNullable';
export type { CompositionWithAnyOfAnonymous as CompositionWithAnyOfAnonymousDto } from './models/CompositionWithAnyOfAnonymous';
export type { CompositionWithOneOf as CompositionWithOneOfDto } from './models/CompositionWithOneOf';
export type { CompositionWithOneOfAndComplexArrayDictionary as CompositionWithOneOfAndComplexArrayDictionaryDto } from './models/CompositionWithOneOfAndComplexArrayDictionary';
export type { CompositionWithOneOfAndNullable as CompositionWithOneOfAndNullableDto } from './models/CompositionWithOneOfAndNullable';
export type { CompositionWithOneOfAndSimpleArrayDictionary as CompositionWithOneOfAndSimpleArrayDictionaryDto } from './models/CompositionWithOneOfAndSimpleArrayDictionary';
export type { CompositionWithOneOfAndSimpleDictionary as CompositionWithOneOfAndSimpleDictionaryDto } from './models/CompositionWithOneOfAndSimpleDictionary';
export type { CompositionWithOneOfAnonymous as CompositionWithOneOfAnonymousDto } from './models/CompositionWithOneOfAnonymous';
export type { CompositionWithOneOfDiscriminator as CompositionWithOneOfDiscriminatorDto } from './models/CompositionWithOneOfDiscriminator';
export type { DeprecatedModel as DeprecatedModelDto } from './models/DeprecatedModel';
export type { DictionaryWithArray as DictionaryWithArrayDto } from './models/DictionaryWithArray';
export type { DictionaryWithDictionary as DictionaryWithDictionaryDto } from './models/DictionaryWithDictionary';
export type { DictionaryWithProperties as DictionaryWithPropertiesDto } from './models/DictionaryWithProperties';
export type { DictionaryWithReference as DictionaryWithReferenceDto } from './models/DictionaryWithReference';
export type { DictionaryWithString as DictionaryWithStringDto } from './models/DictionaryWithString';
export type { EnumFromDescription as EnumFromDescriptionDto } from './models/EnumFromDescription';
export { EnumWithExtensions as EnumWithExtensionsDto } from './models/EnumWithExtensions';
export { EnumWithNumbers as EnumWithNumbersDto } from './models/EnumWithNumbers';
export { EnumWithStrings as EnumWithStringsDto } from './models/EnumWithStrings';
export type { File as FileDto } from './models/File';
export type { FreeFormObjectWithAdditionalPropertiesEqEmptyObject as FreeFormObjectWithAdditionalPropertiesEqEmptyObjectDto } from './models/FreeFormObjectWithAdditionalPropertiesEqEmptyObject';
export type { FreeFormObjectWithAdditionalPropertiesEqTrue as FreeFormObjectWithAdditionalPropertiesEqTrueDto } from './models/FreeFormObjectWithAdditionalPropertiesEqTrue';
export type { FreeFormObjectWithoutAdditionalProperties as FreeFormObjectWithoutAdditionalPropertiesDto } from './models/FreeFormObjectWithoutAdditionalProperties';
export type { ModelCircle as ModelCircleDto } from './models/ModelCircle';
export type { ModelSquare as ModelSquareDto } from './models/ModelSquare';
export type { ModelThatExtends as ModelThatExtendsDto } from './models/ModelThatExtends';
export type { ModelThatExtendsExtends as ModelThatExtendsExtendsDto } from './models/ModelThatExtendsExtends';
export type { ModelWithArray as ModelWithArrayDto } from './models/ModelWithArray';
export type { ModelWithBoolean as ModelWithBooleanDto } from './models/ModelWithBoolean';
export type { ModelWithCircularReference as ModelWithCircularReferenceDto } from './models/ModelWithCircularReference';
export type { ModelWithDictionary as ModelWithDictionaryDto } from './models/ModelWithDictionary';
export type { ModelWithDuplicateImports as ModelWithDuplicateImportsDto } from './models/ModelWithDuplicateImports';
export type { ModelWithDuplicateProperties as ModelWithDuplicatePropertiesDto } from './models/ModelWithDuplicateProperties';
export { ModelWithEnum as ModelWithEnumDto } from './models/ModelWithEnum';
export type { ModelWithEnumFromDescription as ModelWithEnumFromDescriptionDto } from './models/ModelWithEnumFromDescription';
export type { ModelWithInteger as ModelWithIntegerDto } from './models/ModelWithInteger';
export type { ModelWithNestedEnums as ModelWithNestedEnumsDto } from './models/ModelWithNestedEnums';
export type { ModelWithNestedProperties as ModelWithNestedPropertiesDto } from './models/ModelWithNestedProperties';
export type { ModelWithNullableString as ModelWithNullableStringDto } from './models/ModelWithNullableString';
export type { ModelWithOrderedProperties as ModelWithOrderedPropertiesDto } from './models/ModelWithOrderedProperties';
export type { ModelWithPattern as ModelWithPatternDto } from './models/ModelWithPattern';
export type { ModelWithProperties as ModelWithPropertiesDto } from './models/ModelWithProperties';
export type { ModelWithReference as ModelWithReferenceDto } from './models/ModelWithReference';
export type { ModelWithString as ModelWithStringDto } from './models/ModelWithString';
export type { Pageable as PageableDto } from './models/Pageable';
export type { SimpleBoolean as SimpleBooleanDto } from './models/SimpleBoolean';
export type { SimpleFile as SimpleFileDto } from './models/SimpleFile';
export type { SimpleInteger as SimpleIntegerDto } from './models/SimpleInteger';
export type { SimpleReference as SimpleReferenceDto } from './models/SimpleReference';
export type { SimpleString as SimpleStringDto } from './models/SimpleString';
export type { SimpleStringWithPattern as SimpleStringWithPatternDto } from './models/SimpleStringWithPattern';
export type { _default } from './models/_default';
export type { ArrayWithArray } from './models/ArrayWithArray';
export type { ArrayWithBooleans } from './models/ArrayWithBooleans';
export type { ArrayWithNumbers } from './models/ArrayWithNumbers';
export type { ArrayWithProperties } from './models/ArrayWithProperties';
export type { ArrayWithReferences } from './models/ArrayWithReferences';
export type { ArrayWithStrings } from './models/ArrayWithStrings';
export type { CommentWithBackticks } from './models/CommentWithBackticks';
export type { CommentWithBreaks } from './models/CommentWithBreaks';
export type { CommentWithExpressionPlaceholders } from './models/CommentWithExpressionPlaceholders';
export type { CommentWithQuotes } from './models/CommentWithQuotes';
export type { CommentWithReservedCharacters } from './models/CommentWithReservedCharacters';
export type { CommentWithSlashes } from './models/CommentWithSlashes';
export type { CompositionBaseModel } from './models/CompositionBaseModel';
export type { CompositionExtendedModel } from './models/CompositionExtendedModel';
export type { CompositionWithAllOfAndNullable } from './models/CompositionWithAllOfAndNullable';
export type { CompositionWithAnyOf } from './models/CompositionWithAnyOf';
export type { CompositionWithAnyOfAndNullable } from './models/CompositionWithAnyOfAndNullable';
export type { CompositionWithAnyOfAnonymous } from './models/CompositionWithAnyOfAnonymous';
export type { CompositionWithOneOf } from './models/CompositionWithOneOf';
export type { CompositionWithOneOfAndComplexArrayDictionary } from './models/CompositionWithOneOfAndComplexArrayDictionary';
export type { CompositionWithOneOfAndNullable } from './models/CompositionWithOneOfAndNullable';
export type { CompositionWithOneOfAndSimpleArrayDictionary } from './models/CompositionWithOneOfAndSimpleArrayDictionary';
export type { CompositionWithOneOfAndSimpleDictionary } from './models/CompositionWithOneOfAndSimpleDictionary';
export type { CompositionWithOneOfAnonymous } from './models/CompositionWithOneOfAnonymous';
export type { CompositionWithOneOfDiscriminator } from './models/CompositionWithOneOfDiscriminator';
export type { DeprecatedModel } from './models/DeprecatedModel';
export type { DictionaryWithArray } from './models/DictionaryWithArray';
export type { DictionaryWithDictionary } from './models/DictionaryWithDictionary';
export type { DictionaryWithProperties } from './models/DictionaryWithProperties';
export type { DictionaryWithReference } from './models/DictionaryWithReference';
export type { DictionaryWithString } from './models/DictionaryWithString';
export type { EnumFromDescription } from './models/EnumFromDescription';
export { EnumWithExtensions } from './models/EnumWithExtensions';
export { EnumWithNumbers } from './models/EnumWithNumbers';
export { EnumWithStrings } from './models/EnumWithStrings';
export type { File } from './models/File';
export type { FreeFormObjectWithAdditionalPropertiesEqEmptyObject } from './models/FreeFormObjectWithAdditionalPropertiesEqEmptyObject';
export type { FreeFormObjectWithAdditionalPropertiesEqTrue } from './models/FreeFormObjectWithAdditionalPropertiesEqTrue';
export type { FreeFormObjectWithoutAdditionalProperties } from './models/FreeFormObjectWithoutAdditionalProperties';
export type { ModelCircle } from './models/ModelCircle';
export type { ModelSquare } from './models/ModelSquare';
export type { ModelThatExtends } from './models/ModelThatExtends';
export type { ModelThatExtendsExtends } from './models/ModelThatExtendsExtends';
export type { ModelWithArray } from './models/ModelWithArray';
export type { ModelWithBoolean } from './models/ModelWithBoolean';
export type { ModelWithCircularReference } from './models/ModelWithCircularReference';
export type { ModelWithDictionary } from './models/ModelWithDictionary';
export type { ModelWithDuplicateImports } from './models/ModelWithDuplicateImports';
export type { ModelWithDuplicateProperties } from './models/ModelWithDuplicateProperties';
export { ModelWithEnum } from './models/ModelWithEnum';
export type { ModelWithEnumFromDescription } from './models/ModelWithEnumFromDescription';
export type { ModelWithInteger } from './models/ModelWithInteger';
export type { ModelWithNestedEnums } from './models/ModelWithNestedEnums';
export type { ModelWithNestedProperties } from './models/ModelWithNestedProperties';
export type { ModelWithNullableString } from './models/ModelWithNullableString';
export type { ModelWithOrderedProperties } from './models/ModelWithOrderedProperties';
export type { ModelWithPattern } from './models/ModelWithPattern';
export type { ModelWithProperties } from './models/ModelWithProperties';
export type { ModelWithReference } from './models/ModelWithReference';
export type { ModelWithString } from './models/ModelWithString';
export type { Pageable } from './models/Pageable';
export type { SimpleBoolean } from './models/SimpleBoolean';
export type { SimpleFile } from './models/SimpleFile';
export type { SimpleInteger } from './models/SimpleInteger';
export type { SimpleReference } from './models/SimpleReference';
export type { SimpleString } from './models/SimpleString';
export type { SimpleStringWithPattern } from './models/SimpleStringWithPattern';
export { $_default } from './schemas/$_default';
export { $ArrayWithArray } from './schemas/$ArrayWithArray';