From 6a3ca56b19de64a985f962196050cabf16a6722c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 15 May 2018 22:19:04 -0700 Subject: regenerate API --- rust/fatcat-api/api.yaml | 85 +++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 48 deletions(-) (limited to 'rust/fatcat-api/api.yaml') diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api/api.yaml index abf09a10..195f23fe 100644 --- a/rust/fatcat-api/api.yaml +++ b/rust/fatcat-api/api.yaml @@ -144,6 +144,7 @@ definitions: type: integer editor_id: type: integer + # TODO: work_edits array, etc. ["edits"]["work"] or ["work_edits"]? changelogentry: type: object required: @@ -159,11 +160,15 @@ definitions: x-entity-responses: &ENTITYRESPONSES 400: - description: bad request + description: Bad Request + schema: + $ref: "#/definitions/error" + 404: + description: Not Found schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" @@ -178,7 +183,7 @@ paths: $ref: "#/definitions/creator_entity" responses: 201: - description: created + description: Created Entity schema: $ref: "#/definitions/entity_edit" <<: *ENTITYRESPONSES @@ -191,7 +196,7 @@ paths: get: responses: 200: - description: fetch a single creator by id + description: Found Entity schema: $ref: "#/definitions/creator_entity" <<: *ENTITYRESPONSES @@ -204,13 +209,9 @@ paths: required: true responses: 200: - description: find a single creator by external identifer + description: Found Entity schema: $ref: "#/definitions/creator_entity" - 404: - description: no such creator - schema: - $ref: "#/definitions/error" <<: *ENTITYRESPONSES /container: post: @@ -222,7 +223,7 @@ paths: $ref: "#/definitions/container_entity" responses: 201: - description: created + description: Created Entity schema: $ref: "#/definitions/entity_edit" <<: *ENTITYRESPONSES @@ -235,7 +236,7 @@ paths: get: responses: 200: - description: fetch a single container by id + description: Found Entity schema: $ref: "#/definitions/container_entity" <<: *ENTITYRESPONSES @@ -248,13 +249,9 @@ paths: required: true responses: 200: - description: find a single container by external identifer + description: Found Entity schema: $ref: "#/definitions/container_entity" - 404: - description: no such container - schema: - $ref: "#/definitions/error" <<: *ENTITYRESPONSES /file: post: @@ -266,7 +263,7 @@ paths: $ref: "#/definitions/file_entity" responses: 201: - description: created + description: Created Entity schema: $ref: "#/definitions/entity_edit" <<: *ENTITYRESPONSES @@ -279,7 +276,7 @@ paths: get: responses: 200: - description: fetch a single file by id + description: Found Entity schema: $ref: "#/definitions/file_entity" <<: *ENTITYRESPONSES @@ -292,13 +289,9 @@ paths: required: true responses: 200: - description: find a single file by external identifer + description: Found Entity schema: $ref: "#/definitions/file_entity" - 404: - description: no such file - schema: - $ref: "#/definitions/error" <<: *ENTITYRESPONSES /release: post: @@ -310,7 +303,7 @@ paths: $ref: "#/definitions/release_entity" responses: 201: - description: created + description: Created Entity schema: $ref: "#/definitions/entity_edit" <<: *ENTITYRESPONSES @@ -323,7 +316,7 @@ paths: get: responses: 200: - description: fetch a single release by id + description: Found Entity schema: $ref: "#/definitions/release_entity" <<: *ENTITYRESPONSES @@ -336,13 +329,9 @@ paths: required: true responses: 200: - description: find a single release by external identifer + description: Found Entity schema: $ref: "#/definitions/release_entity" - 404: - description: no such release - schema: - $ref: "#/definitions/error" <<: *ENTITYRESPONSES /work: post: @@ -354,7 +343,7 @@ paths: $ref: "#/definitions/work_entity" responses: 201: - description: created + description: Created Entity schema: $ref: "#/definitions/entity_edit" <<: *ENTITYRESPONSES @@ -367,7 +356,7 @@ paths: get: responses: 200: - description: fetch a single work by id + description: Found Entity schema: $ref: "#/definitions/work_entity" <<: *ENTITYRESPONSES @@ -380,15 +369,15 @@ paths: get: responses: 200: - description: fetch generic information about an editor + description: Found Editor schema: $ref: "#/definitions/editor" 404: - description: username not found + description: Not Found schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" /editor/{username}/changelog: @@ -400,30 +389,30 @@ paths: get: responses: 200: - description: find changes (editgroups) by this editor which have been merged + description: Found Merged Changes schema: $ref: "#/definitions/changelogentry" 404: - description: username not found + description: Not Found schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" /editgroup: post: responses: 201: - description: successfully created + description: Successfully Created schema: $ref: "#/definitions/editgroup" 400: - description: invalid request parameters + description: Bad Request schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" /editgroup/{id}: @@ -435,15 +424,15 @@ paths: get: responses: 200: - description: fetch editgroup by identifier + description: Found Editgroup schema: $ref: "#/definitions/editgroup" 404: - description: no such editgroup + description: Not Found schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" /editgroup/{id}/accept: @@ -455,18 +444,18 @@ paths: post: responses: 200: - description: merged editgroup successfully ("live") + description: Merged Successfully schema: $ref: "#/definitions/success" 400: - description: editgroup is in an unmergable state + description: Unmergable schema: $ref: "#/definitions/error" 404: - description: no such editgroup + description: Not Found schema: $ref: "#/definitions/error" default: - description: generic error response + description: Generic Error schema: $ref: "#/definitions/error" -- cgit v1.2.3