From bd8afb51cdb2e97ac72ee4899bd95c89fe0e16b2 Mon Sep 17 00:00:00 2001 From: Artem Date: Wed, 28 Aug 2024 16:12:10 +0300 Subject: [PATCH] Make api docs --- cmd/api/docs/docs.go | 21 +++++++++++++++++++++ cmd/api/docs/swagger.json | 21 +++++++++++++++++++++ cmd/api/docs/swagger.yaml | 15 +++++++++++++++ internal/storage/mock/action.go | 3 +++ internal/storage/mock/address.go | 3 +++ internal/storage/mock/balance.go | 3 +++ internal/storage/mock/balance_update.go | 3 +++ internal/storage/mock/block.go | 3 +++ internal/storage/mock/block_signature.go | 3 +++ internal/storage/mock/block_stats.go | 3 +++ internal/storage/mock/bridge.go | 3 +++ internal/storage/mock/constant.go | 3 +++ internal/storage/mock/generic.go | 3 +++ internal/storage/mock/rollup.go | 3 +++ internal/storage/mock/state.go | 3 +++ internal/storage/mock/stats.go | 3 +++ internal/storage/mock/tx.go | 3 +++ internal/storage/mock/validator.go | 3 +++ internal/storage/types/action_type_enum.go | 3 +++ internal/storage/types/module_enum.go | 3 +++ internal/storage/types/status_enum.go | 3 +++ pkg/node/mock/api.go | 3 +++ 22 files changed, 114 insertions(+) diff --git a/cmd/api/docs/docs.go b/cmd/api/docs/docs.go index 9dea3a0..66cb1ea 100644 --- a/cmd/api/docs/docs.go +++ b/cmd/api/docs/docs.go @@ -2172,6 +2172,9 @@ const docTemplate = `{ "type": "object", "additionalProperties": {} }, + "fee": { + "$ref": "#/definitions/responses.Fee" + }, "height": { "type": "integer", "format": "int64", @@ -2423,6 +2426,21 @@ const docTemplate = `{ } } }, + "responses.Fee": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "format": "string", + "example": "1000" + }, + "asset": { + "type": "string", + "format": "string", + "example": "nria" + } + } + }, "responses.NetworkSummary": { "type": "object", "properties": { @@ -2589,6 +2607,9 @@ const docTemplate = `{ "type": "object", "additionalProperties": {} }, + "fee": { + "$ref": "#/definitions/responses.Fee" + }, "height": { "type": "integer", "format": "int64", diff --git a/cmd/api/docs/swagger.json b/cmd/api/docs/swagger.json index acd4905..231b8a5 100644 --- a/cmd/api/docs/swagger.json +++ b/cmd/api/docs/swagger.json @@ -2162,6 +2162,9 @@ "type": "object", "additionalProperties": {} }, + "fee": { + "$ref": "#/definitions/responses.Fee" + }, "height": { "type": "integer", "format": "int64", @@ -2413,6 +2416,21 @@ } } }, + "responses.Fee": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "format": "string", + "example": "1000" + }, + "asset": { + "type": "string", + "format": "string", + "example": "nria" + } + } + }, "responses.NetworkSummary": { "type": "object", "properties": { @@ -2579,6 +2597,9 @@ "type": "object", "additionalProperties": {} }, + "fee": { + "$ref": "#/definitions/responses.Fee" + }, "height": { "type": "integer", "format": "int64", diff --git a/cmd/api/docs/swagger.yaml b/cmd/api/docs/swagger.yaml index 5829bc8..af8a8e0 100644 --- a/cmd/api/docs/swagger.yaml +++ b/cmd/api/docs/swagger.yaml @@ -9,6 +9,8 @@ definitions: data: additionalProperties: {} type: object + fee: + $ref: '#/definitions/responses.Fee' height: example: 1000 format: int64 @@ -191,6 +193,17 @@ definitions: type: string type: array type: object + responses.Fee: + properties: + amount: + example: "1000" + format: string + type: string + asset: + example: nria + format: string + type: string + type: object responses.NetworkSummary: properties: block_time: @@ -318,6 +331,8 @@ definitions: data: additionalProperties: {} type: object + fee: + $ref: '#/definitions/responses.Fee' height: example: 1000 format: int64 diff --git a/internal/storage/mock/action.go b/internal/storage/mock/action.go index 9268159..2ccbdd0 100644 --- a/internal/storage/mock/action.go +++ b/internal/storage/mock/action.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: action.go // diff --git a/internal/storage/mock/address.go b/internal/storage/mock/address.go index db9d8f3..428f976 100644 --- a/internal/storage/mock/address.go +++ b/internal/storage/mock/address.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: address.go // diff --git a/internal/storage/mock/balance.go b/internal/storage/mock/balance.go index 6fbec96..2e8615d 100644 --- a/internal/storage/mock/balance.go +++ b/internal/storage/mock/balance.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: balance.go // diff --git a/internal/storage/mock/balance_update.go b/internal/storage/mock/balance_update.go index 3164271..de6e807 100644 --- a/internal/storage/mock/balance_update.go +++ b/internal/storage/mock/balance_update.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: balance_update.go // diff --git a/internal/storage/mock/block.go b/internal/storage/mock/block.go index b6f02b0..cfdcd50 100644 --- a/internal/storage/mock/block.go +++ b/internal/storage/mock/block.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: block.go // diff --git a/internal/storage/mock/block_signature.go b/internal/storage/mock/block_signature.go index 76cbd91..1ffe103 100644 --- a/internal/storage/mock/block_signature.go +++ b/internal/storage/mock/block_signature.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: block_signature.go // diff --git a/internal/storage/mock/block_stats.go b/internal/storage/mock/block_stats.go index f097645..3d91398 100644 --- a/internal/storage/mock/block_stats.go +++ b/internal/storage/mock/block_stats.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: block_stats.go // diff --git a/internal/storage/mock/bridge.go b/internal/storage/mock/bridge.go index 9e858a7..3c0c9b6 100644 --- a/internal/storage/mock/bridge.go +++ b/internal/storage/mock/bridge.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: bridge.go // diff --git a/internal/storage/mock/constant.go b/internal/storage/mock/constant.go index 1fe723e..3101039 100644 --- a/internal/storage/mock/constant.go +++ b/internal/storage/mock/constant.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: constant.go // diff --git a/internal/storage/mock/generic.go b/internal/storage/mock/generic.go index d99bc86..ee336b2 100644 --- a/internal/storage/mock/generic.go +++ b/internal/storage/mock/generic.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: generic.go // diff --git a/internal/storage/mock/rollup.go b/internal/storage/mock/rollup.go index 54427ad..e2f8304 100644 --- a/internal/storage/mock/rollup.go +++ b/internal/storage/mock/rollup.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: rollup.go // diff --git a/internal/storage/mock/state.go b/internal/storage/mock/state.go index 902f2b7..7156298 100644 --- a/internal/storage/mock/state.go +++ b/internal/storage/mock/state.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: state.go // diff --git a/internal/storage/mock/stats.go b/internal/storage/mock/stats.go index 45dafcc..9ab1c18 100644 --- a/internal/storage/mock/stats.go +++ b/internal/storage/mock/stats.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: stats.go // diff --git a/internal/storage/mock/tx.go b/internal/storage/mock/tx.go index b1ff498..535d1c9 100644 --- a/internal/storage/mock/tx.go +++ b/internal/storage/mock/tx.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: tx.go // diff --git a/internal/storage/mock/validator.go b/internal/storage/mock/validator.go index f05c58f..46a23c9 100644 --- a/internal/storage/mock/validator.go +++ b/internal/storage/mock/validator.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: validator.go // diff --git a/internal/storage/types/action_type_enum.go b/internal/storage/types/action_type_enum.go index 2b6d74a..047d050 100644 --- a/internal/storage/types/action_type_enum.go +++ b/internal/storage/types/action_type_enum.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/internal/storage/types/module_enum.go b/internal/storage/types/module_enum.go index 7f790ad..f1574fb 100644 --- a/internal/storage/types/module_enum.go +++ b/internal/storage/types/module_enum.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/internal/storage/types/status_enum.go b/internal/storage/types/status_enum.go index 9520183..fe296df 100644 --- a/internal/storage/types/status_enum.go +++ b/internal/storage/types/status_enum.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/pkg/node/mock/api.go b/pkg/node/mock/api.go index 7605819..aa86578 100644 --- a/pkg/node/mock/api.go +++ b/pkg/node/mock/api.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + // Code generated by MockGen. DO NOT EDIT. // Source: api.go //