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:
- The defined discriminator
propertyNamemust exist and must be a non-empty String value - The defined discriminator
propertyNamevalue 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
ConstructorsConstructorDescriptionDiscriminatorKeywordValidator(com.fasterxml.jackson.databind.JsonNode digest) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoValidate(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) toString()voidvalidate(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
-
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
- Specified by:
toStringin classcom.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
-