Complete shared domain contract verification
This commit is contained in:
@@ -32,6 +32,9 @@ func New(_ Options, references ...contracts.ReferenceSet) (*Validator, error) {
|
||||
if len(references) == 1 {
|
||||
referenceSet = references[0]
|
||||
}
|
||||
if err := shared.ValidateReferenceSelections(referenceSet); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resolver, err := itemregistry.NewResolver(referenceSet)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("prepare item registry: %w", err)
|
||||
@@ -93,9 +96,6 @@ func Register(registry *pipeline.ValidatorRegistry) error {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := shared.ValidateReferenceSelections(request.References); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return New(options, request.References)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user