From f063ef250e7e8f099590609fe183757a8cb20473 Mon Sep 17 00:00:00 2001 From: waltkb <68587968+waltkb@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:53:48 +0200 Subject: [PATCH] fix swagger not rendering --- src/main/kotlin/id/walt/nftkit/models/NFTsInfos.kt | 3 +-- src/main/kotlin/id/walt/nftkit/rest/NftController.kt | 2 +- src/main/kotlin/id/walt/nftkit/rest/NftKitApi.kt | 3 --- .../id/walt/nftkit/rest/PolkadotUniqueNftController.kt | 8 ++++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/id/walt/nftkit/models/NFTsInfos.kt b/src/main/kotlin/id/walt/nftkit/models/NFTsInfos.kt index 0209e948..bf36b86b 100644 --- a/src/main/kotlin/id/walt/nftkit/models/NFTsInfos.kt +++ b/src/main/kotlin/id/walt/nftkit/models/NFTsInfos.kt @@ -10,5 +10,4 @@ class NFTsInfos( val tezosNfts: List?= null, val polkadotEvmNft: List?= null, val polkadotUniqueNft: List?= null -) { -} \ No newline at end of file +) diff --git a/src/main/kotlin/id/walt/nftkit/rest/NftController.kt b/src/main/kotlin/id/walt/nftkit/rest/NftController.kt index ada185b9..6302a8d5 100644 --- a/src/main/kotlin/id/walt/nftkit/rest/NftController.kt +++ b/src/main/kotlin/id/walt/nftkit/rest/NftController.kt @@ -227,7 +227,7 @@ object NftController { }.pathParam("chain") { it.schema { } }.pathParam("ownerAddress") { - }.json("200") { it.description("NFTs list") } + }.json("200") { it.description("NFTs list: evmNfts: [NftTokenByAlchemy], tezosNfts: [TezosNFTsTzktResult], val polkadotEvmNft: [PolkadotEvmNft], polkadotUniqueNft: [PolkadotUniqueNft]") } fun updateMetadata(ctx: Context) { val chain = ctx.pathParam("chain") diff --git a/src/main/kotlin/id/walt/nftkit/rest/NftKitApi.kt b/src/main/kotlin/id/walt/nftkit/rest/NftKitApi.kt index d5c9f668..b950bf9f 100644 --- a/src/main/kotlin/id/walt/nftkit/rest/NftKitApi.kt +++ b/src/main/kotlin/id/walt/nftkit/rest/NftKitApi.kt @@ -316,9 +316,6 @@ object NftKitApi { "chain/{chain}/assets/account/{address}/", documented(AlgorandNftController.fetchAccountAssetsDocs(), AlgorandNftController::fetchAccountAssets) ) - - - } } path("nft/verifier") { diff --git a/src/main/kotlin/id/walt/nftkit/rest/PolkadotUniqueNftController.kt b/src/main/kotlin/id/walt/nftkit/rest/PolkadotUniqueNftController.kt index 4b00c3db..2fe74175 100644 --- a/src/main/kotlin/id/walt/nftkit/rest/PolkadotUniqueNftController.kt +++ b/src/main/kotlin/id/walt/nftkit/rest/PolkadotUniqueNftController.kt @@ -81,8 +81,8 @@ object PolkadotUniqueNftController { }.pathParam("network") { it.schema {} }.pathParam("account"){ - }.json("200"){ - it.description("Fetched NFTs") + }.json("200"){ + it.description("Fetched NFTs: {fullUrl: String, ipfsCid: String?, attributes: [{name: String, value: JsonElement}, ...]}") } @@ -105,8 +105,8 @@ object PolkadotUniqueNftController { it.schema {} }.pathParam("collectionId"){ }.pathParam("tokenId"){ - }.json("200"){ - it.description("Fetched NFT metadata") + }.json("200"){ + it.description("Fetched NFT metadata: {fullUrl: String, ipfsCid: String?, attributes: [{name: String, value: JsonElement}, ...]}") } }