eclipse-aaspe / server

C# based server for AASX packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aasx-server and aasx-code3.0 Verify conflict

EmilAlipiev opened this issue · comments

In general there aasx-server source code has problem with the sub list when they are null, it crashes or silently failing. For example, we have found out that when submodels list is "null" for created shell it crashes. see the image below
MicrosoftTeams-image

but then when you create an empty list, Verify, you get error as below
"Invariant violated:
Statements must be either not set or have at least one item."

var verifyResultErrors = Verification.Verify(submodel);

So it makes verification not useful. I believe here verify method doest correct job while aasx-server code should make a null check in general.

Hi @EmilAlipiev,

Could you please describe the test scenario, so that we can reproduce the issue?

well, the main problem here is Api is accepting requests and returns 200 even when the verification fails. Api only fails, if you enable "IsMetamodelVerificationStrict" as shown below. So what is the purpose of verify if Server Api is accepting failed verification request.

image

Hi @EmilAlipiev,

The parameter "IsMetamodelVerificationStrict" has been added to énable or disable the verification. Verfication also considers constraints. When there are AASX files with metamodel V1 or V2 being loaded and converted to V3 in the server, the corresponding AASs cannot be strictly conformant with V3 metamodel including constaints. Hence, in such situations, the flag "IsMetamodelVerificationStrict" is disabled.