Skip to content

Fix full schemas #77

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 7 commits into from
Nov 23, 2016
Merged

Fix full schemas #77

merged 7 commits into from
Nov 23, 2016

Conversation

bergie
Copy link
Contributor

@bergie bergie commented Nov 23, 2016

Currently our full schemas are broken due to circular references in contentblock. This makes JSON schema derefencing failures fatal, and fixes the contentblock->specific type circular refs

html: '<audio></audio>'
-
_valid: false
_name: "valid-audio-without-type"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove these testcases?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems they were moved into contentblock.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from here to contentblock since after dereferencing they need the full content block definition for validation to work correctly

src:
"$ref": "contentblock.json#/definitions/src"
description: Block type
example: "text"
Copy link
Contributor

Choose a reason for hiding this comment

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

The example says "text", but only valid in the enum is article ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

src:
"$ref": "contentblock.json#/definitions/src"
description: Block type
example: "text"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same, invalid example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@jonnor
Copy link
Contributor

jonnor commented Nov 23, 2016

@bergie this means that one should never use the individual block schemas right, as they are not complete? For instance article, cta etc. Instead one must use contentblock. Should we then remove the built .json for such not-useful schema snippets, so they are not accidentially used?

@bergie
Copy link
Contributor Author

bergie commented Nov 23, 2016

Well, the JSON needs to be build so contentblock can ref them

@bergie
Copy link
Contributor Author

bergie commented Nov 23, 2016

@jonnor good to go?

@bergie bergie merged commit b23c7a5 into master Nov 23, 2016
@bergie bergie deleted the fix_full_schemas branch November 23, 2016 12:33
@jonnor
Copy link
Contributor

jonnor commented Nov 23, 2016

@bergie 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