aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-23 18:23:48 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-24 15:21:32 -0700
commitab86c1994999dc61e154b0336986eef47c19fb6d (patch)
tree02ee07b341f0b2ca9aa4d7a08fdc0a273ef7f62b
parent18d4e86a7ec06ec032ffa338a29156045f8112d5 (diff)
downloadfatcat-ab86c1994999dc61e154b0336986eef47c19fb6d.tar.gz
fatcat-ab86c1994999dc61e154b0336986eef47c19fb6d.zip
add a bunch of examples to swagger
-rw-r--r--rust/fatcat-openapi2.yml25
1 files changed, 24 insertions, 1 deletions
diff --git a/rust/fatcat-openapi2.yml b/rust/fatcat-openapi2.yml
index 57902a56..2363d453 100644
--- a/rust/fatcat-openapi2.yml
+++ b/rust/fatcat-openapi2.yml
@@ -7,7 +7,7 @@ info:
version: 0.1.0
schemes: [http]
basePath: /v0
-host: api.fatcat.wiki
+#host: api.fatcat.wiki
consumes:
- application/json
produces:
@@ -22,22 +22,29 @@ x-entity-props: &ENTITYPROPS
ident:
type: string
#format: uuid
+ example: "f1f046a3-45c9-4b99-adce-000000000001"
revision:
type: integer
+ example: 42
redirect:
type: string
#format: uuid
editgroup:
type: integer
+ example: 16
x-entity-edit-props: &ENTITYEDITPROPS
edit_id:
type: integer
+ example: 847
ident:
type: string
+ example: "f1f046a3-45c9-4b99-adce-000000000001"
revision:
type: integer
+ example: 42
editgroup_id:
type: integer
+ example: 16
definitions:
@@ -48,6 +55,7 @@ definitions:
properties:
message:
type: string
+ example: "A really confusing, totally unexpected thing happened"
success:
type: object
required:
@@ -55,6 +63,7 @@ definitions:
properties:
message:
type: string
+ example: "The computers did the thing successfully!"
creator_entity:
type: object
required:
@@ -63,9 +72,11 @@ definitions:
<<: *ENTITYPROPS
name:
type: string
+ example: "Grace Hopper"
orcid:
type: string
#format: custom
+ example: "0000-0002-1825-0097"
container_entity:
type: object
required:
@@ -74,23 +85,29 @@ definitions:
<<: *ENTITYPROPS
name:
type: string
+ example: "Journal of Important Results"
publisher:
type: string
+ example: "Society of Curious Students"
issn:
type: string
#format: custom
+ example: "1234-5678"
file_entity:
type: object
properties:
<<: *ENTITYPROPS
size:
type: integer
+ example: 1048576
sha1:
type: string
#format: custom
+ example: "f013d66c7f6817d08b7eb2a93e6d0440c1f3e7f8"
url:
type: string
format: url
+ example: "https://example.edu/~frau/prcding.pdf"
release_entity:
type: object
required:
@@ -102,21 +119,26 @@ definitions:
type: string
work_id:
type: string
+ example: "f1f046a3-45c9-4b99-adce-000000000001"
container_id:
type: string
+ example: "f1f046a3-45c9-4b99-adce-000000000001"
release_type:
type: string
+ example: "preprint"
date:
type: date
doi:
type: string
#format: custom
+ example: "10.1234/abcde.789"
volume:
type: string
pages:
type: string
issue:
type: string
+ example: "12"
work_entity:
type: object
properties:
@@ -134,6 +156,7 @@ definitions:
properties:
username:
type: string
+ example: "zerocool93"
editgroup:
type: object
required: