aas-core-works / aas-core-meta

Provide formalized meta-models for Asset Administration Shell (AAS).
Other
9 stars 3 forks source link

External links possible? #283

Closed DenisBiondic closed 10 months ago

DenisBiondic commented 10 months ago

First of all, great work on the library.

Question regarding external references - reading here it should be possible: https://github.com/admin-shell-io/questions-and-answers/tree/master#id2

However, this code always throws validation exceptions on anything but RFC 8089 file schema:

var file = new Core.File("image/jpeg", value: "http://website.com/file.png");
var error = Core.Verification.Verify(file);
error.Should().BeEmpty();

AAS 3.0.1 in question here ...

mristin commented 10 months ago

Hi @DenisBiondic! File is actually meant as a reference to a file in an AASX package, and should conform to RFC 8089. The class name File is a misnomer; it should have been called DataResource or something similar.

If you want to put external links, use Property with value type set to AnyURI. There is an ongoing discussion in the AAS workstream "Cloud Repository" what to do about the URLs and external files.

I'll close the issue for now as it is not directly related to aas-core-meta (aas-core-meta is a formalization of the specs, but we do not decide about the specs). Please create an issue on https://github.com/admin-shell-io/aas-specs if you think that the meta-model itself should be changed.