Skip to content

Commit b438e52

Browse files
authored
feat(openapi): update client and provide script/config (#437)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 0d50b1c commit b438e52

File tree

11 files changed

+58
-45
lines changed

11 files changed

+58
-45
lines changed

openapi-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
enumClassPrefix: true
2+
generateInterfaces: true
3+
structPrefix: true
4+
isGoSubmodule: true

openapi.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/docs/swagger.yaml --git-user-id blinklabs-io --git-repo-id cardano-node-api -g go -o /local/openapi -c /local/openapi-config.yml
4+
make format golines
5+
cd openapi && go mod tidy

openapi/.openapi-generator/FILES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
README.md
44
api/openapi.yaml
55
api_chainsync.go
6-
api_default.go
76
api_localstatequery.go
87
api_localtxmonitor.go
8+
api_localtxsubmission.go
99
client.go
1010
configuration.go
1111
docs/ApiResponseApiError.md
@@ -16,9 +16,9 @@ docs/ApiResponseLocalTxMonitorHasTx.md
1616
docs/ApiResponseLocalTxMonitorSizes.md
1717
docs/ApiResponseLocalTxMonitorTxs.md
1818
docs/ChainsyncAPI.md
19-
docs/DefaultAPI.md
2019
docs/LocalstatequeryAPI.md
2120
docs/LocaltxmonitorAPI.md
21+
docs/LocaltxsubmissionAPI.md
2222
git_push.sh
2323
go.mod
2424
go.sum

openapi/.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.8.0-SNAPSHOT
1+
7.14.0

openapi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
77

88
- API version: 1.0
99
- Package version: 1.0.0
10-
- Generator version: 7.11.0-SNAPSHOT
10+
- Generator version: 7.14.0
1111
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1212
For more information, please visit [https://blinklabs.io](https://blinklabs.io)
1313

openapi/api/openapi.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ paths:
3939
content:
4040
'*/*':
4141
schema:
42-
$ref: '#/components/schemas/api.responseApiError'
42+
$ref: "#/components/schemas/api.responseApiError"
4343
description: Bad Request
4444
"500":
4545
content:
4646
'*/*':
4747
schema:
48-
$ref: '#/components/schemas/api.responseApiError'
48+
$ref: "#/components/schemas/api.responseApiError"
4949
description: Internal Server Error
5050
summary: Start a chain-sync using a websocket for events
5151
tags:
@@ -57,13 +57,13 @@ paths:
5757
content:
5858
application/json:
5959
schema:
60-
$ref: '#/components/schemas/api.responseLocalStateQueryCurrentEra'
60+
$ref: "#/components/schemas/api.responseLocalStateQueryCurrentEra"
6161
description: OK
6262
"500":
6363
content:
6464
application/json:
6565
schema:
66-
$ref: '#/components/schemas/api.responseApiError'
66+
$ref: "#/components/schemas/api.responseApiError"
6767
description: Internal Server Error
6868
summary: Query Current Era
6969
tags:
@@ -75,13 +75,13 @@ paths:
7575
content:
7676
application/json:
7777
schema:
78-
$ref: '#/components/schemas/api.responseLocalStateQueryEraHistory'
78+
$ref: "#/components/schemas/api.responseLocalStateQueryEraHistory"
7979
description: OK
8080
"500":
8181
content:
8282
application/json:
8383
schema:
84-
$ref: '#/components/schemas/api.responseApiError'
84+
$ref: "#/components/schemas/api.responseApiError"
8585
description: Internal Server Error
8686
summary: Query Era History
8787
tags:
@@ -93,13 +93,13 @@ paths:
9393
content:
9494
application/json:
9595
schema:
96-
$ref: '#/components/schemas/api.responseLocalStateQueryGenesisConfig'
96+
$ref: "#/components/schemas/api.responseLocalStateQueryGenesisConfig"
9797
description: OK
9898
"500":
9999
content:
100100
application/json:
101101
schema:
102-
$ref: '#/components/schemas/api.responseApiError'
102+
$ref: "#/components/schemas/api.responseApiError"
103103
description: Internal Server Error
104104
summary: Query Genesis Config
105105
tags:
@@ -111,13 +111,13 @@ paths:
111111
content:
112112
application/json:
113113
schema:
114-
$ref: '#/components/schemas/api.responseLocalStateQueryProtocolParams'
114+
$ref: "#/components/schemas/api.responseLocalStateQueryProtocolParams"
115115
description: OK
116116
"500":
117117
content:
118118
application/json:
119119
schema:
120-
$ref: '#/components/schemas/api.responseApiError'
120+
$ref: "#/components/schemas/api.responseApiError"
121121
description: Internal Server Error
122122
summary: Query Current Protocol Parameters
123123
tags:
@@ -129,13 +129,13 @@ paths:
129129
content:
130130
application/json:
131131
schema:
132-
$ref: '#/components/schemas/api.responseLocalStateQuerySystemStart'
132+
$ref: "#/components/schemas/api.responseLocalStateQuerySystemStart"
133133
description: OK
134134
"500":
135135
content:
136136
application/json:
137137
schema:
138-
$ref: '#/components/schemas/api.responseApiError'
138+
$ref: "#/components/schemas/api.responseApiError"
139139
description: Internal Server Error
140140
summary: Query System Start
141141
tags:
@@ -147,13 +147,13 @@ paths:
147147
content:
148148
application/json:
149149
schema:
150-
$ref: '#/components/schemas/api.responseLocalStateQueryTip'
150+
$ref: "#/components/schemas/api.responseLocalStateQueryTip"
151151
description: OK
152152
"500":
153153
content:
154154
application/json:
155155
schema:
156-
$ref: '#/components/schemas/api.responseApiError'
156+
$ref: "#/components/schemas/api.responseApiError"
157157
description: Internal Server Error
158158
summary: Query Chain Tip
159159
tags:
@@ -172,13 +172,13 @@ paths:
172172
content:
173173
application/json:
174174
schema:
175-
$ref: '#/components/schemas/api.responseLocalTxMonitorHasTx'
175+
$ref: "#/components/schemas/api.responseLocalTxMonitorHasTx"
176176
description: OK
177177
"500":
178178
content:
179179
application/json:
180180
schema:
181-
$ref: '#/components/schemas/api.responseApiError'
181+
$ref: "#/components/schemas/api.responseApiError"
182182
description: Internal Server Error
183183
summary: Check if a particular TX exists in the mempool
184184
tags:
@@ -190,13 +190,13 @@ paths:
190190
content:
191191
application/json:
192192
schema:
193-
$ref: '#/components/schemas/api.responseLocalTxMonitorSizes'
193+
$ref: "#/components/schemas/api.responseLocalTxMonitorSizes"
194194
description: OK
195195
"500":
196196
content:
197197
application/json:
198198
schema:
199-
$ref: '#/components/schemas/api.responseApiError'
199+
$ref: "#/components/schemas/api.responseApiError"
200200
description: Internal Server Error
201201
summary: "Get mempool capacity, size, and TX count"
202202
tags:
@@ -209,14 +209,14 @@ paths:
209209
application/json:
210210
schema:
211211
items:
212-
$ref: '#/components/schemas/api.responseLocalTxMonitorTxs'
212+
$ref: "#/components/schemas/api.responseLocalTxMonitorTxs"
213213
type: array
214214
description: OK
215215
"500":
216216
content:
217217
application/json:
218218
schema:
219-
$ref: '#/components/schemas/api.responseApiError'
219+
$ref: "#/components/schemas/api.responseApiError"
220220
description: Internal Server Error
221221
summary: List all transactions in the mempool
222222
tags:

openapi/api_localstatequery.go

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/api_localtxmonitor.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/api_localtxsubmission.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/client.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)