diff options
author | 2020-08-26 18:49:14 +0530 | |
---|---|---|
committer | 2020-08-26 19:04:33 +0530 | |
commit | b337097739ba195b5d7a8cbb71c2f0e7f0e74d30 (patch) | |
tree | 4c1c59cdb8995e9289fa9bddc0b003bc5c8e67b2 /src/main/resources | |
parent | 680363be57e6ac62ac537d63a77e5da237239c18 (diff) |
Transformation of request/response payloads for SDC Integration for POST /serviceSpecification
Swagger changes and model classes
Issue-ID: EXTAPI-487
Change-Id: I1ae29c643fe9c84856e3e0ec08e0776e724924d0
Signed-off-by: renrak15 <renrak15@gmail.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/jolt/postServiceCatalog.json | 75 | ||||
-rw-r--r-- | src/main/resources/jolt/postServiceCatalogResponse.json | 105 |
2 files changed, 180 insertions, 0 deletions
diff --git a/src/main/resources/jolt/postServiceCatalog.json b/src/main/resources/jolt/postServiceCatalog.json new file mode 100644 index 0000000..4cd51c3 --- /dev/null +++ b/src/main/resources/jolt/postServiceCatalog.json @@ -0,0 +1,75 @@ +[ + { + "operation": "shift", + "spec": { + "name": "name", + "description": "description", + "toscaModelURL": "toscaModelURL", + "toscaResourceName": "toscaResourceName", + "category": "categories[].name", + "version": "version", + "lifecycleStatus": "lifecycleState", + "serviceSpecCharacteristic": { + "*": { + "name": "properties[&1].name", + "description": "properties[&1].description", + "valueType": "properties[&1].type", + "required": "properties[&1].required", + "serviceSpecCharacteristicValue": { + "*": { + "value": "properties[&3].value", + "isDefault": { + "true": { + "@(2,value)": "properties[&5].defaultValue" + } + } + } + } + } + }, + "attachment": { + "*": { + "id": "artifacts[&1].artifactUUID", + "name": "artifacts[&1].artifactName", + "description": "artifacts[&1].artifactDescription", + "artifactLabel": "artifacts[&1].artifactLabel", + "artifactGroupType": "artifacts[&1].artifactGroupType", + "artifactTimeout": "artifacts[&1].artifactTimeout", + "artifactChecksum": "artifacts[&1].artifactChecksum", + "artifactVersion": "artifacts[&1].artifactVersion", + "generatedFromUUID": "artifacts[&1].generatedFromUUID", + "url": "artifacts[&1].artifactURL", + "mimeType": "artifacts[&1].artifactType" + } + }, + "relatedParty": { + "*": { + "id": ["contactId", "lastUpdaterUserId"], + "name": "lastUpdaterFullName" + } + }, + "resourceSpecification": { + "*": { + "id": "resources[&1].resourceUUID", + "version": "resources[&1].resourceVersion", + "name": "resources[&1].resourceName", + "resourceInstanceName": "resources[&1].resourceInstanceName", + "resourceInvariantUUID": "resources[&1].resourceInvariantUUID", + "resoucreType": "resources[&1].resourceType" + } + } + } + }, + { + "operation": "default", + "spec": { + "@type": "ONAPservicespec", + "distributionStatus": "DISTRIBUTION_NOT_APPROVED", + "categories": { + "*": { + "name": "" + } + } + } + } +]
\ No newline at end of file diff --git a/src/main/resources/jolt/postServiceCatalogResponse.json b/src/main/resources/jolt/postServiceCatalogResponse.json new file mode 100644 index 0000000..4d25554 --- /dev/null +++ b/src/main/resources/jolt/postServiceCatalogResponse.json @@ -0,0 +1,105 @@ +[{ + "operation": "default", + "spec": { + "ref": { + "True": true, + "False": false + } + } + }, + { + "operation": "shift", + "spec": { + "uuid": "id", + "name": "name", + "description": "description", + "invariantUUID": "invariantUUID", + "toscaModelURL": "toscaModelURL", + "toscaResourceName": "toscaResourceName", + "categories": { + "*": { + "name": "category" + } + }, + "properties": { + "*": { + "name": "serviceSpecCharacteristic[&1].name", + "description": "serviceSpecCharacteristic[&1].description", + "type": "serviceSpecCharacteristic[&1].valueType", + "required": "serviceSpecCharacteristic[&1].required", + "value": "serviceSpecCharacteristic[&1].serviceSpecCharacteristicValue[0].value", + "defaultValue": { + "*": { + "@(4,ref.True)": "serviceSpecCharacteristic[&3].serviceSpecCharacteristicValue[0].isDefault" + } + } + } + }, + "subcategory": "subcategory", + "distributionStatus": "distributionStatus", + "version": "version", + "lifecycleState": "lifecycleStatus", + "artifacts": { + "*": { + "artifactUUID": "attachment[&1].id", + "artifactName": "attachment[&1].name", + "artifactDescription": "attachment[&1].description", + "artifactLabel": "attachment[&1].artifactLabel", + "artifactGroupType": "attachment[&1].artifactGroupType", + "artifactTimeout": "attachment[&1].artifactTimeout", + "artifactChecksum": "attachment[&1].artifactChecksum", + "artifactVersion": "attachment[&1].artifactVersion", + "generatedFromUUID": "attachment[&1].generatedFromUUID", + "artifactURL": "attachment[&1].url", + "artifactType": "attachment[&1].mimeType" + } + }, + "lastUpdaterUserId": "relatedParty.id", + "lastUpdaterFullName": "relatedParty.name", + "resources": { + "*": { + "resourceUUID": "resourceSpecification[&1].id", + "resourceVersion": "resourceSpecification[&1].version", + "resourceName": "resourceSpecification[&1].name", + "resourceInstanceName": ["resourceSpecification[&1].resourceInstanceName", "resourceSpecification[&1].modelCustomizationName"], + "resourceInvariantUUID": "resourceSpecification[&1].resourceInvariantUUID", + "resoucreType": "resourceSpecification[&1].resourceType" + } + } + } + }, + { + "operation": "modify-overwrite-beta", + "spec": { + "href": "=concat('serviceSpecification/',@(1,id))" + } + }, + { + "operation": "default", + "spec": { + "@type": "ONAPservice", + "attachment[]": { + "*": { + "@type": "ONAPartifact" + } + }, + "serviceSpecCharacteristic[]": { + "*": { + "serviceSpecCharacteristicValue[]": { + "*": { + "isDefault": false + } + } + } + }, + "relatedParty": { + "role": "lastUpdater" + }, + "resourceSpecification[]": { + "*": { + "@type": "ONAPresource" + } + } + } + } +]
\ No newline at end of file |