summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-09 16:48:36 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-09 16:48:36 -0700
commitcc57215fc1c5e56e8c745ea76135e2d170f585c7 (patch)
tree0a6522238d31c9eeb6f6b90c2a33d8f6261b4f7f
parent7c79a9919d042d3a17a9011e5f3aa25801424a84 (diff)
downloadfatcat-cc57215fc1c5e56e8c745ea76135e2d170f585c7.tar.gz
fatcat-cc57215fc1c5e56e8c745ea76135e2d170f585c7.zip
WIP swagger doc
-rw-r--r--fatcat-go/fatcat-openapi2.yml83
1 files changed, 83 insertions, 0 deletions
diff --git a/fatcat-go/fatcat-openapi2.yml b/fatcat-go/fatcat-openapi2.yml
new file mode 100644
index 00000000..56aed839
--- /dev/null
+++ b/fatcat-go/fatcat-openapi2.yml
@@ -0,0 +1,83 @@
+consumes:
+- application/json
+info:
+ description: A scalable, versioned, API-oriented catalog of bibliographic entities
+ and file metadata
+ title: fatcat
+ version: 0.1.0
+paths: {}
+produces:
+- application/json
+schemes:
+- http
+swagger: "2.0"
+
+definitions:
+ error:
+ type: object
+ required:
+ - message
+ properties:
+ message:
+ type: string
+ creator_entity:
+ type: object
+ required:
+ - ident
+ - state
+ properties:
+ state:
+ type: string
+ # actually enum of: (wip, active, redirect, deleted)
+ ident:
+ type: string
+ revision:
+ type: string
+ redirect:
+ type: string
+ name:
+ type: string
+ orcid:
+ type: string
+
+paths:
+ /creator:
+ post:
+ parameters:
+ - name: body
+ in: body
+ schema:
+ $ref: "#/definitions/creator_entity"
+ responses:
+ 201:
+ description: created
+ schema:
+ $ref: "#/definitions/creator_entity"
+ default:
+ description: generic error response
+ schema:
+ $ref: "#/definitions/error"
+ /creator/{id}:
+ parameters:
+ - name: id
+ in: path
+ type: string
+ required: true
+ get:
+ responses:
+ 200:
+ description: fetch a single creator by id
+ schema:
+ $ref: "#/definitions/creator_entity"
+ default:
+ description: generic error response
+ schema:
+ $ref: "#/definitions/error"
+# /creator/lookup:
+
+# /editgroup:
+# /editgroup/{id}:
+# /editgroup/{id}/accept:
+
+# /editor/{username}:
+# /editor/{username}/changelog: