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:

  • propertyName is required and defines the name of the property in the payload that will hold the discriminator value.
  • mapping is an optional object containing a mapping between property values and schema names or references
In the case of composition via 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 Type
    Method
    Description
    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)
     

    Methods inherited from class com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker

    checkSyntax, getNode, getValidTypes, newMsg

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      checkValue in class com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker
      Throws:
      com.github.fge.jsonschema.core.exceptions.ProcessingException