Class AuthValidator
- java.lang.Object
-
- software.amazon.smithy.model.validation.AbstractValidator
-
- software.amazon.smithy.model.validation.validators.AuthValidator
-
- All Implemented Interfaces:
Validator
public final class AuthValidator extends AbstractValidator
Validates that service shapes and every operation bound within a service marked with the auth trait correspond to an auth scheme defined in one of the protocols of the service (with the exception of "none"). This will also validate that every protocols trait uses a unique set of protocol names.For example, if an operation is bound to a service and has an auth trait with a value of "http-basic", but no protocol on the service supports the "http-basic" auth scheme, then this validator will emit an ERROR.
-
-
Field Summary
-
Fields inherited from interface software.amazon.smithy.model.validation.Validator
MODEL_ERROR
-
-
Constructor Summary
Constructors Constructor Description AuthValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ValidationEvent>
validate(Model model)
Validates a model and returns a list of validation events.
-
-
-
Method Detail
-
validate
public java.util.List<ValidationEvent> validate(Model model)
Description copied from interface:Validator
Validates a model and returns a list of validation events.- Parameters:
model
- Model to validate.- Returns:
- List of validation events.
-
-