Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt the schema files to v3.0.1 #426

Merged
merged 7 commits into from
Jun 20, 2024
Merged

Conversation

s-heppner
Copy link
Collaborator

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.

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.
@s-heppner s-heppner marked this pull request as draft May 6, 2024 13:25
@sebbader-sap sebbader-sap self-requested a review May 7, 2024 15:21
schemas/json/aas.json Show resolved Hide resolved
schemas/json/aas.json Outdated Show resolved Hide resolved
@sebbader-sap
Copy link
Contributor

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

Currently, the regex for Path type is
non-compliant to the specification v3.0,
as it does not allow for AASX packages
to be written.

As a temporary bugfix in v3.0.1, it was decided
to remove the invariant check, as changing the
pattern would result in a breaking change.
This is of course no final solution,
there will be a better fix for version 3.1.

See #299
@s-heppner
Copy link
Collaborator Author

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

@sebbader-sap sebbader-sap self-requested a review May 24, 2024 14:36
Copy link
Contributor

@sebbader-sap sebbader-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"pattern": "^([\\t\\n\\r -\ud7ff\ue000-\ufffd]|\\ud800[\\udc00-\\udfff]|[\\ud801-\\udbfe][\\udc00-\\udfff]|\\udbff[\\udc00-\\udfff])*$"
still has the old regex pattern.

schemas/json/aas.json Show resolved Hide resolved
schemas/json/aas.json Show resolved Hide resolved
@s-heppner
Copy link
Collaborator Author

"pattern": "^([\\t\\n\\r -\ud7ff\ue000-\ufffd]|\\ud800[\\udc00-\\udfff]|[\\ud801-\\udbfe][\\udc00-\\udfff]|\\udbff[\\udc00-\\udfff])*$"

still has the old regex pattern.

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

@s-heppner s-heppner changed the title WIP: Adapt the schema files to v3.0.1 Adapt the schema files to v3.0.1 Jun 7, 2024
@s-heppner s-heppner marked this pull request as ready for review June 7, 2024 13:21
@s-heppner s-heppner changed the title Adapt the schema files to v3.0.1 adapt the schema files to v3.0.1 Jun 7, 2024
@s-heppner s-heppner changed the title adapt the schema files to v3.0.1 Adapt the schema files to v3.0.1 Jun 7, 2024
@sebbader-sap sebbader-sap self-requested a review June 10, 2024 11:02
schemas/xml/AAS.xsd Outdated Show resolved Hide resolved
@sebbader-sap
Copy link
Contributor

@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.
    "pattern": "^([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+([ \\t]*;[ \\t]*([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+|\"(([\\t !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([\\t !-~]|[\\x80-\\xff]))*\"))*$"
    Is this a problem?

@sebbader-sap sebbader-sap self-requested a review June 11, 2024 07:08
@BirgitBoss BirgitBoss added the Schemas generated schemata for xml, JSON and rdf or XMI label Jun 14, 2024
@s-heppner
Copy link
Collaborator Author

@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

Previously, the metamodel version was not clear
from the generated JSON schema.
We adapt the title to include the version.
@s-heppner
Copy link
Collaborator Author

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

@sebbader-sap
Copy link
Contributor

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

@BirgitBoss BirgitBoss merged commit 87cf203 into master Jun 20, 2024
1 of 2 checks passed
@s-heppner s-heppner deleted the SeHe/IDTA-01001-3-0-1_schemata branch June 20, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Schemas generated schemata for xml, JSON and rdf or XMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants