aas-specs icon indicating copy to clipboard operation
aas-specs copied to clipboard

WIP: Adapt the schema files to v3.0.1

Open s-heppner opened this issue 9 months ago • 2 comments

This adapts the schema files to version 3.0.1 of the specification.

However, this is not an official release yet and may be subject to change. This is only meant as reference for the API specification.

s-heppner avatar May 06 '24 13:05 s-heppner

@s-heppner what is the state here? Please ping me when I can re-review this PR again.

sebbader-sap avatar May 21 '24 08:05 sebbader-sap

@sebbader-sap You can use the now updated version for the API generation, however we still need to run the tests and generate the example files, before I will mark this PR as ready.

s-heppner avatar May 23 '24 12:05 s-heppner

https://github.com/admin-shell-io/aas-specs/blob/b0e3e73e0584a869adc62fec30cce94d923eabe6/schemas/json/aas.json#L44 still has the old regex pattern.

This should be resolved now. Can you please check again?

s-heppner avatar Jun 07 '24 13:06 s-heppner

@s-heppner the current state looks good for me, just two last questions:

  1. See my comment above about the cardinality declaration. I am just not sure whether {,2} is a valid shortcut for {0,2}. Can you confirm this?
  2. You removed the spaces from the general String-checking regex pattern, this seems fine therefore. However, I still find patterns with spaces, e.g. https://github.com/admin-shell-io/aas-specs/blob/6ab2e16187c3a3f1a60d722860e553b48ce201e3/schemas/json/aas.json#L692 Is this a problem?

sebbader-sap avatar Jun 10 '24 16:06 sebbader-sap

@sebbader-sap

ad 1.) The zero is optional in regexes, see this comment

ad 2.) From all I can tell, this regex is fine and generally the spaces shouldn't place problems.

Please wait with the release until I was able to run the schema generation one last time, since we found one last issue: aas-core-works/aas-core-codegen#494

s-heppner avatar Jun 18 '24 07:06 s-heppner

I regenerated the JSON Schema and confirmed that there are no other effects of aas-core-works/aas-core-codegen#494.

Therefore, this is now ready for release, as far as I'm converned

s-heppner avatar Jun 18 '24 08:06 s-heppner

@BirgitBoss I can confirm Sebastian's statement on the "contentType" regex. I just finished a bunch of tests and now agree that the pattern is working accordingly. (Even though the spaces do have an effect, same as the tabs ('\t'), this effect is exactly as desired as far as I understand it.) From my point of view, you merge this PR.

sebbader-sap avatar Jun 18 '24 14:06 sebbader-sap