diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2024-07-04 15:15:36 +0100 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2024-07-08 17:07:48 +0100 |
commit | d7914bc1f3c9505539304bd23b795c7b061dc6db (patch) | |
tree | 3bfb912918a7bdbc2b19e022d27312d08592d78e /docs/api | |
parent | 82053f446aa1eb35e2a05e2557431497b15b031b (diff) |
Create PolicyExecutor Stub
- Generate interface from OpenApi in RTD docs
- Fixed Content Type in OpenAPI
- Fixed Paths in OpenAPI
- Made Authorization header compulsory in OpenAPI
- All 'enum' values in OpenAPI lowercase (in linr with CPS/NCMP conventions)
- Added impl with some basic functionality
- Added testware
- Pom includes docker image creation
- Docker compose updated to deploy stub
Issue-ID: CPS-2301
Change-Id: I462ad5c70474b2813fc04005c0d20a1b15b574ec
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/swagger/policy-executor/openapi.yaml | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/docs/api/swagger/policy-executor/openapi.yaml b/docs/api/swagger/policy-executor/openapi.yaml index 868f2da810..5becd9a39e 100644 --- a/docs/api/swagger/policy-executor/openapi.yaml +++ b/docs/api/swagger/policy-executor/openapi.yaml @@ -19,25 +19,26 @@ openapi: 3.0.3 info: title: Policy Executor - description: "Allows NCMP to execute a policy defined by a third party implementation before proceeding with an operation" + description: "Allows NCMP to execute a policy defined by a third party implementation before proceeding with a CM operation" version: 1.0.0 servers: - - url: /policy-executor + - url: /policy-executor/api tags: - name: policy-executor description: "Execute all your policies" paths: - /policy-executor/api/v1/{action}: + /v1/{action}: post: description: "Fire a Policy action" operationId: executePolicyAction parameters: + - $ref: '#/components/parameters/authorizationInHeader' - $ref: '#/components/parameters/actionInPath' requestBody: required: true description: "The action request body" content: - application/3gpp-json-patch+json: + application/json: schema: $ref: '#/components/schemas/PolicyExecutionRequest' tags: @@ -102,12 +103,12 @@ components: properties: payloadType: type: string - description: "The type of payload. Currently supported options: 'CM_Write'" - example: "CM_Write" + description: "The type of payload. Currently supported options: 'cm_write'" + example: "cm_write" decisionType: type: string - description: "The type of decision. Currently supported options: 'Allow'" - example: "Allow" + description: "The type of decision. Currently supported options: 'permit'" + example: "permit" payload: type: array items: @@ -126,8 +127,8 @@ components: example: "550e8400-e29b-41d4-a716-446655440000" decision: type: string - description: "The decision outcome. Currently supported values: 'Allow','Deny'" - example: "Deny" + description: "The decision outcome. Currently supported values: 'permit','deny'" + example: "deny" message: type: string description: "Additional information regarding the decision outcome" @@ -205,10 +206,17 @@ components: actionInPath: name: action in: path - description: "The policy action. Currently supported options: 'Execute'" + description: "The policy action. Currently supported options: 'execute'" required: true schema: type: string - example: "Execute" + example: "execute" + authorizationInHeader: + name: Authorization + in: header + required: true + schema: + type: string + security: - bearerAuth: [] |