diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-10 22:17:43 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-10 22:17:43 -0700 |
commit | 1434bc978f0dc2e25455974903c040230b36101b (patch) | |
tree | 9d09367401c2ab6b0f2a1b6a6612f4d2d32b24ba /golang/gen/restapi | |
parent | e63d2b6c2bc7c7ecf5e57e4e25267113f8a1ed51 (diff) | |
download | fatcat-1434bc978f0dc2e25455974903c040230b36101b.tar.gz fatcat-1434bc978f0dc2e25455974903c040230b36101b.zip |
basic creator POST
Diffstat (limited to 'golang/gen/restapi')
-rw-r--r-- | golang/gen/restapi/embedded_spec.go | 76 | ||||
-rw-r--r-- | golang/gen/restapi/operations/post_creator_responses.go | 6 |
2 files changed, 67 insertions, 15 deletions
diff --git a/golang/gen/restapi/embedded_spec.go b/golang/gen/restapi/embedded_spec.go index 8e2a9ac4..cec33018 100644 --- a/golang/gen/restapi/embedded_spec.go +++ b/golang/gen/restapi/embedded_spec.go @@ -51,7 +51,7 @@ func init() { "201": { "description": "created", "schema": { - "$ref": "#/definitions/creator_entity" + "$ref": "#/definitions/entity_edit" } }, "400": { @@ -313,11 +313,6 @@ func init() { }, "creator_entity": { "type": "object", - "required": [ - "ident", - "state", - "name" - ], "properties": { "ident": { "type": "string" @@ -371,6 +366,23 @@ func init() { } } }, + "entity_edit": { + "type": "object", + "properties": { + "editgroup_id": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ident": { + "type": "string" + }, + "revision": { + "type": "integer" + } + } + }, "error": { "type": "object", "required": [ @@ -427,6 +439,20 @@ func init() { } } }, + "x-entity-edit-props": { + "editgroup_id": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ident": { + "type": "string" + }, + "revision": { + "type": "integer" + } + }, "x-entity-props": { "ident": { "type": "string" @@ -482,7 +508,7 @@ func init() { "201": { "description": "created", "schema": { - "$ref": "#/definitions/creator_entity" + "$ref": "#/definitions/entity_edit" } }, "400": { @@ -744,11 +770,6 @@ func init() { }, "creator_entity": { "type": "object", - "required": [ - "ident", - "state", - "name" - ], "properties": { "ident": { "type": "string" @@ -802,6 +823,23 @@ func init() { } } }, + "entity_edit": { + "type": "object", + "properties": { + "editgroup_id": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ident": { + "type": "string" + }, + "revision": { + "type": "integer" + } + } + }, "error": { "type": "object", "required": [ @@ -858,6 +896,20 @@ func init() { } } }, + "x-entity-edit-props": { + "editgroup_id": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ident": { + "type": "string" + }, + "revision": { + "type": "integer" + } + }, "x-entity-props": { "ident": { "type": "string" diff --git a/golang/gen/restapi/operations/post_creator_responses.go b/golang/gen/restapi/operations/post_creator_responses.go index dcf661a5..ee95d2e4 100644 --- a/golang/gen/restapi/operations/post_creator_responses.go +++ b/golang/gen/restapi/operations/post_creator_responses.go @@ -25,7 +25,7 @@ type PostCreatorCreated struct { /* In: Body */ - Payload *models.CreatorEntity `json:"body,omitempty"` + Payload *models.EntityEdit `json:"body,omitempty"` } // NewPostCreatorCreated creates PostCreatorCreated with default headers values @@ -35,13 +35,13 @@ func NewPostCreatorCreated() *PostCreatorCreated { } // WithPayload adds the payload to the post creator created response -func (o *PostCreatorCreated) WithPayload(payload *models.CreatorEntity) *PostCreatorCreated { +func (o *PostCreatorCreated) WithPayload(payload *models.EntityEdit) *PostCreatorCreated { o.Payload = payload return o } // SetPayload sets the payload to the post creator created response -func (o *PostCreatorCreated) SetPayload(payload *models.CreatorEntity) { +func (o *PostCreatorCreated) SetPayload(payload *models.EntityEdit) { o.Payload = payload } |