Currently, spec.Validate recursively interrogates data sources and resources for duplicate names that either appear on the data sources and resources themselves at the provider-level and, for duplicate names that appear on attributes, blocks and elements within objects at the same nesting level within schema. When such duplicates are found, errors are raised and bubbled-up to the caller. The error uses a req.Path which is supplied in the argument to the Validate() methods. The req.Path takes the form of a string that denotes the current nesting level for use in generating error messages. This could likely be improved by using a similar approach to the Framework in making the path available within the Validate() methods.
Currently,
spec.Validate
recursively interrogates data sources and resources for duplicate names that either appear on the data sources and resources themselves at the provider-level and, for duplicate names that appear on attributes, blocks and elements within objects at the same nesting level within schema. When such duplicates are found, errors are raised and bubbled-up to the caller. The error uses areq.Path
which is supplied in the argument to theValidate()
methods. Thereq.Path
takes the form of a string that denotes the current nesting level for use in generating error messages. This could likely be improved by using a similar approach to the Framework in making the path available within theValidate()
methods.