Package software.amazon.smithy.model.validation.validators
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.
-
ClassDescriptionAll
@auth
trait values referenced from an operation must refer to authentication traits applied to service shapes that enclose the operation.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.Emits a validation event if a model contains shapes that are bound to deprecated traits.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.Ensures that enum traits are valid.Ensures that when an event structure contains an eventPayload member, that all other members are bound to headers.Validates that examples traits are valid for their operations.Validates traits that can only be applied to a single structure member.Validates that hostLabel traits are applied correctly for operation inputs.Validates that if an HttpApiKeyAuth trait's scheme field is present then the 'in' field must specify "header".Validates that if any operation in a service uses the http trait, then all operations use them.Emits warnings when a structure member has an HTTP binding trait that will be ignored in some contexts to which it is bound.Validates that httpHeader traits are case-insensitively unique.Validates that httpLabel traits are applied correctly for operation inputs.Validates that `http` traits applied to operation shapes use the most semantically appropriate HTTP method according to RFC 7231.Validates that if a payload trait is present then all members of the input of an operation are bound to part of the message.Validates that httpHeader traits do not case-insensitively start with an httpPrefixHeader on the same structure.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.Validates that httpQuery trait bindings are case-sensitively unique.Ensures that HTTP response codes are appropriate for operations and errors.Validates that no two URIs in a service conflict with each other.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.Validates operation inputs, outputs, and the use ofinput
andoutput
traits.Validates paginated traits.Emits a validation event if a pattern trait is not anchored.Ensures that shapes in separate namespaces don't refer to shapes in other namespaces that are marked as private.Ensures that range traits are valid.Validates that references are correct.Validates the requestCompression trait.Validates that resource references do not introduce circular hierarchies.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.Validates that the resource identifiers of children of a resource contain all of the identifiers as their parents.Validates that resource are applied appropriately to resources.Validates that resource properties are correctly used in resource-bound operations.Validates the @authDefinition traits applied to service shapes.Validates that service closures do not contain duplicate case-insensitive shape names.Ensures that no two shapes in the model have the same case-insensitive shape ID.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.Validates that an operation is only bound to once in an entire service closure.Validates that a resource is only bound to once in an entire service closure.Validates the streaming trait.Validates that neighbors target resolvable shapes of the correct type.Validates that the JSON pointer paths of the breakingChanges property of a trait refers to valid parts of the model.Validates that traits do not conflict.Validates that traits are only applied to compatible shapes.Validates that trait values are valid for their trait definitions.Ensures that a unit type can only be referenced as operation input/output or by a tagged union member.Adds a validation note event for each shape in the model that is not connected to a service shape.Emits a validation event if a model contains shapes that are bound to unstable traits.Validates that the xmlNamespace traits are applied correctly for structures.