admin-shell-io / aas-specs-api

Repository of the Asset Administration Shell Specification DTA-01002 API
https://admin-shell-io.github.io/aas-specs-antora/index/home/index.html
Creative Commons Attribution 4.0 International
12 stars 5 forks source link

Add http/https to the pattern of a File.Value #279

Open gataka opened 5 months ago

gataka commented 5 months ago

What happens?

During the development of the API for an Public AAS Endpoint, I have found the pattern for the value of a file element.(https://app.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/File). If I understand the pattern, only URLs with the file-protocols are allowed.

Why is this wrong?

The file protocol is not common for public available files. So a support for http/https-URLs is missing.

When the AAS server only delivers public AAS and submodels over the public web. The current approach does not matter this constellation. In the public environment it is common to have links to files, because they might be distributed over a CDN or other file-share-systems. So local paths will not help the client to find the file.

How should it be fixed?

Please add the HTTP(s) support to the pattern:

Example ^http|^https(:)?

It might also be good to have the possibility, when someone calls the /attachment to return with a redirection (302) to another URL.

Thanks.

BirgitBoss commented 5 months ago

Your request should be solved with https://github.com/admin-shell-io/aas-specs/issues/299 (it requires a metamodel change, no API change.)