Skip to content

Support URIs with interpolation #880

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

Conversation

matthias-pichler
Copy link
Collaborator

@matthias-pichler matthias-pichler commented Jun 3, 2024

Signed-off-by: Matthias Pichler [email protected]

Please specify parts of this PR update:

  • Specification
  • Schema
  • Examples
  • Extensions
  • Use Cases
  • Community
  • CTK
  • Other

Discussion or Issue link:

Closes #878

What this PR does:

I added a custom uri definition that uses the Regex from the URI RFC to validate usi and therefore allows curly braces {}

Additional information:

I replaced all occurences of uri ... even those for event listers, externalResources etc ... is that desired?

Signed-off-by: Matthias Pichler <[email protected]>
@cdavernas
Copy link
Member

I replaced all occurences of uri ... even those for event listers, externalResources etc ... is that desired?

Yes, you rule! Thank you!

@matthias-pichler
Copy link
Collaborator Author

matthias-pichler commented Jun 3, 2024

I saw: #879 use format: uri-template which I didn't even know existed but seems more correct?

@ricardozanini
Copy link
Member

@cdavernas I don't think that's desired. JSON Schema already has the uri-template format that we can leverage, so only the endpoint attribute requires that the URI has a template, not all of them. I went through each URI field and I believe only that one is a valid template one?

Also, uri-template also validates uri.

@ricardozanini
Copy link
Member

I saw: #869 use format: uri-template which I didn't even know existed but seems more correct?

That's #879

The idea is to use format: uri for fixed URIs and format: uri-template for the ones we need templating, so leveraging directly from the RFC instead of bringing the regex it's safer IMO.

@matthias-pichler
Copy link
Collaborator Author

@cdavernas I don't think that's desired. JSON Schema already has the uri-template format that we can leverage, so only the endpoint attribute requires that the URI has a template, not all of them. I went through each URI field and I believe only that one is a valid template one?

Also, uri-template also validates uri.

Jap I am going to close this in favor of #879

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.

Fix endpoint URI format in workflow SCHEMA
3 participants