From f4958756b4976e0b608b9155dab84564f7e8804e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 23 Oct 2024 09:18:50 +0200 Subject: [PATCH] fix(API): Correct credential schema for response in `POST /credentials` (#11340) --- .../credentials/spec/paths/credentials.yml | 2 +- .../schemas/create-credential-response.yml | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 packages/cli/src/public-api/v1/handlers/credentials/spec/schemas/create-credential-response.yml diff --git a/packages/cli/src/public-api/v1/handlers/credentials/spec/paths/credentials.yml b/packages/cli/src/public-api/v1/handlers/credentials/spec/paths/credentials.yml index eab345f572..13a1be6de4 100644 --- a/packages/cli/src/public-api/v1/handlers/credentials/spec/paths/credentials.yml +++ b/packages/cli/src/public-api/v1/handlers/credentials/spec/paths/credentials.yml @@ -18,7 +18,7 @@ post: content: application/json: schema: - $ref: '../schemas/credential.yml' + $ref: '../schemas/create-credential-response.yml' '401': $ref: '../../../../shared/spec/responses/unauthorized.yml' '415': diff --git a/packages/cli/src/public-api/v1/handlers/credentials/spec/schemas/create-credential-response.yml b/packages/cli/src/public-api/v1/handlers/credentials/spec/schemas/create-credential-response.yml new file mode 100644 index 0000000000..fa906cfd29 --- /dev/null +++ b/packages/cli/src/public-api/v1/handlers/credentials/spec/schemas/create-credential-response.yml @@ -0,0 +1,28 @@ +required: + - id + - name + - type + - createdAt + - updatedAt +type: object +properties: + id: + type: string + readOnly: true + example: vHxaz5UaCghVYl9C + name: + type: string + example: John's Github account + type: + type: string + example: github + createdAt: + type: string + format: date-time + readOnly: true + example: '2022-04-29T11:02:29.842Z' + updatedAt: + type: string + format: date-time + readOnly: true + example: '2022-04-29T11:02:29.842Z'