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

Add verifcation function for RFC 2396, adapt Path_type #349

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

s-heppner
Copy link
Collaborator

Version 3.1 of the metamodel changes the Path_type to be conforming to RFC 2396 (see spec-link ).

As we did not have a verifcation function for this RFC, we add the function matches_RFC_2396 based on this abnf_to_regexp test case and adapt the Path_type invariant accordingly.

@s-heppner s-heppner added the V3.1 SpecAAS V3.1 label Oct 18, 2024
@s-heppner
Copy link
Collaborator Author

I still seem to have some issues with the regular expression provided with abnf_to_regexp:

At line 229 and column 2: (mristin, 2024-05-31): We expect all the patterns to be anchored at the start (``^``) and at the end (``$``) for inter-operability with different regex engines, *e.g.*, XSD engines. Please consider re-writing your pattern with a prefix ``^.*``, if you want to match an arbitrary prefix, and a suffix ``.*$``, if you want to match an arbitrary suffix. The pattern in question inferred for the verification function 'matches_RFC_2396

@s-heppner s-heppner changed the title v3.1: Add verifcation function for RFC 2396, adapt Path_type Add verifcation function for RFC 2396, adapt Path_type Oct 18, 2024
Version 3.1 of the metamodel changes the
`Path_type` to be conforming to RFC 2396
(see [spec-link]).
As we did not have a verifcation function for this
RFC, we add the function `matches_RFC_2396` based
on this [abnf_to_regexp test case] and adapt the
`Path_type` invariant accordingly.

[spec-link](https://admin-shell-io.github.io/aas-specs-antora/IDTA-01001/v3.1/spec-metamodel/datatypes.html#PathType)
[abnf_to_regexp test case](https://github.com/aas-core-works/abnf-to-regexp/blob/main/test_data/nested-python/rfc2396/expected.py)
@mristin mristin marked this pull request as ready for review October 22, 2024 06:52
@mristin mristin merged commit c106d4c into v3.1/main Oct 22, 2024
2 checks passed
@mristin mristin deleted the Add/RFC2396 branch October 22, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3.1 SpecAAS V3.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants