From 6ab2b949a97c256ff551b7878b4a0ac719829547 Mon Sep 17 00:00:00 2001 From: GitHub Action Bot Date: Thu, 5 Jan 2023 14:30:28 +0000 Subject: [PATCH] Automated commit by github action: 3847600083 --- .../idn/beta/paths/ears-entitlement.yaml | 84 +++++++++++++++++++ .../idn/beta/paths/entitlements.yaml | 77 ----------------- 2 files changed, 84 insertions(+), 77 deletions(-) diff --git a/static/api-specs/idn/beta/paths/ears-entitlement.yaml b/static/api-specs/idn/beta/paths/ears-entitlement.yaml index 0dc4839ee..a56850915 100644 --- a/static/api-specs/idn/beta/paths/ears-entitlement.yaml +++ b/static/api-specs/idn/beta/paths/ears-entitlement.yaml @@ -62,3 +62,87 @@ get: $ref: '../../v3/responses/429.yaml' '500': $ref: '../../v3/responses/500.yaml' +patch: + operationId: patchEntitlement + tags: + - Entitlements + summary: Patch a specified Entitlement + description: >- + This API updates an existing Entitlement using [JSON Patch](https://tools.ietf.org/html/rfc6902) syntax. + + + The following fields are patchable: + **requestable**, **privileged**, **segments** + + + A token with ORG_ADMIN or SOURCE_ADMIN authority is required to call this API. + parameters: + - name: id + in: path + description: ID of the Entitlement to patch + required: true + schema: + type: string + example: 2c91808a7813090a017814121e121518 + requestBody: + content: + application/json-patch+json: + schema: + type: array + items: + $ref: '../schemas/JsonPatchOperation.yaml' + example: [ + { + "op": "replace", + "path": "/requestable", + "value": true + } + ] + examples: + Make an Entitlement Requestable and Privileged in One Call: + description: This example shows how multiple fields may be updated with a single patch call. + value: + [ + { + "op": "replace", + "path": "/requestable", + "value": true + }, + { + "op": "replace", + "path": "/privileged", + "value": true + } + ] + + Assign an Entitlement to a Segment: + description: >- + This example illustrates the use of patch to assign an Entitlement to a Segment by adding the Segment's ID to the + Entitlement's segments array. + value: + [ + { + "op": "add", + "path": "/segments/-", + "value": "f7b1b8a3-5fed-4fd4-ad29-82014e137e19" + } + ] + responses: + '200': + description: Responds with the Entitlement as updated. + content: + application/json: + schema: + $ref: '../schemas/Entitlement.yaml' + '400': + $ref: '../../v3/responses/400.yaml' + '401': + $ref: '../../v3/responses/401.yaml' + '403': + $ref: '../../v3/responses/403.yaml' + '404': + $ref: '../../v3/responses/404.yaml' + '429': + $ref: '../../v3/responses/429.yaml' + '500': + $ref: '../../v3/responses/500.yaml' \ No newline at end of file diff --git a/static/api-specs/idn/beta/paths/entitlements.yaml b/static/api-specs/idn/beta/paths/entitlements.yaml index bbb7d0cb9..3ae5a1903 100644 --- a/static/api-specs/idn/beta/paths/entitlements.yaml +++ b/static/api-specs/idn/beta/paths/entitlements.yaml @@ -129,80 +129,3 @@ get: $ref: '../../v3/responses/429.yaml' '500': $ref: '../../v3/responses/500.yaml' -patch: - operationId: patchEntitlement - tags: - - Entitlements - summary: Patch a specified Entitlement - description: >- - This API updates an existing Entitlement using [JSON Patch](https://tools.ietf.org/html/rfc6902) syntax. - - - The following fields are patchable: - **requestable**, **privileged**, **segments** - - - A token with ORG_ADMIN or SOURCE_ADMIN authority is required to call this API. - parameters: - - name: id - in: path - description: ID of the Entitlement to patch - required: true - schema: - type: string - example: 2c91808a7813090a017814121e121518 - requestBody: - content: - application/json-patch+json: - schema: - type: array - items: - $ref: '../schemas/JsonPatchOperation.yaml' - examples: - Make an Entitlement Requestable and Privileged in One Call: - description: This example shows how multiple fields may be updated with a single patch call. - value: - [ - { - "op": "replace", - "path": "/requestable", - "value": true - }, - { - "op": "replace", - "path": "/privileged", - "value": true - } - ] - - Assign an Entitlement to a Segment: - description: >- - This example illustrates the use of patch to assign an Entitlement to a Segment by adding the Segment's ID to the - Entitlement's segments array. - value: - [ - { - "op": "add", - "path": "/segments/-", - "value": "f7b1b8a3-5fed-4fd4-ad29-82014e137e19" - } - ] - responses: - '200': - description: Responds with the Entitlement as updated. - content: - application/json: - schema: - $ref: '../schemas/Entitlement.yaml' - '400': - $ref: '../../v3/responses/400.yaml' - '401': - $ref: '../../v3/responses/401.yaml' - '403': - $ref: '../../v3/responses/403.yaml' - '404': - $ref: '../../v3/responses/404.yaml' - '429': - $ref: '../../v3/responses/429.yaml' - '500': - $ref: '../../v3/responses/500.yaml'