From ec71de46b1804a07a7032ee4d30ca86ba281e58e Mon Sep 17 00:00:00 2001 From: Georg Schwarz Date: Mon, 14 Nov 2022 10:41:46 +0100 Subject: [PATCH] Fix API annotation for api keys --- client-generated/.openapi-generator/FILES | 1 + .../models/GetApiKeyResponseDto.ts | 34 +++++++++++++++++++ .../models/GetApiKeysResponseDto.ts | 8 +++-- client-generated/models/index.ts | 1 + server/src/api-keys/api-keys.dto.ts | 5 ++- 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 client-generated/models/GetApiKeyResponseDto.ts diff --git a/client-generated/.openapi-generator/FILES b/client-generated/.openapi-generator/FILES index 791dcda..6b6c266 100644 --- a/client-generated/.openapi-generator/FILES +++ b/client-generated/.openapi-generator/FILES @@ -12,6 +12,7 @@ models/CreateApiKeyResponseDto.ts models/CreateServiceDocRequest.ts models/CreateServiceDocResponse.ts models/DeleteServiceDocResponse.ts +models/GetApiKeyResponseDto.ts models/GetApiKeysResponseDto.ts models/GetServiceDocResponse.ts models/GetServiceGroupResponse.ts diff --git a/client-generated/models/GetApiKeyResponseDto.ts b/client-generated/models/GetApiKeyResponseDto.ts new file mode 100644 index 0000000..a848598 --- /dev/null +++ b/client-generated/models/GetApiKeyResponseDto.ts @@ -0,0 +1,34 @@ +// tslint:disable +/** + * msdoc server API + * The msdoc server API description + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * @export + * @interface GetApiKeyResponseDto + */ +export interface GetApiKeyResponseDto { + /** + * @type {number} + * @memberof GetApiKeyResponseDto + */ + id: number; + /** + * @type {string} + * @memberof GetApiKeyResponseDto + */ + keyName: string; + /** + * @type {string} + * @memberof GetApiKeyResponseDto + */ + creationTimestamp: string; +} diff --git a/client-generated/models/GetApiKeysResponseDto.ts b/client-generated/models/GetApiKeysResponseDto.ts index 537230e..9170319 100644 --- a/client-generated/models/GetApiKeysResponseDto.ts +++ b/client-generated/models/GetApiKeysResponseDto.ts @@ -11,14 +11,18 @@ * Do not edit the class manually. */ +import type { + GetApiKeyResponseDto, +} from './'; + /** * @export * @interface GetApiKeysResponseDto */ export interface GetApiKeysResponseDto { /** - * @type {Array} + * @type {Array} * @memberof GetApiKeysResponseDto */ - apiKeys: Array; + apiKeys: Array; } diff --git a/client-generated/models/index.ts b/client-generated/models/index.ts index d4008aa..d959b1e 100644 --- a/client-generated/models/index.ts +++ b/client-generated/models/index.ts @@ -3,6 +3,7 @@ export * from './CreateApiKeyResponseDto'; export * from './CreateServiceDocRequest'; export * from './CreateServiceDocResponse'; export * from './DeleteServiceDocResponse'; +export * from './GetApiKeyResponseDto'; export * from './GetApiKeysResponseDto'; export * from './GetServiceDocResponse'; export * from './GetServiceGroupResponse'; diff --git a/server/src/api-keys/api-keys.dto.ts b/server/src/api-keys/api-keys.dto.ts index a61fba7..1ddce28 100644 --- a/server/src/api-keys/api-keys.dto.ts +++ b/server/src/api-keys/api-keys.dto.ts @@ -24,7 +24,10 @@ export class CreateApiKeyResponseDto extends GetApiKeyResponseDto { } export class GetApiKeysResponseDto { - @ApiProperty() + @ApiProperty({ + isArray: true, + type: GetApiKeyResponseDto, + }) apiKeys: GetApiKeyResponseDto[]; }