From 0d41000682758743ef575fd1d6a5188eb6935871 Mon Sep 17 00:00:00 2001 From: Sameen Fatima Date: Tue, 16 Jan 2024 17:42:17 +0500 Subject: [PATCH] fix: add definitions in bulk-revoke endpoint --- api-compact.yaml | 39 ++++++++++++++++++++++++++++++--------- api.yaml | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 18 deletions(-) diff --git a/api-compact.yaml b/api-compact.yaml index 8aab5d67..8ce9fa45 100644 --- a/api-compact.yaml +++ b/api-compact.yaml @@ -216,21 +216,14 @@ endpoints: parameters: - *auth_header - *uuid - - name: "Requestpayload" + - name: "RequestPayload" in: "body" description: "User emails OR search filters for emails and status" required: true schema: type: "array" items: - type: "object" - properties: - user_emails: - description: "List of emails with which licenses are associated" - type: "array" - items: - type: "string" - description: "user email" + $ref: "#/definitions/RequestPayload" responses: *bulk_revoke_responses x-amazon-apigateway-integration: responses: *bulk_revoke_apigateway_responses @@ -292,3 +285,31 @@ endpoints: integration.request.querystring.enroll_all: "method.request.querystring.enroll_all" integration.request.querystring.subscription_uuid: "method.request.querystring.subscription_uuid" uri: "https://${stageVariables.license_manager_host}/api/v1/bulk-license-enrollment" +definitions: + BulkRevokeFilters: + type: "object" + properties: + user_email: + type: "string" + description: "User email filter" + status_in: + type: "array" + description: "Array of valid license statuses" + items: + type: "string" + description: "status of the license" + description: "Values provided to perform filtering against." + RequestPayload: + type: "object" + properties: + user_emails: + type: "array" + description: "List of emails with which licenses are associated" + items: + type: "string" + description: "user email" + filters: + type: "array" + description: "Filters for lookup and filtering of licenses to revoke." + items: + $ref: "#/definitions/BulkRevokeFilters" diff --git a/api.yaml b/api.yaml index 669922b0..7202157e 100644 --- a/api.yaml +++ b/api.yaml @@ -230,21 +230,14 @@ endpoints: in: path required: true type: string - - name: Requestpayload + - name: RequestPayload in: body description: User emails OR search filters for emails and status required: true schema: type: array items: - type: object - properties: - user_emails: - description: List of emails with which licenses are associated - type: array - items: - type: string - description: user email + $ref: "#/definitions/RequestPayload" responses: "204": description: No Content - All revocations were successful @@ -378,3 +371,31 @@ endpoints: integration.request.querystring.enroll_all: method.request.querystring.enroll_all integration.request.querystring.subscription_uuid: method.request.querystring.subscription_uuid uri: https://${stageVariables.license_manager_host}/api/v1/bulk-license-enrollment +definitions: + BulkRevokeFilters: + type: object + properties: + user_email: + type: string + description: User email filter + status_in: + type: array + description: Array of valid license statuses + items: + type: string + description: status of the license + description: Values provided to perform filtering against. + RequestPayload: + type: object + properties: + user_emails: + type: array + description: List of emails with which licenses are associated + items: + type: string + description: user email + filters: + type: array + description: Filters for lookup and filtering of licenses to revoke. + items: + $ref: "#/definitions/BulkRevokeFilters"