Class DiscriminatorSyntaxChecker
java.lang.Object
com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker
com.atlassian.oai.validator.schema.keyword.DiscriminatorSyntaxChecker
- All Implemented Interfaces:
com.github.fge.jsonschema.core.keyword.syntax.checkers.SyntaxChecker
public class DiscriminatorSyntaxChecker
extends com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker
Syntax checker for the
discriminator keyword introduced by the OpenAPI / Swagger specification.
According to https://swagger.io/specification/#discriminator-object:
propertyNameis required and defines the name of the property in the payload that will hold the discriminator value.mappingis an optional object containing a mapping between property values and schema names or references
allOf, the property name must exist in the object in which the discriminator is defined.
For oneOf and anyOf composition, the property name must exist in all of the referenced schemas.
If a mapping is used, the listed schemas must match a schema definition, or be an external ref.
- See Also:
-
Field Summary
Fields inherited from class com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker
keyword -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckValue(Collection<com.github.fge.jackson.jsonpointer.JsonPointer> pointers, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.jsonschema.core.tree.SchemaTree tree) Methods inherited from class com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker
checkSyntax, getNode, getValidTypes, newMsg
-
Method Details
-
checkValue
protected void checkValue(Collection<com.github.fge.jackson.jsonpointer.JsonPointer> pointers, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.jsonschema.core.tree.SchemaTree tree) throws com.github.fge.jsonschema.core.exceptions.ProcessingException - Specified by:
checkValuein classcom.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker- Throws:
com.github.fge.jsonschema.core.exceptions.ProcessingException
-