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.
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.