Skip to content

Commit

Permalink
refactored openapi yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
agg3fe committed Aug 14, 2023
1 parent d1c1f73 commit aa78dc1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 47 deletions.
7 changes: 1 addition & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ public ResponseEntity<List<SpecificAssetId>> 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<List<String>> postQueryAllAssetAdministrationShellIds(ShellLookup shellLookup,@RequestHeader String externalSubjectId) {
List<SpecificAssetId> assetIds = shellLookup.getQuery().getAssetIds();
List<String> externalIds = shellService.findExternalShellIdsByIdentifiersByAnyMatch(shellMapper.fromApiDto(assetIds),getExternalSubjectIdOrEmpty(externalSubjectId));
Expand Down
49 changes: 8 additions & 41 deletions backend/src/main/resources/static/aas-registry-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1043,9 +1037,6 @@ components:
Reference:
allOf:
- $ref: '#/components/schemas/ReferenceParent'
- properties:
referredSemanticId:
$ref: '#/components/schemas/ReferenceParent'
ReferenceParent:
properties:
type:
Expand Down Expand Up @@ -1327,6 +1318,9 @@ components:
type: boolean
Endpoint:
type: object
required:
- interface
- protocolInformation
properties:
interface:
maxLength: 128
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1621,16 +1615,7 @@ components:
"type": "AnnotatedRelationshipElement",
"value": "udbffFELY8AudbffZC3^WZ],;udbff^kud8005udbff2ud8002<Sud800Rkudbffb>ud800Dud800j"
}
],
"referredSemanticId": {
"type": "ExternalReference",
"keys": [
{
"type": "AnnotatedRelationshipElement",
"value": "=udbffJud800budbff4udbffiud800TZud800budbff6ud800sudbff<udbff>udbff`udbff;qitud800[ud800Rkrud800edud8005Qud800UtSud800F5~ud800[4Jud800cud800:udbffOI8D1udbffIudbff3udbffAudbffpudbffi udbff;ud800kudbffG$udbff[%ud800?6udbffNud800;&udbffMudbffA0eMB*5:JXudbffoudbffQud800\\"
}
]
}
]
},
"supplementalSemanticIds": [
{
Expand All @@ -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",
Expand All @@ -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@Uud8008G<Xud800p_gr9gud800Tud800RB'ud800jud8008udbffaud8008ud800<Dud800WudbffSud800SudbffuudbffT@1\\udbffM\"PG0udbffp$ud800Wudbff>udbfft0ehud800[4udbffoJZZudbffc3udbff4udbff@$ud800f3iud800Vud8005ud800G"
}
]
}
]
}
}
]
Expand Down

0 comments on commit aa78dc1

Please sign in to comment.