-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecated #extend_schema_definition
There are two ways right now to extend a schema, one is by subclassing either an existing validator (eg. `JSON::Schema::Draft4`) and the other is by subclassing the base validator class (`JSON::Schema::Validator`) and calling `extend_schema_definition` in the initializer. This method merges the recognised json schema properties of another validator into your new validator. Unfortunately this is effectively the same as subclassing. What's worse, `extend_schema_definition` does not merge in any of the other characteristics of a validator (eg. the formats or names etc needed for a schema to work). All of the validator classes that come with json-schema use subclassing, rather than `extend_schema_definition`. Because of this, I propose that we should deprecate `extend_schema_definition` and encourage people to subclass instead.
- Loading branch information
1 parent
5a9528b
commit c9f9afc
Showing
4 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters