Documentation ¶
Index ¶
- func ActionModelInputsRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func ActionTypesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func CreateOperationNoReadInputsRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func CreateOperationRequiredFieldsRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func ReservedActionNameRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func UniqueActionNamesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func ValidActionInputLabelRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func ValidActionInputTypesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
- func ValidArbitraryFunctionReturns(asts []*parser.AST) (errs errorhandling.ValidationErrors)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionModelInputsRule ¶
func ActionModelInputsRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
func ActionTypesRule ¶
func ActionTypesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
validate only read+write can be used with returns validate returns has to be specified with read+write
func CreateOperationNoReadInputsRule ¶
func CreateOperationNoReadInputsRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
CreateOperationNoReadInputsRule validates that create actions don't accept any read-only inputs
func CreateOperationRequiredFieldsRule ¶
func CreateOperationRequiredFieldsRule( asts []*parser.AST) (errs errorhandling.ValidationErrors)
CreateOperationRequiredFieldsRule makes sure that all create operation are specified in such a way that all the fields that must be populated during a create, are covered by either inputs or set expressions. This includes (recursively) the fields in nested models where appropriate.
func ReservedActionNameRule ¶
func ReservedActionNameRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
ReservedActionNameRule ensures that all actions do not use a reserved name
func UniqueActionNamesRule ¶
func UniqueActionNamesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
func ValidActionInputLabelRule ¶
func ValidActionInputLabelRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
ValidActionInputLabelRule makes sure that labels like "foo" in this case <getPerson(foo: ID)> are only used when the type of the input has a built-in type (ID is a built-in type, as are Text, Bool etc.)
Conversely, using an alias is not allowed when the input references a field on THIS model, because that is simultaneously providing us with a name for the input AND its type. E.g. <getPerson(id)>. "id" is a field on the model, as could be "name" etc.
func ValidActionInputTypesRule ¶
func ValidActionInputTypesRule(asts []*parser.AST) (errs errorhandling.ValidationErrors)
ValidActionInputTypesRule makes sure the inputs specified for all the actions in the schema (i.e. operations and functions), are well formed and conform to various rules.
func ValidArbitraryFunctionReturns ¶
func ValidArbitraryFunctionReturns(asts []*parser.AST) (errs errorhandling.ValidationErrors)
Types ¶
This section is empty.