aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionDefinition.java50
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionDefinition.java85
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ProviderUtils.java10
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/repository/AutomationCompositionDefinitionRepository.java31
-rw-r--r--models/src/test/resources/META-INF/persistence.xml1
-rw-r--r--runtime-acm/pom.xml26
-rw-r--r--runtime-acm/src/main/resources/openapi/openapi.yaml243
7 files changed, 307 insertions, 139 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionDefinition.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionDefinition.java
new file mode 100644
index 000000000..9c65b1eff
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionDefinition.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.concepts;
+
+import java.util.UUID;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.NonNull;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
+
+@NoArgsConstructor
+@Data
+@EqualsAndHashCode
+public class AutomationCompositionDefinition {
+
+ @NonNull
+ private UUID compositionId;
+
+ @NonNull
+ private ToscaServiceTemplate serviceTemplate;
+
+ /**
+ * Copy contructor, does a deep copy.
+ *
+ * @param otherAcmDefinition the other element to copy from
+ */
+ public AutomationCompositionDefinition(final AutomationCompositionDefinition otherAcmDefinition) {
+ this.compositionId = otherAcmDefinition.compositionId;
+ this.serviceTemplate = otherAcmDefinition.serviceTemplate;
+ }
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionDefinition.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionDefinition.java
new file mode 100644
index 000000000..46c09d388
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionDefinition.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.persistence.concepts;
+
+import com.google.gson.annotations.SerializedName;
+import java.util.UUID;
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionDefinition;
+import org.onap.policy.clamp.models.acm.persistence.provider.ProviderUtils;
+import org.onap.policy.common.parameters.annotations.NotNull;
+import org.onap.policy.common.parameters.annotations.Valid;
+import org.onap.policy.models.base.PfAuthorative;
+import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
+
+/**
+ * Class to represent a automation composition definition in the database.
+ */
+@Entity
+@Table(name = "AutomationCompositionDefinition")
+@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class JpaAutomationCompositionDefinition implements PfAuthorative<AutomationCompositionDefinition> {
+
+ @Id
+ @NotNull
+ private String compositionId;
+
+ @OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
+ @SerializedName("serviceTemplate")
+ @Valid
+ private JpaToscaServiceTemplate serviceTemplate;
+
+ @Override
+ public AutomationCompositionDefinition toAuthorative() {
+ var acmDefinition = new AutomationCompositionDefinition();
+ acmDefinition.setCompositionId(UUID.fromString(compositionId));
+ acmDefinition.setServiceTemplate(serviceTemplate.toAuthorative());
+ return acmDefinition;
+ }
+
+ @Override
+ public void fromAuthorative(final AutomationCompositionDefinition copyConcept) {
+ compositionId = copyConcept.getCompositionId().toString();
+ serviceTemplate = ProviderUtils.getJpaAndValidate(copyConcept.getServiceTemplate(),
+ JpaToscaServiceTemplate::new, "toscaServiceTemplate");
+
+ }
+
+ public JpaAutomationCompositionDefinition(final AutomationCompositionDefinition acmDefinition) {
+ fromAuthorative(acmDefinition);
+ }
+
+ public JpaAutomationCompositionDefinition() {
+ super();
+ }
+
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ProviderUtils.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ProviderUtils.java
index 9510e5919..7d751fa36 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ProviderUtils.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ProviderUtils.java
@@ -64,7 +64,15 @@ public final class ProviderUtils {
return jpaConceptList;
}
- protected static <A, J extends PfConcept & PfAuthorative<A>> J getJpaAndValidate(A authorativeConcept,
+ /**
+ * Convert a concept to a Jpa object.
+ *
+ * @param authorativeConcept the concept
+ * @param jpaSupplier the Jpa Supplier
+ * @param conceptDescription the description used for validation result
+ * @return the Jpa object
+ */
+ public static <A, J extends PfConcept & PfAuthorative<A>> J getJpaAndValidate(A authorativeConcept,
Supplier<J> jpaSupplier, String conceptDescription) {
var validationResult = new BeanValidationResult(conceptDescription, authorativeConcept);
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/repository/AutomationCompositionDefinitionRepository.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/repository/AutomationCompositionDefinitionRepository.java
new file mode 100644
index 000000000..64a0a0fb4
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/repository/AutomationCompositionDefinitionRepository.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.persistence.repository;
+
+import org.onap.policy.clamp.models.acm.persistence.concepts.JpaAutomationCompositionDefinition;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface AutomationCompositionDefinitionRepository
+ extends JpaRepository<JpaAutomationCompositionDefinition, String> {
+
+}
diff --git a/models/src/test/resources/META-INF/persistence.xml b/models/src/test/resources/META-INF/persistence.xml
index f36a5823a..6020f2413 100644
--- a/models/src/test/resources/META-INF/persistence.xml
+++ b/models/src/test/resources/META-INF/persistence.xml
@@ -52,6 +52,7 @@
<class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTopologyTemplate</class>
<class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTrigger</class>
<class>org.onap.policy.clamp.models.acm.persistence.concepts.JpaAutomationComposition</class>
+ <class>org.onap.policy.clamp.models.acm.persistence.concepts.JpaAutomationCompositionDefinition</class>
<class>org.onap.policy.clamp.models.acm.persistence.concepts.JpaAutomationCompositionElement</class>
<class>org.onap.policy.clamp.models.acm.persistence.concepts.JpaParticipant</class>
diff --git a/runtime-acm/pom.xml b/runtime-acm/pom.xml
index 9aa89c090..a219850fc 100644
--- a/runtime-acm/pom.xml
+++ b/runtime-acm/pom.xml
@@ -19,9 +19,7 @@
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -66,21 +64,23 @@
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec>
- <invokerPackage>org.onap.acm.rest.controller</invokerPackage>
+ <invokerPackage>org.onap.policy.clamp.acm.runtime.main.rest</invokerPackage>
<modelPackage>org.onap.policy.clamp.models.acm.concepts</modelPackage>
<apiPackage>org.onap.policy.clamp.acm.runtime.main.rest</apiPackage>
<language>spring</language>
<generateModels>false</generateModels>
<generateSupportingFiles>false</generateSupportingFiles>
- <importMappings>ToscaServiceTemplates=org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplates,
- SimpleResponse=org.onap.policy.clamp.models.acm.messages.rest.SimpleResponse,
- InstancePropertiesResponse=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstancePropertiesResponse,
- CommissioningResponse=org.onap.policy.clamp.models.acm.messages.rest.commissioning.CommissioningResponse,
- ToscaNodeTemplate=org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate,
- ToscaServiceTemplate=org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate,
- AutomationCompositions=org.onap.policy.clamp.models.acm.concepts.AutomationCompositions,
- InstantiationCommand=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationCommand,
- InstantiationResponse=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse</importMappings>
+ <importMappings>
+ ToscaServiceTemplates=org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplates,
+ ToscaServiceTemplate=org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate,
+ ToscaNodeTemplate=org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate,
+ AutomationCompositions=org.onap.policy.clamp.models.acm.concepts.AutomationCompositions,
+ SimpleResponse=org.onap.policy.clamp.models.acm.messages.rest.SimpleResponse,
+ InstancePropertiesResponse=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstancePropertiesResponse,
+ CommissioningResponse=org.onap.policy.clamp.models.acm.messages.rest.commissioning.CommissioningResponse,
+ InstantiationCommand=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationCommand,
+ InstantiationResponse=org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse
+ </importMappings>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<dateLibrary>java11</dateLibrary>
diff --git a/runtime-acm/src/main/resources/openapi/openapi.yaml b/runtime-acm/src/main/resources/openapi/openapi.yaml
index a9f536de4..6e07e037d 100644
--- a/runtime-acm/src/main/resources/openapi/openapi.yaml
+++ b/runtime-acm/src/main/resources/openapi/openapi.yaml
@@ -67,7 +67,7 @@ paths:
responses:
200:
description: Serialised instance of
- [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
+ [ToscaServiceTemplates](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplates.java)
that contains the automation composition definitions that match the requested filters.
headers:
X-LatestVersion:
@@ -86,18 +86,17 @@ paths:
content:
application/json:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplates
+ $ref: '#/components/schemas/ToscaServiceTemplates'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getAllCompositionDefinitions.json'
application/yaml:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplates
+ $ref: '#/components/schemas/ToscaServiceTemplates'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getAllCompositionDefinitions.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -115,8 +114,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -143,14 +141,12 @@ paths:
content:
application/json:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionDefinitions.json'
application/yaml:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionDefinitions.yaml'
required: true
@@ -176,18 +172,17 @@ paths:
content:
application/json:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCommissionCompositionDefinitionsResponse.json'
application/yaml:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCommissionCompositionDefinitionsResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -205,10 +200,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -226,8 +221,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -280,18 +274,17 @@ paths:
content:
application/json:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getSingleCompositionDefinition.json'
application/yaml:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getSingleCompositionDefinition.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -309,10 +302,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: Specified automation composition definition not found
+ description: Specified automation composition definition not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -330,8 +323,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -364,14 +356,12 @@ paths:
content:
application/json:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionDefinitionUpdate.json'
application/yaml:
schema:
- title: ToscaServiceTemplate
- type: ToscaServiceTemplate
+ $ref: '#/components/schemas/ToscaServiceTemplate'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionDefinitionUpdate.yaml'
required: true
@@ -397,18 +387,17 @@ paths:
content:
application/json:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionDefinitionUpdateResponse.json'
application/yaml:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionDefinitionUpdateResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -426,10 +415,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: Specified automation composition definition not found
+ description: Specified automation composition definition not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -447,10 +436,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -468,8 +457,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -518,18 +506,17 @@ paths:
content:
application/json:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/deleteCompositionDefinitionResponse.json'
application/yaml:
schema:
- title: CommissioningResponse
- type: CommissioningResponse
+ $ref: '#/components/schemas/CommissioningResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/deleteCompositionDefinitionResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -547,10 +534,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: Specified automation composition definition not found
+ description: Specified automation composition definition not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -568,10 +555,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -589,8 +576,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -652,18 +638,17 @@ paths:
content:
application/json:
schema:
- title: AutomationCompositions
- type: AutomationCompositions
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstancesResponse.json'
application/yaml:
schema:
- title: AutomationCompositions
- type: AutomationCompositions
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstancesResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -681,10 +666,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: The specified automation composition definition was not found
+ description: The specified automation composition definition was not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -702,8 +687,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -737,14 +721,12 @@ paths:
content:
application/json:
schema:
- title: AutomationCompositions
- type: AutomationCompositions
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstances.json'
application/yaml:
schema:
- title: AutomationCompositions
- type: AutomationCompositions
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstances.yaml'
required: true
@@ -770,18 +752,17 @@ paths:
content:
application/json:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.json'
application/yaml:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/postCompositionInstancesResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -799,10 +780,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: The specified automation composition definition was not found
+ description: The specified automation composition definition was not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -820,10 +801,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -841,8 +822,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -899,18 +879,17 @@ paths:
content:
application/json:
schema:
- title: AutomationCompositions
- type: AutomationComposition
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstanceResponse.json'
application/yaml:
schema:
- title: AutomationCompositions
- type: AutomationComposition
+ $ref: '#/components/schemas/AutomationCompositions'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/getCompositionInstanceResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -928,10 +907,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: The automation composition instance was not found
+ description: The automation composition instance was not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -949,8 +928,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -1023,18 +1001,17 @@ paths:
content:
application/json:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.json'
application/yaml:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/putCompositionInstanceUpdateResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1052,10 +1029,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: The specified automation composition instance was not found
+ description: The specified automation composition instance was not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1073,10 +1050,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1094,8 +1071,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -1151,18 +1127,17 @@ paths:
content:
application/json:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.json'
application/yaml:
schema:
- title: InstantiationResponse
- type: InstantiationResponse
+ $ref: '#/components/schemas/InstantiationResponse'
example:
externalValue: 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/examples/deleteCompositionInstanceResponse.yaml'
401:
- description: Authentication Error
+ description: Authentication Error, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1180,10 +1155,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
404:
- description: The specified automation composition instance was not found
+ description: The specified automation composition instance was not found, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1201,10 +1176,10 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
400:
- description: Bad Request
+ description: Bad Request, returns an instance of
+ [SimpleResponse](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/SimpleResponse.java)
headers:
X-LatestVersion:
schema:
@@ -1222,8 +1197,7 @@ paths:
content:
application/json:
schema:
- title: SimpleResponse
- type: SimpleResponse
+ $ref: '#/components/schemas/SimpleResponse'
security:
- basicAuth: []
x-interface info:
@@ -1235,3 +1209,22 @@ components:
basicAuth:
type: http
scheme: basic
+ schemas:
+ ToscaServiceTemplates:
+ title: ToscaServiceTemplates
+ type: object
+ ToscaServiceTemplate:
+ title: ToscaServiceTemplate
+ type: object
+ AutomationCompositions:
+ title: AutomationCompositions
+ type: object
+ SimpleResponse:
+ title: SimpleResponse
+ type: object
+ CommissioningResponse:
+ title: CommissioningResponse
+ type: object
+ InstantiationResponse:
+ title: InstantiationResponse
+ type: object