aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat-go/fatcat-openapi2.yml
blob: 56aed839d0464d39efcbd12c6618535957b14af3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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: