From 2f208f94eddd090c1983f849f61742288c21af6f Mon Sep 17 00:00:00 2001 From: "raviteja.karumuri" Date: Mon, 23 Aug 2021 16:19:33 +0100 Subject: [PMSH] Schema definitions in Swagger Yaml File Issue-ID: DCAEGEN2-2889 Signed-off-by: raviteja.karumuri Change-Id: I15ae36c8f55a708be25eb56dc6b9812c3feec822 --- components/pm-subscription-handler/Changelog.md | 1 + .../pmsh_service/mod/api/pmsh_swagger.yml | 111 ++++++++++++++++++++- 2 files changed, 110 insertions(+), 2 deletions(-) (limited to 'components/pm-subscription-handler') diff --git a/components/pm-subscription-handler/Changelog.md b/components/pm-subscription-handler/Changelog.md index 3112ac59..f98d2b8d 100755 --- a/components/pm-subscription-handler/Changelog.md +++ b/components/pm-subscription-handler/Changelog.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [2.0.0] ### Changed * Updated PMSH app configuration, simplified existing config (DCAEGEN2-2814) +* Created Schema definitions in swagger file according to the new structure (DCAEGEN2-2889) ## [1.3.2] ### Changed diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml b/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml index 58e6a788..2a6137cf 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml +++ b/components/pm-subscription-handler/pmsh_service/mod/api/pmsh_swagger.yml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2020 Nordix Foundation. +# Copyright (C) 2020-2021 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,13 +19,14 @@ swagger: "2.0" info: title: PM Subscription Handler Service - version: "1.1.0" + version: "2.0.0" description: PM subscription handler enables control of performance management jobs on network functions in ONAP produces: - "application/json" basePath: "/" schemes: - https + - http # Paths supported by the server application paths: /subscriptions: @@ -87,3 +88,109 @@ paths: enum: [healthy, unhealthy] 503: description: the pmsh service is unavailable + +definitions: + subscription: + type: object + properties: + subscription: + type: object + properties: + subscriptionName: + type: string + operationalPolicyName: + type: string + controlLoopName: + type: string + nfFilter: + $ref: "#/definitions/nfFilter" + measurementGroups: + type: array + minItems: 1 + items: + $ref: "#/definitions/measurementGroup" + required: + - subscriptionName + - operationalPolicyName + - nfFilter + - measurementGroups + required: + - subscription + + nfFilter: + type: object + minProperties: 1 + additionalProperties: false + properties: + nfNames: + type: array + minItems: 1 + items: + type: string + modelInvariantIDs: + type: array + minItems: 1 + items: + type: string + modelVersionIDs: + type: array + minItems: 1 + items: + type: string + modelNames: + type: array + minItems: 1 + items: + type: string + + measurementGroup: + type: object + properties: + measurementGroup: + type: object + properties: + measurementGroupName: + type: string + fileBasedGP: + type: integer + fileLocation: + type: string + administrativeState: + type: string + enum: [LOCKED, UNLOCKED] + measurementTypes: + type: array + minItems: 1 + items: + $ref: "#/definitions/measurementType" + managedObjectDNsBasic: + type: array + minItems: 1 + items: + $ref: "#/definitions/managedObjectDNs" + allOf: + - required: + - measurementGroupName + - fileBasedGP + - fileLocation + - administrativeState + - measurementTypes + - managedObjectDNsBasic + required: + - measurementGroup + + measurementType: + type: object + properties: + measurementType: + type: string + required: + - measurementType + + managedObjectDNs: + type: object + properties: + DN: + type: string + required: + - DN -- cgit 1.2.3-korg