From aa78dc173f88935db05a1c053b8f4f9279a6840b Mon Sep 17 00:00:00 2001 From: "Aggarwal Sahil (BCI/ESW17)" Date: Mon, 14 Aug 2023 12:06:28 +0200 Subject: [PATCH] refactored openapi yml file --- CHANGELOG.md | 7 +-- .../AssetAdministrationShellApiDelegate.java | 4 ++ .../static/aas-registry-openapi.yaml | 49 +++---------------- 3 files changed, 13 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfa8a756..ada332b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,17 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.3.14-M1 -### Added - -## fixed -- Refactored existing models to align with AAS 3.0. Removed /query from lookup api. - ## 0.3.13-M1 ### Added - In this version the models have been adjusted to new version AAS 3.0. ## fixed +- Refactored existing models to align with AAS 3.0. Removed /query from lookup api because it is not a part of AAS 3.0 version. ## 0.3.12-M1 ### Added diff --git a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java index 59e263e1..0d40b248 100644 --- a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java +++ b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java @@ -173,6 +173,10 @@ public ResponseEntity> postAllAssetLinksById(byte[] aasIde return new ResponseEntity<>(list, HttpStatus.CREATED); } + /** + * Since /query is not part of AAS 3.0, so this method is not used. + * Keeping it for the reason that it might come up in next version. + */ public ResponseEntity> postQueryAllAssetAdministrationShellIds(ShellLookup shellLookup,@RequestHeader String externalSubjectId) { List assetIds = shellLookup.getQuery().getAssetIds(); List externalIds = shellService.findExternalShellIdsByIdentifiersByAnyMatch(shellMapper.fromApiDto(assetIds),getExternalSubjectIdOrEmpty(externalSubjectId)); diff --git a/backend/src/main/resources/static/aas-registry-openapi.yaml b/backend/src/main/resources/static/aas-registry-openapi.yaml index 045c51f6..6a79885a 100644 --- a/backend/src/main/resources/static/aas-registry-openapi.yaml +++ b/backend/src/main/resources/static/aas-registry-openapi.yaml @@ -924,7 +924,7 @@ components: required: - id type: object - example: {"description":[{"language":"de","text":"hello text"},{"language":"en","text":"hello s"}],"displayName":[{"language":"de","text":"this is an example description1"}],"extensions":[{"supplementalSemanticIds":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}],"refersTo":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}]}],"endpoints":[{"interface":"interfaceNameExample","protocolInformation":{"href":"endpointAddressExample","endpointProtocol":"endpointProtocolExample","endpointProtocolVersion":["e"],"subprotocol":"subprotocolExample","subprotocolBody":"subprotocolBodyExample","subprotocolBodyEncoding":"subprotocolBodyExample","securityAttributes":[{"type":"NONE"}]}}],"idShort":"idShortExample","id":"e1eba3d7-91f0-4dac-a730-eaa1d35e035c","specificAssetIds":[{"supplementalSemanticIds":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}],"name":"identifier1KeyExample","value":"identifier1ValueExample"},{"supplementalSemanticIds":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}],"name":"identifier2KeyExample","value":"identifier2ValueExample"}],"submodelDescriptors":[{"endpoints":[{"interface":"interfaceNameExample","protocolInformation":{"href":"endpointAddressExample","endpointProtocol":"endpointProtocolExample","endpointProtocolVersion":["e"],"subprotocol":"subprotocolExample","subprotocolBody":"subprotocolBodyExample","subprotocolBodyEncoding":"subprotocolBodyExample","securityAttributes":[{"type":"NONE"}]}}],"idShort":"idShortExample","id":"cd47615b-daf3-4036-8670-d2f89349d388","semanticId":{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]},"description":[{"language":"de","text":"hello text"},{"language":"en","text":"hello s"}]}]} + example: {"description":[{"language":"de","text":"hello text"},{"language":"en","text":"hello s"}],"displayName":[{"language":"de","text":"this is an example description1"}],"endpoints":[{"interface":"interfaceNameExample","protocolInformation":{"href":"endpointAddressExample","endpointProtocol":"endpointProtocolExample","endpointProtocolVersion":["e"],"subprotocol":"subprotocolExample","subprotocolBody":"subprotocolBodyExample","subprotocolBodyEncoding":"subprotocolBodyExample","securityAttributes":[{"type":"NONE","key": "Security Attribute key","value": "Security Attribute value"}]}}],"idShort":"idShortExample","id":"e1eba3d7-91f0-4dac-a730-eaa1d35e035c","specificAssetIds":[{"supplementalSemanticIds":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}],"name":"identifier1KeyExample","value":"identifier1ValueExample"},{"supplementalSemanticIds":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]}],"name":"identifier2KeyExample","value":"identifier2ValueExample"}],"submodelDescriptors":[{"endpoints":[{"interface":"interfaceNameExample","protocolInformation":{"href":"endpointAddressExample","endpointProtocol":"endpointProtocolExample","endpointProtocolVersion":["e"],"subprotocol":"subprotocolExample","subprotocolBody":"subprotocolBodyExample","subprotocolBodyEncoding":"subprotocolBodyExample","securityAttributes":[{"type":"NONE","key": "Security Attribute key","value": "Security Attribute value"}]}}],"idShort":"idShortExample","id":"cd47615b-daf3-4036-8670-d2f89349d388","semanticId":{"type":"ExternalReference","keys":[{"type":"Submodel","value":"semanticIdExample"}]},"description":[{"language":"de","text":"hello text"},{"language":"en","text":"hello s"}]}]} allOf: - $ref: '#/components/schemas/Descriptor' - properties: @@ -979,12 +979,6 @@ components: maxItems: 10000 items: $ref: '#/components/schemas/LangStringNameType' - extensions: - minItems: 1 - maxItems: 10000 - type: array - items: - $ref: '#/components/schemas/Extension' example: { "endpoints": [ { "protocolInformation": { "endpointAddress": "https://localhost:1234", "endpointProtocolVersion": "1.1" }, "interface": "AAS-1.0" }, { "protocolInformation": { "endpointAddress": "opc.tcp://localhost:4840" }, "interface": "AAS-1.0" }, { "protocolInformation": { "endpointAddress": "https://localhost:5678", "endpointProtocolVersion": "1.1", "subprotocol": "OPC UA Basic SOAP", "subprotocolBody": "ns=2;s=MyAAS", "subprotocolBodyEncoding": "application/soap+xml" }, "interface": "AAS-1.0" } ] } LangStringTextType: allOf: @@ -1043,9 +1037,6 @@ components: Reference: allOf: - $ref: '#/components/schemas/ReferenceParent' - - properties: - referredSemanticId: - $ref: '#/components/schemas/ReferenceParent' ReferenceParent: properties: type: @@ -1327,6 +1318,9 @@ components: type: boolean Endpoint: type: object + required: + - interface + - protocolInformation properties: interface: maxLength: 128 @@ -1409,7 +1403,7 @@ components: type: array items: $ref: '#/components/schemas/Reference' - example: {"endpoints": [{"interface": "interfaceNameExample","protocolInformation": {"href": "endpointAddressExample","endpointProtocol": "endpointProtocolExample","endpointProtocolVersion": [ "e"],"subprotocol": "subprotocolExample","subprotocolBody": "subprotocolBodyExample","subprotocolBodyEncoding": "subprotocolBodyExample","securityAttributes": [{"type": "NONE" }]}}],"idShort": "idShortExample","id": "341f63de-728a-4b6d-9c72-c0d9ba4f8c7d","semanticId": {"type": "ExternalReference","keys": [{"type": "Submodel","value": "semanticIdExample"}]},"description": [{"language": "de","text": "hello text"},{"language": "en","text": "hello s"}]} + example: {"endpoints": [{"interface": "interfaceNameExample","protocolInformation": {"href": "endpointAddressExample","endpointProtocol": "endpointProtocolExample","endpointProtocolVersion": [ "e"],"subprotocol": "subprotocolExample","subprotocolBody": "subprotocolBodyExample","subprotocolBodyEncoding": "subprotocolBodyExample","securityAttributes": [{"type": "NONE","key": "Security Attribute key","value": "Security Attribute value" }]}}],"idShort": "idShortExample","id": "341f63de-728a-4b6d-9c72-c0d9ba4f8c7d","semanticId": {"type": "ExternalReference","keys": [{"type": "Submodel","value": "semanticIdExample"}]},"description": [{"language": "de","text": "hello text"},{"language": "en","text": "hello s"}]} allOf: - $ref: '#/components/schemas/Descriptor' Result: @@ -1621,16 +1615,7 @@ components: "type": "AnnotatedRelationshipElement", "value": "udbffFELY8AudbffZC3^WZ],;udbff^kud8005udbff2ud8002ud800Dud800j" } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "AnnotatedRelationshipElement", - "value": "=udbffJud800budbff4udbffiud800TZud800budbff6ud800sudbffudbff`udbff;qitud800[ud800Rkrud800edud8005Qud800UtSud800F5~ud800[4Jud800cud800:udbffOI8D1udbffIudbff3udbffAudbffpudbffi udbff;ud800kudbffG$udbff[%ud800?6udbffNud800;&udbffMudbffA0eMB*5:JXudbffoudbffQud800\\" - } - ] - } + ] }, "supplementalSemanticIds": [ { @@ -1640,16 +1625,7 @@ components: "type": "AnnotatedRelationshipElement", "value": "Sud800oud800n>NTud800mud800VpV<7rEKPhAudbff`qOudbff]ud800;aud800>udbffav^nudbff;iRudbffsud8002ud800cqut^" } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "AnnotatedRelationshipElement", - "value": "udbffVud800Eudbff9udbffYQ70Q!flyud800rudbffXudbffpZud8008q_Re?oA6cs'ud800u" - } - ] - } + ] } ], "name": "VCudbffB!ud800VkTudbffZdStPOud800:S:P0ud800Budbff;udbff1nootWudb", @@ -1661,16 +1637,7 @@ components: "type": "AnnotatedRelationshipElement", "value": "ud800\\pZLbimgkR[Tudbffpudb", } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "AnnotatedRelationshipElement", - "value": "5Iudbffjud800kudbff?m_$2ud800?udbff^h8udbff^HS$w@Uud8008Gudbfft0ehud800[4udbffoJZZudbffc3udbff4udbff@$ud800f3iud800Vud8005ud800G" - } - ] - } + ] } } ]