-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcbermudez97_espec.yml
68 lines (63 loc) · 2.26 KB
/
cbermudez97_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
66
67
68
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:
/api/sign:
post:
summary: Sign transaction method.
description: Should sign given transaction with the given private key.
security:
- CsrfTokenAuth: []
requestBody:
description: 'A JSON object containing: The Private Keys, which were returned by the [POST] /api/wallets. Multiple keys can be used for transactions with multiple inputs. The Transaction Context in the blockchain specific format [POST] /api/transactions or [PUT] /api/transactions.'
required: true
content:
application/json:
schema:
type: object
properties:
privateKeys:
type: array
items:
type: string
transactionContext:
type: string
responses:
'200': # status code
description: Signed transaction, which will be used to broadcast the transaction [PUT] /api/transactions/broadcast
content:
application/json:
schema:
type: object
properties:
signedTransaction:
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