Package software.amazon.smithy.model.validation.validators
Smithy validators. All validator implementations in this package
should be considered internal. They are subject to change and
should not be used directly outside of the Smithy project. For
example, some of these validators may get removed and replaced
with mode-only validation.
-
Class Summary Class Description AuthTraitValidator All@auth
trait values referenced from an operation must refer to authentication traits applied to service shapes that enclose the operation.DefaultTraitValidator DefaultValueInUpdateValidator Finds operations that are meant to partially update a resource, but that use members with default values in their input shapes, making it impossible to know if the member was provided explicitly or defaulted.DeprecatedTraitValidator Emits a validation event if a model contains shapes that are bound to deprecated traits.EnumShapeValidator Emits an error validation event if an enum member's enumValue trait has the wrong type, if there are any duplicate values in a single enum, if the enum's default value is set using the enumValue trait, or if an intEnum member lacks an enumValue trait.EnumTraitValidator Ensures that enum traits are valid.EventPayloadTraitValidator Ensures that when an event structure contains an eventPayload member, that all other members are bound to headers.ExamplesTraitValidator Validates that examples traits are valid for their operations.ExclusiveStructureMemberTraitValidator Validates traits that can only be applied to a single structure member.HostLabelTraitValidator Validates that hostLabel traits are applied correctly for operation inputs.HttpApiKeyAuthTraitValidator Validates that if an HttpApiKeyAuth trait's scheme field is present then the 'in' field must specify "header".HttpBindingsMissingValidator Validates that if any operation in a service uses the http trait, then all operations use them.HttpBindingTraitIgnoredValidator Emits warnings when a structure member has an HTTP binding trait that will be ignored in some contexts to which it is bound.HttpHeaderTraitValidator Validates that httpHeader traits are case-insensitively unique.HttpLabelTraitValidator Validates that httpLabel traits are applied correctly for operation inputs.HttpMethodSemanticsValidator Validates that `http` traits applied to operation shapes use the most semantically appropriate HTTP method according to RFC 9110.HttpPayloadValidator Validates that if a payload trait is present then all members of the input of an operation are bound to part of the message.HttpPrefixHeadersTraitValidator Validates that httpHeader traits do not case-insensitively start with an httpPrefixHeader on the same structure.HttpQueryParamsTraitValidator When the `httpQueryParams` trait is used, this validator emits a NOTE when another member of the container shape applies the `httpQuery` trait which may result in a conflict within the query string.HttpQueryTraitValidator Validates that httpQuery trait bindings are case-sensitively unique.HttpResponseCodeSemanticsValidator Ensures that HTTP response codes are appropriate for operations and errors.HttpUriConflictValidator Validates that no two URIs in a service conflict with each other.HttpUriFormatValidator HttpUriGreedyLabelValidator Validates that at most one greedy label is present in the pattern, and, if any greedy label is present that it's the last label in the pattern.IdempotencyTokenIgnoredValidator Emits warnings when a structure member has an idempotency token trait that will be ignored.JsonNameValidator LengthTraitValidator MediaTypeValidator NoInlineDocumentSupportValidator Detects when a protocol indicates that it does not support inline documents, yet the protocol trait is attached to a service that uses inline documents.OperationValidator Validates operation inputs, outputs, and the use ofinput
andoutput
traits.PaginatedTraitValidator Validates paginated traits.PatternTraitValidator Emits a validation event if a pattern trait is not anchored.PrivateAccessValidator Ensures that shapes in separate namespaces don't refer to shapes in other namespaces that are marked as private.RangeTraitValidator Ensures that range traits are valid.ReferencesTraitValidator Validates that references are correct.RequestCompressionTraitValidator Validates the requestCompression trait.ResourceCycleValidator Validates that resource references do not introduce circular hierarchies.ResourceIdentifierBindingValidator Validates that operations bound to resource shapes have identifier bindings for all the identifiers of the parent of the binding resource, that operations bound to a resource with thecollection
trait are bound using a collection binding, and operations bound with nocollection
trait are bound using an instance binding.ResourceIdentifierValidator Validates that the resource identifiers of children of a resource contain all of the identifiers as their parents.ResourceLifecycleValidator Validates that resource are applied appropriately to resources.ResourceOperationInputOutputValidator Validates that resource properties are correctly used in resource-bound operations.ServiceAuthDefinitionsValidator Validates the @authDefinition traits applied to service shapes.ServiceValidator Validates that service closures do not contain duplicate case-insensitive shape names.SetValidator ShapeIdConflictValidator Ensures that no two shapes in the model have the same case-insensitive shape ID.ShapeRecursionValidator Ensures that list, set, and map shapes are not directly recursive, meaning that if they do have a recursive reference to themselves, one or more references that form the recursive path travels through a structure or union shape.SingleOperationBindingValidator Validates that an operation is only bound to once in an entire service closure.SingleResourceBindingValidator Validates that a resource is only bound to once in an entire service closure.StreamingTraitValidator Validates the streaming trait.TargetValidator Validates that neighbors target resolvable shapes of the correct type.TraitBreakingChangesValidator Validates that the JSON pointer paths of the breakingChanges property of a trait refers to valid parts of the model.TraitConflictValidator Validates that traits do not conflict.TraitTargetValidator Validates that traits are only applied to compatible shapes.TraitValidatorsValidator TraitValueValidator Validates that trait values are valid for their trait definitions.UnionValidator UnitTypeValidator Ensures that a unit type can only be referenced as operation input/output or by a tagged union member.UnreferencedShapeValidator Deprecated. UnstableTraitValidator Emits a validation event if a model contains shapes that are bound to unstable traits.XmlNamespaceTraitValidator Validates that the xmlNamespace traits are applied correctly for structures.