fix(assessment): return confirmed categories with their basis and label demonstration categories
This commit is contained in:
1 parent
623d41b969
commit
d4903a3796
77 files changed
+1441
-288
No files matched your search
@@ -10300,6 +10300,10 @@ func (s *AssessmentSpecializationAvailability) encodeFields(e *jx.Encoder) {
|
||||
e.FieldStart("confirmed_grade")
|
||||
s.ConfirmedGrade.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("confirmed_basis")
|
||||
s.ConfirmedBasis.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("active_attempt_id")
|
||||
s.ActiveAttemptID.Encode(e)
|
||||
@@ -10314,11 +10318,12 @@ func (s *AssessmentSpecializationAvailability) encodeFields(e *jx.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
var jsonFieldsNameOfAssessmentSpecializationAvailability = [4]string{
|
||||
var jsonFieldsNameOfAssessmentSpecializationAvailability = [5]string{
|
||||
0: "specialization",
|
||||
1: "confirmed_grade",
|
||||
2: "active_attempt_id",
|
||||
3: "grades",
|
||||
2: "confirmed_basis",
|
||||
3: "active_attempt_id",
|
||||
4: "grades",
|
||||
}
|
||||
|
||||
// Decode decodes AssessmentSpecializationAvailability from json.
|
||||
@@ -10350,8 +10355,18 @@ func (s *AssessmentSpecializationAvailability) Decode(d *jx.Decoder) error {
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"confirmed_grade\"")
|
||||
}
|
||||
case "active_attempt_id":
|
||||
case "confirmed_basis":
|
||||
requiredBitSet[0] |= 1 << 2
|
||||
if err := func() error {
|
||||
if err := s.ConfirmedBasis.Decode(d); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"confirmed_basis\"")
|
||||
}
|
||||
case "active_attempt_id":
|
||||
requiredBitSet[0] |= 1 << 3
|
||||
if err := func() error {
|
||||
if err := s.ActiveAttemptID.Decode(d); err != nil {
|
||||
return err
|
||||
@@ -10361,7 +10376,7 @@ func (s *AssessmentSpecializationAvailability) Decode(d *jx.Decoder) error {
|
||||
return errors.Wrap(err, "decode field \"active_attempt_id\"")
|
||||
}
|
||||
case "grades":
|
||||
requiredBitSet[0] |= 1 << 3
|
||||
requiredBitSet[0] |= 1 << 4
|
||||
if err := func() error {
|
||||
s.Grades = make([]AssessmentGradeAvailability, 0)
|
||||
if err := d.Arr(func(d *jx.Decoder) error {
|
||||
@@ -10388,7 +10403,7 @@ func (s *AssessmentSpecializationAvailability) Decode(d *jx.Decoder) error {
|
||||
// Validate required fields.
|
||||
var failures []validate.FieldError
|
||||
for i, mask := range [1]uint8{
|
||||
0b00001111,
|
||||
0b00011111,
|
||||
} {
|
||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||
// Mask only required fields and check equality to mask using XOR.
|
||||
@@ -13612,12 +13627,17 @@ func (s *CardCategory) encodeFields(e *jx.Encoder) {
|
||||
e.FieldStart("strength")
|
||||
s.Strength.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("basis")
|
||||
s.Basis.Encode(e)
|
||||
}
|
||||
}
|
||||
|
||||
var jsonFieldsNameOfCardCategory = [3]string{
|
||||
var jsonFieldsNameOfCardCategory = [4]string{
|
||||
0: "specialization",
|
||||
1: "grade",
|
||||
2: "strength",
|
||||
3: "basis",
|
||||
}
|
||||
|
||||
// Decode decodes CardCategory from json.
|
||||
@@ -13659,6 +13679,16 @@ func (s *CardCategory) Decode(d *jx.Decoder) error {
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"strength\"")
|
||||
}
|
||||
case "basis":
|
||||
requiredBitSet[0] |= 1 << 3
|
||||
if err := func() error {
|
||||
if err := s.Basis.Decode(d); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"basis\"")
|
||||
}
|
||||
default:
|
||||
return errors.Errorf("unexpected field %q", k)
|
||||
}
|
||||
@@ -13669,7 +13699,7 @@ func (s *CardCategory) Decode(d *jx.Decoder) error {
|
||||
// Validate required fields.
|
||||
var failures []validate.FieldError
|
||||
for i, mask := range [1]uint8{
|
||||
0b00000111,
|
||||
0b00001111,
|
||||
} {
|
||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||
// Mask only required fields and check equality to mask using XOR.
|
||||
@@ -29198,11 +29228,16 @@ func (s *MatchCategory) encodeFields(e *jx.Encoder) {
|
||||
e.FieldStart("grade")
|
||||
s.Grade.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("basis")
|
||||
s.Basis.Encode(e)
|
||||
}
|
||||
}
|
||||
|
||||
var jsonFieldsNameOfMatchCategory = [2]string{
|
||||
var jsonFieldsNameOfMatchCategory = [3]string{
|
||||
0: "specialization",
|
||||
1: "grade",
|
||||
2: "basis",
|
||||
}
|
||||
|
||||
// Decode decodes MatchCategory from json.
|
||||
@@ -29234,6 +29269,16 @@ func (s *MatchCategory) Decode(d *jx.Decoder) error {
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"grade\"")
|
||||
}
|
||||
case "basis":
|
||||
requiredBitSet[0] |= 1 << 2
|
||||
if err := func() error {
|
||||
if err := s.Basis.Decode(d); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"basis\"")
|
||||
}
|
||||
default:
|
||||
return errors.Errorf("unexpected field %q", k)
|
||||
}
|
||||
@@ -29244,7 +29289,7 @@ func (s *MatchCategory) Decode(d *jx.Decoder) error {
|
||||
// Validate required fields.
|
||||
var failures []validate.FieldError
|
||||
for i, mask := range [1]uint8{
|
||||
0b00000011,
|
||||
0b00000111,
|
||||
} {
|
||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||
// Mask only required fields and check equality to mask using XOR.
|
||||
@@ -39018,6 +39063,50 @@ func (s *NilEmailAddress) UnmarshalJSON(data []byte) error {
|
||||
return s.Decode(d)
|
||||
}
|
||||
|
||||
// Encode encodes EvidenceBasis as json.
|
||||
func (o NilEvidenceBasis) Encode(e *jx.Encoder) {
|
||||
if o.Null {
|
||||
e.Null()
|
||||
return
|
||||
}
|
||||
e.Str(string(o.Value))
|
||||
}
|
||||
|
||||
// Decode decodes EvidenceBasis from json.
|
||||
func (o *NilEvidenceBasis) Decode(d *jx.Decoder) error {
|
||||
if o == nil {
|
||||
return errors.New("invalid: unable to decode NilEvidenceBasis to nil")
|
||||
}
|
||||
if d.Next() == jx.Null {
|
||||
if err := d.Null(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var v EvidenceBasis
|
||||
o.Value = v
|
||||
o.Null = true
|
||||
return nil
|
||||
}
|
||||
o.Null = false
|
||||
if err := o.Value.Decode(d); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements stdjson.Marshaler.
|
||||
func (s NilEvidenceBasis) MarshalJSON() ([]byte, error) {
|
||||
e := jx.Encoder{}
|
||||
s.Encode(&e)
|
||||
return e.Bytes(), nil
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements stdjson.Unmarshaler.
|
||||
func (s *NilEvidenceBasis) UnmarshalJSON(data []byte) error {
|
||||
d := jx.DecodeBytes(data)
|
||||
return s.Decode(d)
|
||||
}
|
||||
|
||||
// Encode encodes float64 as json.
|
||||
func (o NilFloat64) Encode(e *jx.Encoder) {
|
||||
if o.Null {
|
||||
@@ -49486,6 +49575,10 @@ func (s *ProfileConfirmedCategory) encodeFields(e *jx.Encoder) {
|
||||
e.FieldStart("grade")
|
||||
s.Grade.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("basis")
|
||||
s.Basis.Encode(e)
|
||||
}
|
||||
{
|
||||
e.FieldStart("confirmed_at")
|
||||
s.ConfirmedAt.Encode(e)
|
||||
@@ -49496,11 +49589,12 @@ func (s *ProfileConfirmedCategory) encodeFields(e *jx.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
var jsonFieldsNameOfProfileConfirmedCategory = [4]string{
|
||||
var jsonFieldsNameOfProfileConfirmedCategory = [5]string{
|
||||
0: "specialization",
|
||||
1: "grade",
|
||||
2: "confirmed_at",
|
||||
3: "attempt_id",
|
||||
2: "basis",
|
||||
3: "confirmed_at",
|
||||
4: "attempt_id",
|
||||
}
|
||||
|
||||
// Decode decodes ProfileConfirmedCategory from json.
|
||||
@@ -49532,8 +49626,18 @@ func (s *ProfileConfirmedCategory) Decode(d *jx.Decoder) error {
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"grade\"")
|
||||
}
|
||||
case "confirmed_at":
|
||||
case "basis":
|
||||
requiredBitSet[0] |= 1 << 2
|
||||
if err := func() error {
|
||||
if err := s.Basis.Decode(d); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"basis\"")
|
||||
}
|
||||
case "confirmed_at":
|
||||
requiredBitSet[0] |= 1 << 3
|
||||
if err := func() error {
|
||||
if err := s.ConfirmedAt.Decode(d); err != nil {
|
||||
return err
|
||||
@@ -49543,7 +49647,7 @@ func (s *ProfileConfirmedCategory) Decode(d *jx.Decoder) error {
|
||||
return errors.Wrap(err, "decode field \"confirmed_at\"")
|
||||
}
|
||||
case "attempt_id":
|
||||
requiredBitSet[0] |= 1 << 3
|
||||
requiredBitSet[0] |= 1 << 4
|
||||
if err := func() error {
|
||||
v, err := json.DecodeUUID(d)
|
||||
s.AttemptID = v
|
||||
@@ -49564,7 +49668,7 @@ func (s *ProfileConfirmedCategory) Decode(d *jx.Decoder) error {
|
||||
// Validate required fields.
|
||||
var failures []validate.FieldError
|
||||
for i, mask := range [1]uint8{
|
||||
0b00001111,
|
||||
0b00011111,
|
||||
} {
|
||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||
// Mask only required fields and check equality to mask using XOR.
|
||||
|
||||
@@ -5395,6 +5395,10 @@ type AssessmentSpecializationAvailability struct {
|
||||
Specialization SpecializationCode `json:"specialization"`
|
||||
// Currently confirmed grade of the specialization, or null.
|
||||
ConfirmedGrade NilGradeCode `json:"confirmed_grade"`
|
||||
// What the confirmed grade rests on, or null exactly when `confirmed_grade` is null. `synthetic_demo`
|
||||
// marks a demonstration category, which is not a validated measurement and must not be shown as a real
|
||||
// confirmation.
|
||||
ConfirmedBasis NilEvidenceBasis `json:"confirmed_basis"`
|
||||
// Identifier of the active attempt of the specialization, or null.
|
||||
ActiveAttemptID NilUUID `json:"active_attempt_id"`
|
||||
// Every grade of the scale in ascending order.
|
||||
@@ -5411,6 +5415,11 @@ func (s *AssessmentSpecializationAvailability) GetConfirmedGrade() NilGradeCode
|
||||
return s.ConfirmedGrade
|
||||
}
|
||||
|
||||
// GetConfirmedBasis returns the value of ConfirmedBasis.
|
||||
func (s *AssessmentSpecializationAvailability) GetConfirmedBasis() NilEvidenceBasis {
|
||||
return s.ConfirmedBasis
|
||||
}
|
||||
|
||||
// GetActiveAttemptID returns the value of ActiveAttemptID.
|
||||
func (s *AssessmentSpecializationAvailability) GetActiveAttemptID() NilUUID {
|
||||
return s.ActiveAttemptID
|
||||
@@ -5431,6 +5440,11 @@ func (s *AssessmentSpecializationAvailability) SetConfirmedGrade(val NilGradeCod
|
||||
s.ConfirmedGrade = val
|
||||
}
|
||||
|
||||
// SetConfirmedBasis sets the value of ConfirmedBasis.
|
||||
func (s *AssessmentSpecializationAvailability) SetConfirmedBasis(val NilEvidenceBasis) {
|
||||
s.ConfirmedBasis = val
|
||||
}
|
||||
|
||||
// SetActiveAttemptID sets the value of ActiveAttemptID.
|
||||
func (s *AssessmentSpecializationAvailability) SetActiveAttemptID(val NilUUID) {
|
||||
s.ActiveAttemptID = val
|
||||
@@ -7030,13 +7044,15 @@ func (s *CardAccessListHeaders) SetResponse(val CardAccessList) {
|
||||
|
||||
func (*CardAccessListHeaders) listMyCardAccessHistoryRes() {}
|
||||
|
||||
// A category confirmed by assessment results, as the card shows it.
|
||||
// A category confirmed by assessment results, as the card shows it. `basis` says what the grade rests
|
||||
// on; `synthetic_demo` marks a demonstration category, which is never a standard confirmation.
|
||||
// Ref: #/components/schemas/CardCategory
|
||||
type CardCategory struct {
|
||||
Specialization SpecializationCode `json:"specialization"`
|
||||
Grade GradeCode `json:"grade"`
|
||||
// Coarse strength of the authoritative confirmation.
|
||||
Strength CardCategoryStrength `json:"strength"`
|
||||
Basis EvidenceBasis `json:"basis"`
|
||||
}
|
||||
|
||||
// GetSpecialization returns the value of Specialization.
|
||||
@@ -7054,6 +7070,11 @@ func (s *CardCategory) GetStrength() CardCategoryStrength {
|
||||
return s.Strength
|
||||
}
|
||||
|
||||
// GetBasis returns the value of Basis.
|
||||
func (s *CardCategory) GetBasis() EvidenceBasis {
|
||||
return s.Basis
|
||||
}
|
||||
|
||||
// SetSpecialization sets the value of Specialization.
|
||||
func (s *CardCategory) SetSpecialization(val SpecializationCode) {
|
||||
s.Specialization = val
|
||||
@@ -7069,6 +7090,11 @@ func (s *CardCategory) SetStrength(val CardCategoryStrength) {
|
||||
s.Strength = val
|
||||
}
|
||||
|
||||
// SetBasis sets the value of Basis.
|
||||
func (s *CardCategory) SetBasis(val EvidenceBasis) {
|
||||
s.Basis = val
|
||||
}
|
||||
|
||||
// Coarse strength of the authoritative confirmation.
|
||||
type CardCategoryStrength string
|
||||
|
||||
@@ -12918,10 +12944,13 @@ func (s *MatchAppliedFilters) SetConditions(val NilMatchAppliedConditions) {
|
||||
}
|
||||
|
||||
// A confirmed category. Its specialization must equal the enclosing match entry's specialization.
|
||||
// `basis` says what the grade rests on; `synthetic_demo` marks a demonstration category, which an
|
||||
// organization must read as one and never as a standard confirmation.
|
||||
// Ref: #/components/schemas/MatchCategory
|
||||
type MatchCategory struct {
|
||||
Specialization SpecializationCode `json:"specialization"`
|
||||
Grade GradeCode `json:"grade"`
|
||||
Basis EvidenceBasis `json:"basis"`
|
||||
}
|
||||
|
||||
// GetSpecialization returns the value of Specialization.
|
||||
@@ -12934,6 +12963,11 @@ func (s *MatchCategory) GetGrade() GradeCode {
|
||||
return s.Grade
|
||||
}
|
||||
|
||||
// GetBasis returns the value of Basis.
|
||||
func (s *MatchCategory) GetBasis() EvidenceBasis {
|
||||
return s.Basis
|
||||
}
|
||||
|
||||
// SetSpecialization sets the value of Specialization.
|
||||
func (s *MatchCategory) SetSpecialization(val SpecializationCode) {
|
||||
s.Specialization = val
|
||||
@@ -12944,6 +12978,11 @@ func (s *MatchCategory) SetGrade(val GradeCode) {
|
||||
s.Grade = val
|
||||
}
|
||||
|
||||
// SetBasis sets the value of Basis.
|
||||
func (s *MatchCategory) SetBasis(val EvidenceBasis) {
|
||||
s.Basis = val
|
||||
}
|
||||
|
||||
// Confirmation state for this specialization only. A result for one specialization never changes the
|
||||
// state of another specialization.
|
||||
// Ref: #/components/schemas/MatchConfirmationStatus
|
||||
@@ -18060,6 +18099,51 @@ func (o NilEmailAddress) Or(d EmailAddress) EmailAddress {
|
||||
return d
|
||||
}
|
||||
|
||||
// NewNilEvidenceBasis returns new NilEvidenceBasis with value set to v.
|
||||
func NewNilEvidenceBasis(v EvidenceBasis) NilEvidenceBasis {
|
||||
return NilEvidenceBasis{
|
||||
Value: v,
|
||||
}
|
||||
}
|
||||
|
||||
// NilEvidenceBasis is nullable EvidenceBasis.
|
||||
type NilEvidenceBasis struct {
|
||||
Value EvidenceBasis
|
||||
Null bool
|
||||
}
|
||||
|
||||
// SetTo sets value to v.
|
||||
func (o *NilEvidenceBasis) SetTo(v EvidenceBasis) {
|
||||
o.Null = false
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
// IsNull returns true if value is Null.
|
||||
func (o NilEvidenceBasis) IsNull() bool { return o.Null }
|
||||
|
||||
// SetToNull sets value to null.
|
||||
func (o *NilEvidenceBasis) SetToNull() {
|
||||
o.Null = true
|
||||
var v EvidenceBasis
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
// Get returns value and boolean that denotes whether value was set.
|
||||
func (o NilEvidenceBasis) Get() (v EvidenceBasis, ok bool) {
|
||||
if o.Null {
|
||||
return v, false
|
||||
}
|
||||
return o.Value, true
|
||||
}
|
||||
|
||||
// Or returns value if set, or given parameter if does not.
|
||||
func (o NilEvidenceBasis) Or(d EvidenceBasis) EvidenceBasis {
|
||||
if v, ok := o.Get(); ok {
|
||||
return v
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
// NewNilFloat64 returns new NilFloat64 with value set to v.
|
||||
func NewNilFloat64(v float64) NilFloat64 {
|
||||
return NilFloat64{
|
||||
@@ -26050,11 +26134,13 @@ type ProfileClaimTrustLevel int32
|
||||
// read-only and derived by the server from the assessment results of the candidate; no request carries
|
||||
// it and the profile storage holds no such column, so neither a form nor an import can write a
|
||||
// confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in
|
||||
// `roles`.
|
||||
// `roles`. `basis` says what the grade rests on; `synthetic_demo` marks a demonstration category that
|
||||
// is not a validated measurement.
|
||||
// Ref: #/components/schemas/ProfileConfirmedCategory
|
||||
type ProfileConfirmedCategory struct {
|
||||
Specialization SpecializationCode `json:"specialization"`
|
||||
Grade GradeCode `json:"grade"`
|
||||
Basis EvidenceBasis `json:"basis"`
|
||||
ConfirmedAt Timestamp `json:"confirmed_at"`
|
||||
// Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.
|
||||
AttemptID uuid.UUID `json:"attempt_id"`
|
||||
@@ -26070,6 +26156,11 @@ func (s *ProfileConfirmedCategory) GetGrade() GradeCode {
|
||||
return s.Grade
|
||||
}
|
||||
|
||||
// GetBasis returns the value of Basis.
|
||||
func (s *ProfileConfirmedCategory) GetBasis() EvidenceBasis {
|
||||
return s.Basis
|
||||
}
|
||||
|
||||
// GetConfirmedAt returns the value of ConfirmedAt.
|
||||
func (s *ProfileConfirmedCategory) GetConfirmedAt() Timestamp {
|
||||
return s.ConfirmedAt
|
||||
@@ -26090,6 +26181,11 @@ func (s *ProfileConfirmedCategory) SetGrade(val GradeCode) {
|
||||
s.Grade = val
|
||||
}
|
||||
|
||||
// SetBasis sets the value of Basis.
|
||||
func (s *ProfileConfirmedCategory) SetBasis(val EvidenceBasis) {
|
||||
s.Basis = val
|
||||
}
|
||||
|
||||
// SetConfirmedAt sets the value of ConfirmedAt.
|
||||
func (s *ProfileConfirmedCategory) SetConfirmedAt(val Timestamp) {
|
||||
s.ConfirmedAt = val
|
||||
|
||||
@@ -4477,6 +4477,24 @@ func (s *AssessmentSpecializationAvailability) Validate() error {
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if err := func() error {
|
||||
if value, ok := s.ConfirmedBasis.Get(); ok {
|
||||
if err := func() error {
|
||||
if err := value.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
failures = append(failures, validate.FieldError{
|
||||
Name: "confirmed_basis",
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if err := func() error {
|
||||
if s.Grades == nil {
|
||||
return errors.New("nil is invalid value")
|
||||
@@ -6388,6 +6406,17 @@ func (s *CardCategory) Validate() error {
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if err := func() error {
|
||||
if err := s.Basis.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
failures = append(failures, validate.FieldError{
|
||||
Name: "basis",
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if len(failures) > 0 {
|
||||
return &validate.Error{Fields: failures}
|
||||
}
|
||||
@@ -12044,6 +12073,17 @@ func (s *MatchCategory) Validate() error {
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if err := func() error {
|
||||
if err := s.Basis.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
failures = append(failures, validate.FieldError{
|
||||
Name: "basis",
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if len(failures) > 0 {
|
||||
return &validate.Error{Fields: failures}
|
||||
}
|
||||
@@ -19717,6 +19757,17 @@ func (s *ProfileConfirmedCategory) Validate() error {
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if err := func() error {
|
||||
if err := s.Basis.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
failures = append(failures, validate.FieldError{
|
||||
Name: "basis",
|
||||
Error: err,
|
||||
})
|
||||
}
|
||||
if len(failures) > 0 {
|
||||
return &validate.Error{Fields: failures}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user