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

Fix v2 key naming for conflicts across publishers / rulesets #402

Closed
eepMoody opened this issue Dec 29, 2023 · 4 comments
Closed

Fix v2 key naming for conflicts across publishers / rulesets #402

eepMoody opened this issue Dec 29, 2023 · 4 comments
Assignees

Comments

@eepMoody
Copy link
Collaborator

          I added a bit more, but I still don't have a great, clean answer for v2 for making PKs when there's conflicts.

Acolyte is a good example. There's one in wotc and one in a5e.

Prepending the publisher name is good, but in what hierarchy? Which publisher is best?
Prepending the ruleset might work, but could there be two "Obsidian Greatsword" items both in 5e?

I suppose I'd tend towards publisher if I had to choose. Maybe we could add a publisher shortname?

Any thoughts?

Originally posted by @augustjohnson in #394 (comment)

@Sturlen
Copy link
Contributor

Sturlen commented Dec 30, 2023

I think they could be separated into a generic id item-obsidian-greatsword and a unique id item-obsidian-greatsword-wotc-dndnext, where the generic id could refer to different items based on your ruleset and the unique id is used for permanent links.

the API could then pick items based on ruleset:
/items/item-obsidian-greatsword?ruleset=dndnext
would return the item
item-obsidian-greatsword-wotc-dndnext

and
/items/item-obsidian-greatsword?ruleset=a5e
item-obsidian-greatsword-wotc-dndnext
would return the item
item-obsidian-greatsword-levelup-a5e

wotc and dnd5e should proabably be the default if you don't supply anything, since these are usually seen as the baseline.

@augustjohnson
Copy link
Collaborator

I think the relatively final naming convention on this will be:

{slugified name}-{document-shortname}.
for example:

magic-missile-srd
keen-intellect-a5esrd
caustic-blood-dmag

There are a few document shortnames that needs to be adjusted. "warlock" for example is pretty misleading.

I will take a crack at this fairly soon.

@augustjohnson augustjohnson self-assigned this Mar 30, 2024
@augustjohnson augustjohnson changed the title Determine naming strategy for conflicts across publishers / rulesets Fix v2 key naming for conflicts across publishers / rulesets Apr 12, 2024
@augustjohnson
Copy link
Collaborator

This would be resolved with #462

@augustjohnson
Copy link
Collaborator

This has been resolved.

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

No branches or pull requests

3 participants