From c7f757e98066775ed2fdeb67f3d31777e8430624 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Mon, 28 Nov 2022 09:40:36 +0100 Subject: A1-PMS, make service id optional in PUT Policy Improved API documentation. Fixed a bug that lead to that a policy could be connected to several services if the service_id was changed. Change-Id: I211f5db32747fc912b7ba85bfbc15ce50ee725dd Issue-ID: CCSDK-3819 Signed-off-by: PatrikBuhr --- a1-policy-management/api/pms-api.json | 12 +++--- a1-policy-management/api/pms-api.yaml | 21 ++++++---- .../a1policymanagementservice/SwaggerConfig.java | 5 ++- .../controllers/v2/PolicyInfo.java | 15 ++++--- .../controllers/v2/ServiceController.java | 6 +-- .../controllers/v2/ServiceRegistrationInfo.java | 2 +- .../repository/Policies.java | 19 ++++++--- .../controllers/v2/ApplicationTest.java | 48 ++++++++++++++++++++-- 8 files changed, 96 insertions(+), 32 deletions(-) (limited to 'a1-policy-management') diff --git a/a1-policy-management/api/pms-api.json b/a1-policy-management/api/pms-api.json index a81070f7..ce2d9aa8 100644 --- a/a1-policy-management/api/pms-api.json +++ b/a1-policy-management/api/pms-api.json @@ -199,8 +199,7 @@ "policy_data", "policy_id", "policytype_id", - "ric_id", - "service_id" + "ric_id" ], "properties": { "ric_id": { @@ -214,12 +213,13 @@ "example": null }, "transient": { + "default": false, "description": "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", "type": "boolean", - "example": null + "example": false }, "service_id": { - "description": "the identity of the service owning the policy", + "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registerred.", "type": "string", "example": null }, @@ -881,7 +881,7 @@ }}, "required": true }, - "description": "Registering a service is needed to: