Interface Validator
-
- All Known Implementing Classes:
AbbreviationNameValidator
,AbstractValidator
,ArnTemplateValidator
,AuthorizersTraitValidator
,AuthTraitValidator
,AwsSpecialCaseEndpointValidator
,CamelCaseValidator
,CfnMutabilityTraitValidator
,CfnResourcePropertyValidator
,ClientEndpointDiscoveryValidator
,ConditionKeysValidator
,DefaultTraitValidator
,DefaultValueInUpdateValidator
,DeprecatedTraitValidator
,EmitEachSelectorValidator
,EmitNoneSelectorValidator
,EndpointTestsTraitValidator
,EnumShapeValidator
,EnumTraitValidator
,ErrorRenameValidator
,EventPayloadTraitValidator
,EventSourceValidator
,ExamplesTraitValidator
,ExclusiveStructureMemberTraitValidator
,HostLabelTraitValidator
,HttpApiKeyAuthTraitValidator
,HttpBindingsMissingValidator
,HttpBindingTraitIgnoredValidator
,HttpChecksumTraitValidator
,HttpHeaderTraitValidator
,HttpLabelTraitValidator
,HttpMalformedRequestTestsValidator
,HttpMethodSemanticsValidator
,HttpPayloadValidator
,HttpPrefixHeadersTraitValidator
,HttpQueryParamsTraitValidator
,HttpQueryTraitValidator
,HttpRequestTestsInputValidator
,HttpResponseCodeSemanticsValidator
,HttpResponseTestsErrorValidator
,HttpResponseTestsOutputValidator
,HttpUriConflictValidator
,HttpUriFormatValidator
,IamActionValidator
,IamResourceTraitValidator
,InputOutputStructureReuseValidator
,JsonNameValidator
,LengthTraitValidator
,MediaTypeValidator
,MissingClientOptionalTrait
,MissingPaginatedTraitValidator
,MissingSensitiveTraitValidator
,MqttTopicConflictValidator
,MqttTopicLabelValidator
,NoInlineDocumentSupportValidator
,NoninclusiveTermsValidator
,OperationValidator
,PaginatedTraitValidator
,PatternTraitValidator
,PrivateAccessValidator
,ProtocolHttpPayloadValidator
,ProtocolHttpValidator
,RangeTraitValidator
,ReferencesTraitValidator
,RepeatedShapeNameValidator
,RequestCompressionTraitValidator
,ReservedWordsValidator
,ResourceCycleValidator
,ResourceIdentifierBindingValidator
,ResourceIdentifierValidator
,ResourceLifecycleValidator
,ResourceOperationInputOutputValidator
,Rpcv2CborTraitValidator
,RuleSetAuthSchemesValidator
,RuleSetAwsBuiltInValidator
,RuleSetBuiltInValidator
,RuleSetParameterValidator
,RuleSetParamMissingDocsValidator
,RuleSetTestCaseValidator
,RuleSetUriValidator
,SdkServiceIdValidator
,ServiceAuthDefinitionsValidator
,ServiceTaggingValidator
,ServiceValidator
,SetValidator
,ShapeIdConflictValidator
,ShapeRecursionValidator
,ShouldHaveUsedTimestampValidator
,SigV4TraitsValidator
,SingleOperationBindingValidator
,SingleResourceBindingValidator
,SmokeTestCaseValidator
,StandardOperationVerbValidator
,StaticContextParamsTraitValidator
,StreamingTraitValidator
,StutteredShapeNameValidator
,TagEnabledServiceValidator
,TaggableResourceValidator
,TagResourcePropertyNameValidator
,TagResourcePropertyTypeValidator
,TargetValidator
,TraitBreakingChangesValidator
,TraitConflictValidator
,TraitTargetValidator
,TraitValidatorsValidator
,TraitValueValidator
,UnionValidator
,UniqueProtocolTestCaseIdValidator
,UniqueSmokeTestCaseIdValidator
,UniqueWaiterNamesValidator
,UnitTypeValidator
,UnreferencedShapeValidator
,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 aModel
and returns a list ofValidationEvent
.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 aValidator
class as a service provider for theValidator
interface will cause the validator to be applied each time a Model is built using aModelAssembler
.The
ValidatorService
class is used to provide a service provider for validators that can be configured in the Smithy model via thevalidators[]
metadata.- See Also:
ValidationEvent
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MODEL_DEPRECATION
Event ID used when something in the model is deprecated.static java.lang.String
MODEL_ERROR
Event ID used for structural errors encountered when loading a model.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ValidationEvent>
validate(Model model)
Validates a model and returns a list of validation events.
-
-
-
Field Detail
-
MODEL_ERROR
static final java.lang.String MODEL_ERROR
Event ID used for structural errors encountered when loading a model.- See Also:
- Constant Field Values
-
MODEL_DEPRECATION
static final java.lang.String MODEL_DEPRECATION
Event ID used when something in the model is deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
java.util.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.
-
-