Skip to content

Commit 2be0bfa

Browse files
authored
docs: regenerate swagger docs (#526)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent a905711 commit 2be0bfa

File tree

3 files changed

+229
-2
lines changed

3 files changed

+229
-2
lines changed

docs/docs.go

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Code generated by swaggo/swag. DO NOT EDIT.
2-
1+
// Package docs Code generated by swaggo/swag. DO NOT EDIT
32
package docs
43

54
import "github.com/swaggo/swag"
@@ -219,6 +218,59 @@ const docTemplate = `{
219218
}
220219
}
221220
},
221+
"/localstatequery/utxos/search-by-asset": {
222+
"get": {
223+
"produces": [
224+
"application/json"
225+
],
226+
"tags": [
227+
"localstatequery"
228+
],
229+
"summary": "Search UTxOs by Asset",
230+
"parameters": [
231+
{
232+
"type": "string",
233+
"description": "Policy ID (hex)",
234+
"name": "policy_id",
235+
"in": "query",
236+
"required": true
237+
},
238+
{
239+
"type": "string",
240+
"description": "Asset name (hex)",
241+
"name": "asset_name",
242+
"in": "query",
243+
"required": true
244+
},
245+
{
246+
"type": "string",
247+
"description": "Optional: Filter by address",
248+
"name": "address",
249+
"in": "query"
250+
}
251+
],
252+
"responses": {
253+
"200": {
254+
"description": "OK",
255+
"schema": {
256+
"$ref": "#/definitions/api.responseLocalStateQuerySearchUTxOsByAsset"
257+
}
258+
},
259+
"400": {
260+
"description": "Bad Request",
261+
"schema": {
262+
"$ref": "#/definitions/api.responseApiError"
263+
}
264+
},
265+
"500": {
266+
"description": "Internal Server Error",
267+
"schema": {
268+
"$ref": "#/definitions/api.responseApiError"
269+
}
270+
}
271+
}
272+
}
273+
},
222274
"/localtxmonitor/has_tx/{tx_hash}": {
223275
"get": {
224276
"consumes": [
@@ -396,6 +448,20 @@ const docTemplate = `{
396448
"api.responseLocalStateQueryProtocolParams": {
397449
"type": "object"
398450
},
451+
"api.responseLocalStateQuerySearchUTxOsByAsset": {
452+
"type": "object",
453+
"properties": {
454+
"count": {
455+
"type": "integer"
456+
},
457+
"utxos": {
458+
"type": "array",
459+
"items": {
460+
"$ref": "#/definitions/api.utxoItem"
461+
}
462+
}
463+
}
464+
},
399465
"api.responseLocalStateQuerySystemStart": {
400466
"type": "object",
401467
"properties": {
@@ -466,6 +532,24 @@ const docTemplate = `{
466532
"example": "96649a8b827a5a4d508cd4e98cd88832482f7b884d507a49466d1fb8c4b14978"
467533
}
468534
}
535+
},
536+
"api.utxoItem": {
537+
"type": "object",
538+
"properties": {
539+
"address": {
540+
"type": "string"
541+
},
542+
"amount": {
543+
"type": "integer"
544+
},
545+
"assets": {},
546+
"index": {
547+
"type": "integer"
548+
},
549+
"tx_hash": {
550+
"type": "string"
551+
}
552+
}
469553
}
470554
}
471555
}`
@@ -480,6 +564,8 @@ var SwaggerInfo = &swag.Spec{
480564
Description: "Cardano Node API",
481565
InfoInstanceName: "swagger",
482566
SwaggerTemplate: docTemplate,
567+
LeftDelim: "{{",
568+
RightDelim: "}}",
483569
}
484570

485571
func init() {

docs/swagger.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,59 @@
211211
}
212212
}
213213
},
214+
"/localstatequery/utxos/search-by-asset": {
215+
"get": {
216+
"produces": [
217+
"application/json"
218+
],
219+
"tags": [
220+
"localstatequery"
221+
],
222+
"summary": "Search UTxOs by Asset",
223+
"parameters": [
224+
{
225+
"type": "string",
226+
"description": "Policy ID (hex)",
227+
"name": "policy_id",
228+
"in": "query",
229+
"required": true
230+
},
231+
{
232+
"type": "string",
233+
"description": "Asset name (hex)",
234+
"name": "asset_name",
235+
"in": "query",
236+
"required": true
237+
},
238+
{
239+
"type": "string",
240+
"description": "Optional: Filter by address",
241+
"name": "address",
242+
"in": "query"
243+
}
244+
],
245+
"responses": {
246+
"200": {
247+
"description": "OK",
248+
"schema": {
249+
"$ref": "#/definitions/api.responseLocalStateQuerySearchUTxOsByAsset"
250+
}
251+
},
252+
"400": {
253+
"description": "Bad Request",
254+
"schema": {
255+
"$ref": "#/definitions/api.responseApiError"
256+
}
257+
},
258+
"500": {
259+
"description": "Internal Server Error",
260+
"schema": {
261+
"$ref": "#/definitions/api.responseApiError"
262+
}
263+
}
264+
}
265+
}
266+
},
214267
"/localtxmonitor/has_tx/{tx_hash}": {
215268
"get": {
216269
"consumes": [
@@ -388,6 +441,20 @@
388441
"api.responseLocalStateQueryProtocolParams": {
389442
"type": "object"
390443
},
444+
"api.responseLocalStateQuerySearchUTxOsByAsset": {
445+
"type": "object",
446+
"properties": {
447+
"count": {
448+
"type": "integer"
449+
},
450+
"utxos": {
451+
"type": "array",
452+
"items": {
453+
"$ref": "#/definitions/api.utxoItem"
454+
}
455+
}
456+
}
457+
},
391458
"api.responseLocalStateQuerySystemStart": {
392459
"type": "object",
393460
"properties": {
@@ -458,6 +525,24 @@
458525
"example": "96649a8b827a5a4d508cd4e98cd88832482f7b884d507a49466d1fb8c4b14978"
459526
}
460527
}
528+
},
529+
"api.utxoItem": {
530+
"type": "object",
531+
"properties": {
532+
"address": {
533+
"type": "string"
534+
},
535+
"amount": {
536+
"type": "integer"
537+
},
538+
"assets": {},
539+
"index": {
540+
"type": "integer"
541+
},
542+
"tx_hash": {
543+
"type": "string"
544+
}
545+
}
461546
}
462547
}
463548
}

docs/swagger.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ definitions:
1919
type: object
2020
api.responseLocalStateQueryProtocolParams:
2121
type: object
22+
api.responseLocalStateQuerySearchUTxOsByAsset:
23+
properties:
24+
count:
25+
type: integer
26+
utxos:
27+
items:
28+
$ref: '#/definitions/api.utxoItem'
29+
type: array
30+
type: object
2231
api.responseLocalStateQuerySystemStart:
2332
properties:
2433
day:
@@ -66,6 +75,18 @@ definitions:
6675
format: base16
6776
type: string
6877
type: object
78+
api.utxoItem:
79+
properties:
80+
address:
81+
type: string
82+
amount:
83+
type: integer
84+
assets: {}
85+
index:
86+
type: integer
87+
tx_hash:
88+
type: string
89+
type: object
6990
info:
7091
contact:
7192
email: support@blinklabs.io
@@ -203,6 +224,41 @@ paths:
203224
summary: Query Chain Tip
204225
tags:
205226
- localstatequery
227+
/localstatequery/utxos/search-by-asset:
228+
get:
229+
parameters:
230+
- description: Policy ID (hex)
231+
in: query
232+
name: policy_id
233+
required: true
234+
type: string
235+
- description: Asset name (hex)
236+
in: query
237+
name: asset_name
238+
required: true
239+
type: string
240+
- description: 'Optional: Filter by address'
241+
in: query
242+
name: address
243+
type: string
244+
produces:
245+
- application/json
246+
responses:
247+
"200":
248+
description: OK
249+
schema:
250+
$ref: '#/definitions/api.responseLocalStateQuerySearchUTxOsByAsset'
251+
"400":
252+
description: Bad Request
253+
schema:
254+
$ref: '#/definitions/api.responseApiError'
255+
"500":
256+
description: Internal Server Error
257+
schema:
258+
$ref: '#/definitions/api.responseApiError'
259+
summary: Search UTxOs by Asset
260+
tags:
261+
- localstatequery
206262
/localtxmonitor/has_tx/{tx_hash}:
207263
get:
208264
consumes:

0 commit comments

Comments
 (0)