-
Notifications
You must be signed in to change notification settings - Fork 0
/
espec.yml
65 lines (62 loc) · 1.83 KB
/
espec.yml
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
openapi: 3.0.0
info:
title: Python to .Net
description: Still whitout description.
version: 0.25.1
servers:
- url: http://www.skycoin.net
description: Main Skycoin server
- url: http://staging.node.skycoin.net
description: Internal staging server for developer.
components:
securitySchemes:
CsrfTokenAuth: # arbitrary name for the security scheme
type: apiKey
in: header # can be "header", "query" or "cookie"
name: X-CSRF-TOKEN # name of the header, query parameter or cookie
schemas:
genericError:
description: This is a generic error that should be default response
type: object
properties:
code:
type: integer
format: int64
message:
type: string
paths:
/somePath:
get:
summary: This is a example of a get method.
description: Some description, is not optional.
responses:
'200': # status code
description: A response of arrays
content:
application/json:
schema:
type: array
items:
type: string
default:
$ref : '#/components/schemas/genericError'
post:
summary: This is a example of a post method.
description: Some description, is not optional.
security:
- CsrfTokenAuth: []
responses:
'200': # status code
description: A response of arrays
content:
application/json:
schema:
type: array
items:
type: string
default:
$ref : '#/components/schemas/genericError'
# To remember :
# Every post method should use security schema.
# Feel free to use and reuse components
# I think, at some point, someone should use oneOf and anyOf, pls take a look