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

support custom datatypes #179

Open
persona0591 opened this issue Aug 3, 2023 · 4 comments
Open

support custom datatypes #179

persona0591 opened this issue Aug 3, 2023 · 4 comments

Comments

@persona0591
Copy link

Hi!

Thanks for this library - very helpful! :)

I'm trying to add a claim ("P1") to an entity ("Q1") in a Wikibase instance. This instance has its own, custom datatype for "P1" (named "urix").

If I run e.g.

wb add-claim Q1 P1 "test"

... then the response is:

unsupported datatype: urix. Please open an issue at ...

How can I use this library for custom datatypes?

@maxlath maxlath changed the title Question: add claim about property with custom datatype? support custom datatypes Aug 3, 2023
@maxlath
Copy link
Owner

maxlath commented Aug 3, 2023

Hi! That's the first time I encounter that problem, so it had not been considered until now for this lib, I'm afraid ^^ The problem comes from wikibase-edit, which doesn't know how to validate and format that unknown datatype

@persona0591
Copy link
Author

Hi @maxlath Thank you - good to know! Do you have plans to support this feature? Or do you know of a workaround?

@maxlath
Copy link
Owner

maxlath commented Aug 4, 2023

Different possibilities:

  • wikibase-edit could support declaring custom datatypes in some way: we would need a way to declare a statement builder function for that datatype, or to declare that that custom datatype has the same shape as another known datatype
  • you could fork wikibase-edit to add the desired statement builder function, possibly by just aliasing the new datatype to an existing builder, as it already done for most datatypes

@persona0591
Copy link
Author

Hi @maxlath Thank you, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants