aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-openapi2.yml
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-openapi2.yml')
-rw-r--r--rust/fatcat-openapi2.yml162
1 files changed, 117 insertions, 45 deletions
diff --git a/rust/fatcat-openapi2.yml b/rust/fatcat-openapi2.yml
index f1b94234..8fcbf488 100644
--- a/rust/fatcat-openapi2.yml
+++ b/rust/fatcat-openapi2.yml
@@ -57,19 +57,6 @@ definitions:
message:
type: string
example: "The computers did the thing successfully!"
- creator_entity:
- type: object
- required:
- - full_name
- properties:
- <<: *ENTITYPROPS
- full_name:
- type: string
- example: "Grace Hopper"
- orcid:
- type: string
- #format: custom
- example: "0000-0002-1825-0097"
container_entity:
type: object
required:
@@ -90,6 +77,19 @@ definitions:
type: string
coden:
type: string
+ creator_entity:
+ type: object
+ required:
+ - full_name
+ properties:
+ <<: *ENTITYPROPS
+ full_name:
+ type: string
+ example: "Grace Hopper"
+ orcid:
+ type: string
+ #format: custom
+ example: "0000-0002-1825-0097"
file_entity:
type: object
properties:
@@ -300,39 +300,39 @@ x-entity-responses: &ENTITYRESPONSES
$ref: "#/definitions/error_response"
paths:
- /creator:
+ /container:
post:
parameters:
- name: entity
in: body
required: true
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
responses:
201:
description: Created Entity
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
-# /creator/batch:
-# post:
-# parameters:
-# - name: entity_list
-# in: body
-# required: true
-# schema:
-# type: array
-# items:
-# $ref: "#/definitions/creator_entity"
-# responses:
-# 201:
-# description: Created Entities
-# schema:
-# type: array
-# items:
-# $ref: "#/definitions/entity_edit"
-# <<: *ENTITYRESPONSES
- /creator/{id}:
+ /container/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/container_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
+ /container/{id}:
parameters:
- name: id
in: path
@@ -343,12 +343,12 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
<<: *ENTITYRESPONSES
- /creator/lookup:
+ /container/lookup:
get:
parameters:
- - name: orcid
+ - name: issnl
in: query
type: string
required: true
@@ -356,23 +356,41 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
<<: *ENTITYRESPONSES
- /container:
+ /creator:
post:
parameters:
- name: entity
in: body
required: true
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
responses:
201:
description: Created Entity
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
- /container/{id}:
+ /creator/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/creator_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
+ /creator/{id}:
parameters:
- name: id
in: path
@@ -383,12 +401,12 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
<<: *ENTITYRESPONSES
- /container/lookup:
+ /creator/lookup:
get:
parameters:
- - name: issnl
+ - name: orcid
in: query
type: string
required: true
@@ -396,7 +414,7 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
<<: *ENTITYRESPONSES
/file:
post:
@@ -412,6 +430,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /file/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/file_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/file/{id}:
parameters:
- name: id
@@ -452,6 +488,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /release/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/release/{id}:
parameters:
- name: id
@@ -492,6 +546,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /work/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/work_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/work/{id}:
parameters:
- name: id