From 7ed786054f394c9ea745cb41061d81c370435736 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 12 Dec 2022 16:42:24 +0000 Subject: 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 --- main/src/main/resources/openapi/openapi.yaml | 41 ++++++++++++++++------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'main/src/main/resources/openapi/openapi.yaml') 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 -- cgit 1.2.3-korg