Skip to content

Commit ef1dc0b

Browse files
committed
feat: update swagger and add iohk copy
Manually update the swagger.yaml ordering a bit to make it align with the upstream version of the file, which is imported as `iohk.yaml` to allow for easy comparison. Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 160d2e5 commit ef1dc0b

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

docs/iohk.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
swagger: '2.0'
2+
schemes: ["http"]
3+
host: localhost
4+
basePath: /
5+
info:
6+
title: cardano-submit-api
7+
version: 3.1.0
8+
license:
9+
name: Apache-2.0
10+
url: https://github.com/input-output-hk/cardano-rest/blob/master/submit-api/LICENSE
11+
description: |
12+
<p align="right"><img style="position: relative; top: -10em; margin-bottom: -12em;" width="20%" src="https://cardanodocs.com/img/cardano.png"></img></p>
13+
14+
x-tagGroups: []
15+
16+
definitions: {}
17+
18+
paths:
19+
/api/submit/tx:
20+
post:
21+
operationId: postTransaction
22+
summary: Submit Tx
23+
description: Submit an already serialized transaction to the network.
24+
parameters:
25+
- in: header
26+
name: Content-Type
27+
required: true
28+
type: string
29+
enum: ["application/cbor"]
30+
31+
x-code-samples:
32+
- lang: "Shell"
33+
label: "cURL"
34+
source: |
35+
# Assuming `data` is a raw binary serialized transaction on the file-system.
36+
curl -X POST \
37+
--header "Content-Type: application/cbor" \
38+
--data-binary @data http://localhost:8101/api/submit/tx
39+
produces:
40+
- "application/json"
41+
responses:
42+
202:
43+
description: Ok
44+
schema:
45+
description: The transaction id.
46+
type: string
47+
format: hex
48+
minLength: 64
49+
maxLength: 64
50+
example: 92bcd06b25dfbd89b578d536b4d3b7dd269b7c2aa206ed518012cffe0444d67f
51+
52+
400:
53+
description: Bad Request
54+
schema:
55+
type: string
56+
description: An error message.

docs/swagger.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
basePath: /
1+
swagger: "2.0"
2+
schemes: ["http"]
23
host: localhost:8090
4+
basePath: /
35
info:
6+
title: go-cardano-submit-api
7+
version: 3.1.0
48
contact:
59
610
name: CloudStruct
@@ -9,11 +13,10 @@ info:
913
license:
1014
name: Apache 2.0
1115
url: http://www.apache.org/licenses/LICENSE-2.0.html
12-
title: go-cardano-submit-api
13-
version: 3.1.0
1416
paths:
1517
/api/submit/tx:
1618
post:
19+
summary: Submit Tx
1720
description: Submit an already serialized transaction to the network.
1821
parameters:
1922
- description: Content type
@@ -38,7 +41,3 @@ paths:
3841
description: Server Error
3942
schema:
4043
type: string
41-
summary: Submit Tx
42-
schemes:
43-
- http
44-
swagger: "2.0"

0 commit comments

Comments
 (0)