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

Document limited uri-template support #955

Merged

Conversation

matthias-pichler
Copy link
Collaborator

Signed-off-by: Matthias Pichler m.pichler@warrify.com

Please specify parts of this PR update:

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

Discussion or Issue link:

As discussed in #910

What this PR does:

Documents the frequently used by undocumented string substitution feature

Additional information:

Signed-off-by: Matthias Pichler <m.pichler@warrify.com>
@cdavernas cdavernas added change: fix Something isn't working. Impacts in a minor version change. change: documentation Improvements or additions to documentation. It won't impact a version change. area: spec Changes in the Specification labels Aug 4, 2024
@cdavernas cdavernas added this to the v1.0.0-alpha3 milestone Aug 4, 2024
@cdavernas
Copy link
Member

I'm not sure string substitution should be allowed everywhere, but instead should be restricted to URIs, else it would ask too much checks at runtime, don't you think?

@matthias-pichler
Copy link
Collaborator Author

I'm not sure string substitution should be allowed everywhere, but instead should be restricted to URIs, else it would ask too much checks at runtime, don't you think?

actually I think it should be available everywhere where a runtime expression could be used (so pretty much everywhere 😅 ).
Furthermore most uris are currently defined as uri-template in the schema ... are wqe planning on supporting the full uri-template syntax or only the simple substitution?

@cdavernas
Copy link
Member

actually I think it should be available everywhere where a runtime expression could be used

That's why I'd personally refrain from doing so, as you can easily do that using runtime expressions, which are much easier to spot for a runtime.

This would imho become extremely cumbersome to have to check for both ${} blocks and {} blocks, which could in addition conflict.

Furthermore, it would mean authors would not be able to use those characters without forcing runtimes to evaluate, even when not necessary, therefore needing some escaping feature.

Anyhow, thats just me, let's see what @JBBianchi, @fjtirado and @ricardozanini think about it 😉

@cdavernas
Copy link
Member

Furthermore most uris are currently defined as uri-template in the schema ... are wqe planning on supporting the full uri-template syntax or only the simple substitution?

IMHO only simple substitution

@matthias-pichler
Copy link
Collaborator Author

That's why I'd personally refrain from doing so, as you can easily do that using runtime expressions, which are much easier to spot for a runtime.

This would imho become extremely cumbersome to have to check for both ${} blocks and {} blocks, which could in addition conflict.

Furthermore, it would mean authors would not be able to use those characters without forcing runtimes to evaluate, even when not necessary, therefore needing some escaping feature.

No strong opinion from my side. I am fine with only allowing this in URIs. In this case though I would rephrase the feature away from "string substitution" to "limited support for uri-template syntax". This would then allow us to expand to support additional uri-template features in the future (or now?).

@matthias-pichler matthias-pichler changed the title Document string substitution feature Document limited uri-template support Aug 5, 2024
Signed-off-by: Matthias Pichler <m.pichler@warrify.com>
Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

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

LGTM, aside from two little typos ;) Many thanks!

dsl-reference.md Outdated Show resolved Hide resolved
dsl-reference.md Outdated Show resolved Hide resolved
Signed-off-by: Matthias Pichler <m.pichler@warrify.com>
@fjtirado
Copy link
Collaborator

fjtirado commented Aug 5, 2024

Although already changed, I agree with @cdavernas. String substitution should apply only to uri templates

Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks man!

@ricardozanini ricardozanini merged commit 434e0eb into serverlessworkflow:main Aug 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: spec Changes in the Specification change: documentation Improvements or additions to documentation. It won't impact a version change. change: fix Something isn't working. Impacts in a minor version change.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants