-
Notifications
You must be signed in to change notification settings - Fork 9
Document undocumented properties #69
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
Conversation
@jonnor please review |
@@ -31,4 +38,6 @@ properties: | |||
- { type: 'null' } | |||
- { type: 'string', format: 'date-time' } | |||
|
|||
required: [content] | |||
anyOf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be oneOf
? Must either have content
or starred
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. Let me push a fix
@@ -52,3 +52,6 @@ properties: | |||
example: Bergie Today | |||
required: [url] | |||
required: [url] | |||
dependencies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, did not know that feature before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither. But trying to get the validation to be as close as possible to reality made me peruse the JSON schema docs and find bunch of goodies.
Ideally we should get these to stage where schemas can be trusted for all other validation except side effects (UUID references matching database etc). But that will probably take a few iterations
@@ -146,7 +148,7 @@ properties: | |||
minimum: 0.0 | |||
maximum: 1.0 | |||
site_lang: | |||
type: string | |||
type: [string, "null"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit annoying to allow null
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonnor yeah, but otherwise validation fails for nullable
properties.
Looking good. |
@bergie Merged, deploy at will |
Handles various low-hanging issues by adding missing properties where needed.