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 definedBy validation #348

Closed
wants to merge 1 commit into from
Closed

Add definedBy validation #348

wants to merge 1 commit into from

Conversation

AFOliveira
Copy link
Collaborator

As mentioned in #319. Please let me know if how I structured it makes sense. I put it under the arch test since I believe it kind of belongs to it, but it maybe could be done separately

Signed-off-by: Afonso Oliveira <[email protected]>
@AFOliveira AFOliveira requested a review from dhower-qc as a code owner December 9, 2024 10:48
@dhower-qc
Copy link
Collaborator

This is something that should be handled by JSON Schema, but it's not...

If you follow the schema, eventually you see that the string should match an "extension_name":

    "extension_name": {
      "type": "string",
      "pattern": "^([A-WY])|([SXZ][a-z0-9]+)$"
    },

The pattern is supposed to exclude a comma. But it's actually accepting any string; see https://stackoverflow.com/a/51959769. The whole thing needs to be wrapped in parens:

      "pattern": "^(([A-WY])|([SXZ][a-z0-9]+))$"

With that change, I think it solves the problem.

@AFOliveira
Copy link
Collaborator Author

@dhower-qc Alright! And you've done that in #350, right? If so, I'll just close this

@dhower-qc
Copy link
Collaborator

Actually, I haven't. I fixed the source files, but didn't notice the bug in the schema until now.

@dhower-qc
Copy link
Collaborator

I just added it to #350, so we can close this now. Thanks!

@dhower-qc dhower-qc closed this Dec 10, 2024
@AFOliveira AFOliveira deleted the AFOliveira/definedBy branch December 10, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants