Interface Validator

All Known Implementing Classes:
AbbreviationNameValidator, AbstractValidator, ArnTemplateValidator, AuthorizersTraitValidator, AuthTraitValidator, CamelCaseValidator, CfnMutabilityTraitValidator, CfnResourcePropertyValidator, ClientEndpointDiscoveryValidator, ConditionKeysValidator, DefaultTraitValidator, DefaultValueInUpdateValidator, DeprecatedTraitValidator, EmitEachSelectorValidator, EmitNoneSelectorValidator, EndpointTestsTraitValidator, EnumShapeValidator, EnumTraitValidator, ErrorRenameValidator, EventPayloadTraitValidator, EventSourceValidator, ExamplesTraitValidator, ExclusiveStructureMemberTraitValidator, HostLabelTraitValidator, HttpApiKeyAuthTraitValidator, HttpBindingsMissingValidator, HttpChecksumTraitValidator, HttpHeaderTraitValidator, HttpLabelTraitValidator, HttpMalformedRequestTestsValidator, HttpMethodSemanticsValidator, HttpPayloadValidator, HttpPrefixHeadersTraitValidator, HttpQueryParamsTraitValidator, HttpQueryTraitValidator, HttpRequestTestsInputValidator, HttpResponseCodeSemanticsValidator, HttpResponseTestsErrorValidator, HttpResponseTestsOutputValidator, HttpUriConflictValidator, HttpUriFormatValidator, InputOutputStructureReuseValidator, JsonNameValidator, LengthTraitValidator, MediaTypeValidator, MissingClientOptionalTrait, MissingPaginatedTraitValidator, MissingSensitiveTraitValidator, MixinValidator, MqttPublishInputValidator, MqttSubscribeInputValidator, MqttSubscribeOutputValidator, MqttTopicConflictValidator, MqttTopicLabelValidator, MqttUnsupportedErrorsValidator, NoInlineDocumentSupportValidator, NoninclusiveTermsValidator, OperationValidator, PaginatedTraitValidator, PatternTraitValidator, PrivateAccessValidator, ProtocolHttpPayloadValidator, ProtocolHttpValidator, RangeTraitValidator, ReferencesTraitValidator, RepeatedShapeNameValidator, ReservedWordsValidator, ResourceCycleValidator, ResourceIdentifierBindingValidator, ResourceIdentifierValidator, ResourceLifecycleValidator, ResourceOperationInputOutputValidator, SdkServiceIdValidator, ServiceTaggingValidator, ServiceValidator, SetValidator, ShapeIdConflictValidator, ShapeRecursionValidator, ShouldHaveUsedTimestampValidator, SingleOperationBindingValidator, SingleResourceBindingValidator, StandardOperationVerbValidator, StaticContextParamsTraitValidator, StreamingTraitValidator, StutteredShapeNameValidator, TagEnabledServiceValidator, TaggableResourceValidator, TagResourcePropertyNameValidator, TagResourcePropertyTypeValidator, TargetValidator, TraitBreakingChangesValidator, TraitConflictValidator, TraitTargetValidator, TraitValueValidator, UnionValidator, UniqueProtocolTestCaseIdValidator, UniqueWaiterNamesValidator, UnitTypeValidator, UnreferencedShapeValidator, UnstableTraitValidator, WaitableTraitValidator, XmlNamespaceTraitValidator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Validator
Validates a Model and returns a list of ValidationEvent.

A Validator is used to enforce constraints on a model. This interface is used to implement both built-in validation that runs on all Smithy loaded models and custom validators that can be registered when loading a model. Registering a Validator class as a service provider for the Validator interface will cause the validator to be applied each time a Model is built using a ModelAssembler.

The ValidatorService class is used to provide a service provider for validators that can be configured in the Smithy model via the validators[] metadata.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Event ID used when something in the model is deprecated.
    static final String
    Event ID used for structural errors encountered when loading a model.
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(Model model)
    Validates a model and returns a list of validation events.
  • Field Details

    • MODEL_ERROR

      static final String MODEL_ERROR
      Event ID used for structural errors encountered when loading a model.
      See Also:
    • MODEL_DEPRECATION

      static final String MODEL_DEPRECATION
      Event ID used when something in the model is deprecated.
      See Also:
  • Method Details

    • validate

      List<ValidationEvent> validate(Model model)
      Validates a model and returns a list of validation events.
      Parameters:
      model - Model to validate.
      Returns:
      List of validation events.