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

Inconsistency between CHIP-0007 specification and JSON Schema #40

Open
canardleteer opened this issue Nov 21, 2022 · 5 comments
Open

Inconsistency between CHIP-0007 specification and JSON Schema #40

canardleteer opened this issue Nov 21, 2022 · 5 comments

Comments

@canardleteer
Copy link

I noticed that the CHIP-0007 spec document, specifies the that a Collection's ID is a string.. The JSON Schema provided, specifies this as a string with a format of UUID. There is no mention of "UUID" at all, in the specification itself.

I'm fine with (and welcome) the JSON Schema providing this additional constraint, however, I'd suggest it be added to the human readable specification as well... or be removed from from the JSON Schema version.

@danieljperry
Copy link
Contributor

Good catch! I'll add a note to the spec that the format needs to be uuid.

@canardleteer
Copy link
Author

@danieljperry - Found another one. I promise I'm not being pedantic, but I am letting Rust and Quickcheck be pedantic for me, and I'm just reporting what it's yelling at me about. :)

series_number & series_total are defined in the spec as "integers." 0 is an integer (I'll let mathematicians debate this separately), as is -1000. I don't imagine it makes sense to use a negative number at all for either (I assumed u64 myself), but I could see someone choosing a Series Number of 0, or being quirky and counting up towards 0 in series_number from -1000... As written, the spec allows for any integer. The JSON Schema, quite reasonably specifies that these two numbers must be a positive integer greater than 0.

I'd suggest the spec annotate that these numbers must be a "positive integer greater than 1," or the constraint relaxed in the JSON Schema.

@danieljperry
Copy link
Contributor

No problem, thanks for pointing this out. The following two PRs will add errata for the respective updates you have requested:

#41
#42

@RightSexyOrc
Copy link
Contributor

Our Collection ID is not a UUID, so it may be late on that item.

@canardleteer
Copy link
Author

Thanks @danieljperry! I didn't quite have the time to read up on the CHIP process for Errata, so didn't submit any MR's directly, and am hesitant to just close this without #42 landing upstream... But I will try to read through the process doc when I get the chance.

I guess feel free to close at your leisure?

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