open5e-api icon indicating copy to clipboard operation
open5e-api copied to clipboard

Determine naming strategy for conflicts across publishers / rulesets

Open eepMoody opened this issue 2 years ago • 1 comments

          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 https://github.com/open5e/open5e-api/pull/394#discussion_r1418069315

eepMoody avatar Dec 29 '23 15:12 eepMoody

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.

Sturlen avatar Dec 30 '23 15:12 Sturlen

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 avatar Mar 15 '24 14:03 augustjohnson

This would be resolved with #462

augustjohnson avatar Jun 01 '24 16:06 augustjohnson

This has been resolved.

augustjohnson avatar Jun 05 '24 12:06 augustjohnson