func (m *RelationQuery) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateNamespace(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSubjectSet(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this relation query
package models
import (
	"context"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type RelationQuery struct {
	Namespace *string `json:"namespace"`
	Object string `json:"object,omitempty"`
	Relation string `json:"relation,omitempty"`
	SubjectID string `json:"subject_id,omitempty"`
	SubjectSet *SubjectSet `json:"subject_set,omitempty"`
}