Closed lenaxus closed 5 months ago
Hi @lenaxus, thanks for your comment.
The check_...
functions return an object which has an ok() method.
I updated the README accordingly, for example:
from aas_test_engines import file
aas = {
'assetAdministrationShells': [],
'submodels': [],
'conceptDescriptions': []
}
result = file.check_json_data(aas)
# result.ok() == True
result.dump()
Hi @otto-ifak, thank you for your reply. It works now, I got the result :)
I am getting now the output:
Does not match all sub-schemas
Reference #/$defs/Environment is invalid
Property assetAdministrationShells is invalid
item 0 is invalid
Property submodels is invalid
Array is shorter than 1
Property conceptDescriptions is invalid
Array is shorter than
So it seems that my inserted AAS which should be valid (it is a different one from above) is invalid. Is it possible that you can give here more insights why it is invalid? That would be very helpful!
The arrays 'assetAdministrationShells', submodels
and conceptDescriptions
are not allowed to be empty:
https://github.com/admin-shell-io/aas-specs/blob/f4662a61cb7cdb180a779da38b409e7ead749628/schemas/json/aas.json#L582
Additionally: we planned to address https://github.com/admin-shell-io/aas-test-engines/issues/4 next week, this will provide you with more details when a file is rejected.
Marking this as closed, please continue discussion in https://github.com/admin-shell-io/aas-test-engines/issues/6
Expected Behavior
I want to check my AAS to prove if it is Metamodel Version 3 confirm. I have choosen the variant to check json data directly.
Actual Behavior
The script is running but I never got any result information. I tried valid AASes and non-valid AASes.
Steps to Reproduce the Problem
print('I am in')
Or check data directly
aas = { 'assetAdministrationShells': [ { "extension": [ { "semanticId": { "type": "ExternalReference", "keys": [ { "type": "GlobalReference", "value": "" } ] }, "name": "MaterialNumber", "valueType": "xs:string", "value": "" }, { "semanticId": { "type": "ExternalReference", "keys": [ { "type": "GlobalReference", "value": "" } ] }, "name": "Author", "valueType": "xs:string", "value": "" }, { "semanticId": { "type": "ExternalReference", "keys": [ { "type": "GlobalReference", "value": "" } ] }, "name": "CreationDate", "valueType": "xs:dateTime", "value": "" } ], "administration": { "version": "1", "revision": "0" } } ], 'submodels': [], 'conceptDescriptions': [] } file.check_json_data(aas)
print('I am finished')
I am in I am finished