Skip to content

Conversation

@danielpeintner
Copy link
Member

@danielpeintner danielpeintner commented May 6, 2025

Yet another approach... (alternative for #1352)

Advantages I see:

  • each binding can choose the way it likes to create urls if there are thing name clashes. This is anyway a bit of a problematic case since no one can rely on the strategy since it depends on the order a thing has been added.
  • no need for a helpers method
  • no need to pass (and create) a set around with the existing names so far

fixes #1351

@danielpeintner
Copy link
Member Author

@relu91 doesn't like adding "_" since it may become hard to see how man underscores have been used.
I tend to agree with that statement and I will rework the PR.

Copy link
Member

@relu91 relu91 left a comment

Choose a reason for hiding this comment

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

Ok for going with this direction, hoping then, in the future, we will have a more consistent way to generate URLs of afforndances! Thank you @danielpeintner !!!

Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

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

I am also fine with the direction :) Maybe we can refactor the code at some point in the future and move the "sluggification" to a central location to ensure a consistent naming scheme, but for now, this looks good to me :)

Edit: Or rather: Integrate the name clash avoidance into a common sluggification function.

@JKRhb
Copy link
Member

JKRhb commented May 8, 2025

I am also fine with the direction :) Maybe we can refactor the code at some point in the future and move the "sluggification" to a central location to ensure a consistent naming scheme, but for now, this looks good to me :)

Edit: Or rather: Integrate the name clash avoidance into a common sluggification function.

Ah, sorry, I just noticed that that was actually the alternative in the other PR 😅 I have to apologize, I am only slowly getting back into the current set of issues and PRs at the moment. So I think avoiding duplication might still be worth considering in the future, but for now the current approach should work pretty well.

@danielpeintner
Copy link
Member Author

Thank you for your comments!

@danielpeintner danielpeintner merged commit b948e53 into eclipse-thingweb:master May 8, 2025
11 checks passed
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.

Exposing more than 2 instances of the same thing generates duplicate URIs

3 participants