Skip to content

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

Merged
merged 12 commits into from
Nov 17, 2016
Merged

Document undocumented properties #69

merged 12 commits into from
Nov 17, 2016

Conversation

bergie
Copy link
Contributor

@bergie bergie commented Nov 16, 2016

Handles various low-hanging issues by adding missing properties where needed.

@bergie bergie changed the title WIP: Document undocumented properties Document undocumented properties Nov 16, 2016
@bergie
Copy link
Contributor Author

bergie commented Nov 17, 2016

@jonnor please review

@@ -31,4 +38,6 @@ properties:
- { type: 'null' }
- { type: 'string', format: 'date-time' }

required: [content]
anyOf:
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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"]
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@jonnor
Copy link
Contributor

jonnor commented Nov 17, 2016

Looking good.

@jonnor jonnor merged commit 2875877 into master Nov 17, 2016
@jonnor jonnor deleted the undocumented_properties branch November 17, 2016 16:24
@jonnor
Copy link
Contributor

jonnor commented Nov 17, 2016

@bergie Merged, deploy at will

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

Successfully merging this pull request may close these issues.

2 participants