Class DiscriminatorKeywordValidator

java.lang.Object
com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
com.atlassian.oai.validator.schema.keyword.DiscriminatorKeywordValidator
All Implemented Interfaces:
com.github.fge.jsonschema.keyword.validator.KeywordValidator

public class DiscriminatorKeywordValidator extends com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
Keyword validator for the discriminator keyword introduced by the OpenAPI / Swagger specification.

Implements the following validations:

  1. The defined discriminator propertyName must exist and must be a non-empty String value
  2. The defined discriminator propertyName value must be the shorthand name of the "child" schema, or a valid value from the mapping node
See Also:
  • Field Summary

    Fields inherited from class com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator

    keyword
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiscriminatorKeywordValidator(com.fasterxml.jackson.databind.JsonNode digest)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doValidate(com.github.fge.jsonschema.core.processing.Processor<com.github.fge.jsonschema.processors.data.FullData,com.github.fge.jsonschema.processors.data.FullData> processor, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.processors.data.FullData data)
     
     
    void
    validate(com.github.fge.jsonschema.core.processing.Processor<com.github.fge.jsonschema.processors.data.FullData,com.github.fge.jsonschema.processors.data.FullData> processor, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.processors.data.FullData data)
     

    Methods inherited from class com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator

    newMsg, newMsg, toArrayNode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DiscriminatorKeywordValidator

      public DiscriminatorKeywordValidator(com.fasterxml.jackson.databind.JsonNode digest)
  • Method Details

    • validate

      public void validate(com.github.fge.jsonschema.core.processing.Processor<com.github.fge.jsonschema.processors.data.FullData,com.github.fge.jsonschema.processors.data.FullData> processor, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.processors.data.FullData data) throws com.github.fge.jsonschema.core.exceptions.ProcessingException
      Throws:
      com.github.fge.jsonschema.core.exceptions.ProcessingException
    • doValidate

      public void doValidate(com.github.fge.jsonschema.core.processing.Processor<com.github.fge.jsonschema.processors.data.FullData,com.github.fge.jsonschema.processors.data.FullData> processor, com.github.fge.jsonschema.core.report.ProcessingReport report, com.github.fge.msgsimple.bundle.MessageBundle bundle, com.github.fge.jsonschema.processors.data.FullData data) throws com.github.fge.jsonschema.core.exceptions.ProcessingException
      Throws:
      com.github.fge.jsonschema.core.exceptions.ProcessingException
    • toString

      public String toString()
      Specified by:
      toString in class com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator