aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/main/resources/openapi/openapi.yaml
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-12-12 16:42:24 +0000
committerliamfallon <liam.fallon@est.tech>2022-12-12 17:28:14 +0000
commit7ed786054f394c9ea745cb41061d81c370435736 (patch)
tree735d72dca53d2dedb0180942859968fc766f536f /main/src/main/resources/openapi/openapi.yaml
parent555445562f24224ac5333b32345adff62f2c0c4c (diff)
Use generated API interface for Swagger
This commit removes the Swagger V2 annotations on the NodeTemplateController in policy-api. The OpeApi annotations (Swagger v3 annotations) are on a generated Java Interface. The code is changed so that the controller implements that interface. There are no code changes tot he controller except that the order of the parameters is switched in some cases. Issue-ID: POLICY-4404 Change-Id: Iab49c7f3f197a85d3314a879d39fe2c95be041b8 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'main/src/main/resources/openapi/openapi.yaml')
-rw-r--r--main/src/main/resources/openapi/openapi.yaml41
1 files changed, 23 insertions, 18 deletions
diff --git a/main/src/main/resources/openapi/openapi.yaml b/main/src/main/resources/openapi/openapi.yaml
index 22e256f8..105019af 100644
--- a/main/src/main/resources/openapi/openapi.yaml
+++ b/main/src/main/resources/openapi/openapi.yaml
@@ -1,18 +1,27 @@
openapi: 3.0.1
info:
- title: Api Documentation
- description: Api Documentation
- termsOfService: urn:tos
- contact: {}
+ title: Policy Framework Lifecycle API
+ description: The Policy Fraemwork API allows the lifecycle of policy types and policyes to be managed
+ contact:
+ name: ONAP Support
+ url: https://lists.onap.org/g/onap-discuss
+ email: onap-discuss@lists.onap.org
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
- version: "1.0"
+ version: '1.0'
+externalDocs:
+ description: Policy Framework Documentation
+ url: https://docs.onap.org/projects/onap-policy-parent/en/latest
servers:
- url: //localhost:30440/
tags:
-- name: policy-api-rest-controller
- description: Api Rest Controller
+- name: "Tosca Node Template Design"
+ description:
+ Tosca Node template Design API is publicly exposed for clients to Create/Read/Update/Delete
+ node templates which can be recognized and executable by incorporated policy engines. It is an
+ independent component running rest service that takes all node templates design API calls
+ from clients and then assign them to different API working functions.
paths:
/policy/api/v1/healthcheck:
get:
@@ -129,7 +138,7 @@ paths:
/policy/api/v1/nodetemplates:
get:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Retrieve all the available tosca node templates
description: Returns all the node templates from the service template
operationId: getAllNodeTemplates
@@ -245,7 +254,7 @@ paths:
last-mod-release: Jakarta
put:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Updates one or more new node templates
description: Client should provide TOSCA body of the updated node templates in an 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)
@@ -262,14 +271,10 @@ paths:
content:
application/json:
schema:
- type: array
- items:
- $ref: '#/components/schemas/ToscaNodeTemplate'
+ $ref: '#/components/schemas/ToscaServiceTemplate'
application/yaml:
schema:
- type: array
- items:
- $ref: '#/components/schemas/ToscaNodeTemplate'
+ $ref: '#/components/schemas/ToscaServiceTemplate'
required: true
responses:
200:
@@ -430,7 +435,7 @@ paths:
x-codegen-request-body-name: body
post:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Create one or more new node templates
description: Client should provide TOSCA body of the new node templates
operationId: createToscaNodeTemplates
@@ -612,7 +617,7 @@ paths:
/policy/api/v1/nodetemplates/{name}/versions/{version}:
get:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Retrieve one version of a tosca node template
description: Returns a particular version of a node template
operationId: getSpecificVersionOfNodeTemplate
@@ -739,7 +744,7 @@ paths:
last-mod-release: Jakarta
delete:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Updates one or more new node templates
description: Client should provide TOSCA body of the updated node templates
operationId: deleteToscaNodeTemplates