all repos

onasty @ dependabot/github_actions/marocchino/tool-versions-action-2

a one-time notes service

onasty/api/openapi.yml (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
api: add openapi docs (#181)..., 9 months ago
1
openapi: 3.1.0
2
info:
3
  title: Onasty API
4
  version: 1.0.0
5
  description: |
6
    Welcome to the reference for the Onasty API!
7
8
    ## Rate limiting
9
    All requests are rate limited using various strategies,
10
    to ensure the API remains responsive for everyone.
11
    Only make one request at a time.
12
    If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429),
13
    please wait a full minute before resuming API usage.
14
15
servers:
16
  # TODO: add hosted url
17
  - url: http://localhost:8000/api
18
  - url: http://core:8000/api
19
20
components:
21
  securitySchemes:
22
    Bearer:
23
      type: http
24
      scheme: bearer
25
      bearerFormat: JWT
26
27
paths:
28
  /ping:
29
    $ref: "./paths/ping.yml"
30
31
  # -- AUTH V1 -------------------------------------------------------
32
  /v1/auth/signup:
33
    $ref: "./paths/auth/signup.yml"
34
  /v1/auth/signin:
35
    $ref: "./paths/auth/signin.yml"
36
  /v1/auth/refresh-tokens:
37
    $ref: "./paths/auth/refresh-tokens.yml"
38
  /v1/auth/verify/{token}:
39
    $ref: "./paths/auth/verify-token.yml"
40
  /v1/auth/resend-verification-email:
41
    $ref: "./paths/auth/resend-verification-email.yml"
42
  /v1/auth/reset-password:
43
    $ref: "./paths/auth/reset-password.yml"
44
  /v1/auth/reset-password/{token}:
45
    $ref: "./paths/auth/reset-password-token.yml"
46
  /v1/auth/change-email/{token}:
47
    $ref: "./paths/auth/change-email-token.yml"
48
  /v1/auth/oauth/{provider}:
49
    $ref: "./paths/auth/oauth-provider.yml"
50
  /v1/auth/oauth/{provider}/callback:
51
    $ref: "./paths/auth/oauth-provider-callback.yml"
52
  # protected
53
  /v1/auth/logout:
54
    $ref: "./paths/auth/logout.yml"
55
  /v1/auth/logout/all:
56
    $ref: "./paths/auth/logout-all.yml"
57
  /v1/auth/change-password:
58
    $ref: "./paths/auth/change-password.yml"
59
  /v1/auth/change-email:
60
    $ref: "./paths/auth/change-email.yml"
61
  /v1/me:
62
    $ref: "./paths/auth/me.yml"
63
64
  # -- NOTES V1 ------------------------------------------------------
65
  /v1/note/{slug}/view:
66
    $ref: "./paths/note/note-slug-view.yml"
67
  /v1/note/{slug}/meta:
68
    $ref: "./paths/note/note-slug-meta.yml"
69
  # possibly protected
70
  /v1/note:
71
    $ref: "./paths/note/note.yml"
72
  /v1/note/{slug}:
73
    $ref: "./paths/note/note-slug.yml"
74
  # protected
75
  /v1/note/read:
76
    $ref: "./paths/note/note-read.yml"
77
  /v1/note/unread:
78
    $ref: "./paths/note/note-unread.yml"
79
  /v1/note/{slug}/expires:
80
    $ref: "./paths/note/note-slug-expires.yml"
81
  /v1/note/{slug}/password:
82
    $ref: "./paths/note/note-slug-password.yml"