diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-10 18:55:02 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-10 18:55:02 -0700 |
commit | e6fedd421bf7644e969072eff9f375ecb58b25e2 (patch) | |
tree | bfb0ef710af7a0d6d98b4a75f5265776d69e76d1 /golang/gen/models/creator_entity.go | |
parent | c6422b49b8b946386ca1068ec6887bbf07a8b166 (diff) | |
download | fatcat-e6fedd421bf7644e969072eff9f375ecb58b25e2.tar.gz fatcat-e6fedd421bf7644e969072eff9f375ecb58b25e2.zip |
bunch more API endpoints
Diffstat (limited to 'golang/gen/models/creator_entity.go')
-rw-r--r-- | golang/gen/models/creator_entity.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/golang/gen/models/creator_entity.go b/golang/gen/models/creator_entity.go index be3bb6d1..0f1532a8 100644 --- a/golang/gen/models/creator_entity.go +++ b/golang/gen/models/creator_entity.go @@ -24,7 +24,8 @@ type CreatorEntity struct { Ident *string `json:"ident"` // name - Name string `json:"name,omitempty"` + // Required: true + Name *string `json:"name"` // orcid Orcid string `json:"orcid,omitempty"` @@ -33,7 +34,7 @@ type CreatorEntity struct { Redirect string `json:"redirect,omitempty"` // revision - Revision string `json:"revision,omitempty"` + Revision int64 `json:"revision,omitempty"` // state // Required: true @@ -49,6 +50,10 @@ func (m *CreatorEntity) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + if err := m.validateState(formats); err != nil { res = append(res, err) } @@ -68,6 +73,15 @@ func (m *CreatorEntity) validateIdent(formats strfmt.Registry) error { return nil } +func (m *CreatorEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + var creatorEntityTypeStatePropEnum []interface{} func init() { |