aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/main/resources
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2022-12-01 09:15:22 +0000
committerFrancescoFioraEst <francesco.fiora@est.tech>2022-12-01 10:55:04 +0000
commitb5d62899bf9cfaef5c9dcc49023428bbb12bcc55 (patch)
treed7325a4df408b39bf7b30789724631efbc738c91 /runtime-acm/src/main/resources
parent7af90cd8fdabdd1c3ae79d3551980016d6b24f7e (diff)
Refactor POST and PUT Automation Composition
Refactor POST and PUT Automation Composition to handle a single resource instead of a list. Issue-ID: POLICY-4470 Change-Id: Ic7025e1eafdd197487bc5268993ec5e3e5520025 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src/main/resources')
-rw-r--r--runtime-acm/src/main/resources/openapi/openapi.yaml35
1 files changed, 19 insertions, 16 deletions
diff --git a/runtime-acm/src/main/resources/openapi/openapi.yaml b/runtime-acm/src/main/resources/openapi/openapi.yaml
index 6e07e037d..de7b26ead 100644
--- a/runtime-acm/src/main/resources/openapi/openapi.yaml
+++ b/runtime-acm/src/main/resources/openapi/openapi.yaml
@@ -696,14 +696,14 @@ paths:
post:
tags:
- Automation Composition Instance
- summary: Create automation composition instances
- description: Creates automation composition instances that use the sepcified automation composition definition. The IDs of the created
- automation composition instances are returned.
- operationId: createCompositionInstances
+ summary: Create automation composition instance
+ description: Creates automation composition instance that use the sepcified automation composition definition. The ID of the created
+ automation composition instance is returned.
+ operationId: createCompositionInstance
parameters:
- name : compositionId
in: path
- description: The UUID of the automation composition definition on which to create instances
+ description: The UUID of the automation composition definition on which to create instance
required: true
schema:
type: string
@@ -716,25 +716,25 @@ paths:
format: uuid
requestBody:
description: Serialised instance of
- [AutomationCompositions](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositions.java)
- containing a list of automation composition instances to create
+ [AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java)
+ containing a automation composition instance to create
content:
application/json:
schema:
- $ref: '#/components/schemas/AutomationCompositions'
+ $ref: '#/components/schemas/AutomationComposition'
example:
- externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstances.json'
+ externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.json'
application/yaml:
schema:
- $ref: '#/components/schemas/AutomationCompositions'
+ $ref: '#/components/schemas/AutomationComposition'
example:
- externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstances.yaml'
+ externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstance.yaml'
required: true
responses:
201:
description: Serialised instance of
[InstantiationResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/InstantiationResponse.java)
- containing the UUIDs of the created automation composition instances
+ containing the UUID of the created automation composition instance
headers:
X-LatestVersion:
schema:
@@ -860,8 +860,8 @@ paths:
responses:
200:
description: Serialised instance of
- [AutomationCompositions](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositions.java)
- containing a list of automation composition instances with one entry
+ [AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java)
+ containing the automation composition instance
headers:
X-LatestVersion:
schema:
@@ -879,12 +879,12 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/AutomationCompositions'
+ $ref: '#/components/schemas/AutomationComposition'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstanceResponse.json'
application/yaml:
schema:
- $ref: '#/components/schemas/AutomationCompositions'
+ $ref: '#/components/schemas/AutomationComposition'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstanceResponse.yaml'
401:
@@ -1216,6 +1216,9 @@ components:
ToscaServiceTemplate:
title: ToscaServiceTemplate
type: object
+ AutomationComposition:
+ title: AutomationComposition
+ type: object
AutomationCompositions:
title: AutomationCompositions
type: object