From 76d91e19e8b8d042c30834cab3b156fe8f0b1f94 Mon Sep 17 00:00:00 2001 From: Lukas Jenicek Date: Thu, 10 Oct 2024 18:26:27 +0200 Subject: [PATCH] Update marketplace generated yaml with req/response examples (#343) * update marketplace generated yaml with req/response examples * use yargs to parser cli input arguments * run github action only when marketplace docs are changed * make github actions more generic * [AUTOMATED] Update: docs/pages/api/marketplace/marketplace.gen.yaml * wip * remove extra file * [AUTOMATED] Update: docs/pages/api/marketplace/marketplace.gen.yaml * check if examples file exist * remove extra logs from github action * update actions/checkout to v4 * update list currencies response example * [AUTOMATED] Update: docs/pages/api/marketplace/marketplace.gen.yaml * Add GetCollectible example * [AUTOMATED] Update: docs/pages/api/marketplace/marketplace.gen.yaml * Add example GenerateBuyTransaction * update buy transaction response * handle exceptions * fix buy transaction path * [AUTOMATED] Update: docs/pages/api/marketplace/marketplace.gen.yaml --------- Co-authored-by: LukasJenicek <6400599+LukasJenicek@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 49 ++ docs/pages/api/marketplace/examples.json | 108 +++++ .../api/marketplace/marketplace.gen.yaml | 434 +++++++++++------- libs/example_merger.js | 78 ++++ package.json | 5 +- pnpm-lock.yaml | 23 + 7 files changed, 542 insertions(+), 157 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/pages/api/marketplace/examples.json create mode 100644 libs/example_merger.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40293a6f30..8dd5f130a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: name: Build and Push steps: - name: git-checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..39a2c27c83 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: Docs + +on: + pull_request: + paths: + - "**/*.gen.yaml" + +jobs: + build: + runs-on: ubuntu-latest + name: Merge request && response examples + steps: + - name: git-checkout + uses: actions/checkout@v4 + with: + lfs: true + + - name: Install dependencies + run: | + npm install -g pnpm@8.15.4 + pnpm install + + - name: Get changed files + id: changes + run: | + git fetch origin ${{ github.base_ref }} + # List only the files that have changed between the current commit and the previous one + git diff --name-only origin/master | grep '\.gen\.yaml$' > changed_files.txt + # Save the changed files to an output to be used later + echo "::set-output name=files::$(cat changed_files.txt | tr '\n' ' ' | sed -e 's/\ *$//g')" + echo "::set-output name=dirs::$(cat changed_files.txt | xargs -n 1 dirname | sort -u | tr '\n' ' ' | sed -e 's/\ *$//g')" + rm changed_files.txt + + - name: Merge request and responses + run: | + # Read the changed files from the previous step + node libs/example_merger.js merge ${{ steps.changes.outputs.files }} + + - name: Push changes + uses: 0xsequence/actions/git-commit@master + env: + API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN_GIT_COMMIT }} + with: + src: ${{ steps.changes.outputs.files }} + dst: "${{ steps.changes.outputs.dirs }}/" + branch: ${{ github.head_ref }} + ## since openapi docs are generated and PR is automatically created there is no need to try create new one + pr_create: false + diff --git a/docs/pages/api/marketplace/examples.json b/docs/pages/api/marketplace/examples.json new file mode 100644 index 0000000000..f2470ea582 --- /dev/null +++ b/docs/pages/api/marketplace/examples.json @@ -0,0 +1,108 @@ +{ + "/rpc/Marketplace/ListCurrencies": { + "request": {}, + "response": { + "currencies": [ + { + "chainId": 137, + "contractAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", + "name": "", + "symbol": "", + "decimals": 18, + "imageUrl": "", + "exchangeRate": 0, + "defaultChainCurrency": true, + "nativeCurrency": false, + "sardineSupported": false, + "transakSupported": false, + "createdAt": "2024-10-10T14:09:23.649572Z", + "updatedAt": "2024-10-10T14:09:23.649572Z" + }, + { + "chainId": 137, + "contractAddress": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", + "name": "", + "symbol": "", + "decimals": 18, + "imageUrl": "", + "exchangeRate": 0, + "defaultChainCurrency": true, + "nativeCurrency": false, + "sardineSupported": false, + "transakSupported": false, + "createdAt": "2024-10-10T14:09:23.649578Z", + "updatedAt": "2024-10-10T14:09:23.649578Z" + }, + { + "chainId": 137, + "contractAddress": "0x0000000000000000000000000000000000000000", + "name": "Matic", + "symbol": "MATIC", + "decimals": 18, + "imageUrl": "https://assets.sequence.info/images/networks/medium/137.webp", + "exchangeRate": 0, + "defaultChainCurrency": false, + "nativeCurrency": true, + "sardineSupported": false, + "transakSupported": false, + "createdAt": "2024-10-10T14:09:24.295951Z", + "updatedAt": "2024-10-10T14:09:24Z" + } + ] + } + }, + "/rpc/Marketplace/GetCollectible": { + "request": { + "contractAddress": "0x44B3F42E2BF34F62868FF9E9DAB7C2F807BA97CB", + "tokenId": "0" + }, + "response": { + "metadata": { + "tokenId": "0", + "name": "Elf Archer Shard - Common", + "description": "Shards for the Hunters On-Chain game", + "image": "https://hunt-nft.cdn.boombit.cloud/Shards/0.png", + "properties": null, + "attributes": [ + { + "trait_type": "Rarity", + "value": "Common" + }, + { + "trait_type": "Type", + "value": "Elf Archer" + } + ], + "external_url": "https://boomland.io", + "updatedAt": "2024-10-10T14:25:44.332280097Z" + } + } + }, + "/rpc/Marketplace/GenerateBuyTransaction": { + "request": { + "collectionAddress": "0x44b3f42e2bf34f62868ff9e9dab7c2f807ba97cb", + "buyer": "0xD2eFbb2f18bfE3D265b26D2ACe83400A65335a07", + "marketplace": "magic_eden", + "ordersData": [ + { + "orderId": "0xdb10541c97abdf95eaf55e77b619c58ed06d6b14469131badc657dabb2a823f0", + "quantity": "18" + } + ], + "walletType": "sequence" + }, + "response": { + "steps": [ + { + "id": "tokenApproval", + "data": "0xe7acab24000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000006c00000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000d2efbb2f18bfe3d265b26d2ace83400a65335a0700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000004cefda7eb55d6f7dd913032d4ee88ac5609594380000000000000000000000002d1a340cd83434243d090931afabf95b7d3078b00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000066fe1db4000000000000000000000000000000000000000000000000000000006726fc7000000000000000000000000000000000000000000000000000000000000000000e1c0c381d4da48b0000000000000000d467a7aec379c278c0ddc9a86b559e5a87328c9043e7bf343695554eaaf5a8892f7205e300000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000044b3f42e2bf34f62868ff9e9dab7c2f807ba97cb0000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d3751fe908000000000000000000000000000000000000000000000000000000d3751fe9080000000000000000000000000004cefda7eb55d6f7dd913032d4ee88ac5609594380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b5e620f480000000000000000000000000000000000000000000000000000000b5e620f4800000000000000000000000000099f1117f13e072b299942037e6a5d1469912b47a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048c273950000000000000000000000000000000000000000000000000000000048c2739500000000000000000000000000006fa303e72bed54f515a513496f922bc331e2f27e00000000000000000000000000000000000000000000000000000000000000413cc3ca6b43ab8b01102879bf64a0311a4d92a6727904c2f29a475bf163d77f3900e2fea71f1b616059f353a17e39ccc6c65b289c52aeb971bc0b2dea67d0380c1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000006707e6368b5bfbd9116608291be1bb6c97bb58d16839d624521f85dd1c8a09368e7d4c7d5d8ce5d60813788e5f08aae22963c5af59a51f087b98ff8a5181cba8ab8278e300c3d56aceec35c08a9a2ed624c39a99054544aa5ccdaba5b2792fce5025476b31000000000000000000000000000000000000000000000000000000000000000000001d4da48b00000000", + "to": "0x0000000000000068F116a894984e2DB1123eB395", + "value": "0x038d7ea4c68000", + "signature": null, + "post": null, + "executeType": null + } + ] + } + } +} \ No newline at end of file diff --git a/docs/pages/api/marketplace/marketplace.gen.yaml b/docs/pages/api/marketplace/marketplace.gen.yaml index f555fcc90c..08da1eed5a 100644 --- a/docs/pages/api/marketplace/marketplace.gen.yaml +++ b/docs/pages/api/marketplace/marketplace.gen.yaml @@ -1,17 +1,19 @@ -# marketplace-api f89c761f2d08c8b0869bf54905cb4483356c54a8 -# -- -# Code generated by webrpc-gen@v0.20.1 with openapi generator; DO NOT EDIT -# -# webrpc-gen -service=Marketplace -ignore=@internal -schema=proto/marketplace.ridl -target=openapi -title=Marketplace Api -servers=https://marketplace-api.sequence.app/;Marketplace API -securityAnnotation=@auth -securitySchemes={ 'ApiKeyAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key' }, } -out=proto/docs/marketplace.gen.yaml openapi: 3.0.0 info: - title: 'Marketplace Api' + title: Marketplace Api version: '' servers: - - url: 'https://marketplace-api.sequence.app/' - description: 'Marketplace API' + - url: https://marketplace-api.sequence.app/ + description: Marketplace API components: - securitySchemes: {ApiKeyAuth: {type: apiKey, in: header, description: 'Project access key for authenticating requests, get an access key at https://sequence.build', name: X-Access-Key}} + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + description: >- + Project access key for authenticating requests, get an access key at + https://sequence.build + name: X-Access-Key schemas: ErrorWebrpcEndpoint: type: object @@ -23,13 +25,13 @@ components: properties: error: type: string - example: "WebrpcEndpoint" + example: WebrpcEndpoint code: type: number example: 0 msg: type: string - example: "endpoint error" + example: endpoint error cause: type: string status: @@ -45,13 +47,13 @@ components: properties: error: type: string - example: "WebrpcRequestFailed" + example: WebrpcRequestFailed code: type: number example: -1 msg: type: string - example: "request failed" + example: request failed cause: type: string status: @@ -67,13 +69,13 @@ components: properties: error: type: string - example: "WebrpcBadRoute" + example: WebrpcBadRoute code: type: number example: -2 msg: type: string - example: "bad route" + example: bad route cause: type: string status: @@ -89,13 +91,13 @@ components: properties: error: type: string - example: "WebrpcBadMethod" + example: WebrpcBadMethod code: type: number example: -3 msg: type: string - example: "bad method" + example: bad method cause: type: string status: @@ -111,13 +113,13 @@ components: properties: error: type: string - example: "WebrpcBadRequest" + example: WebrpcBadRequest code: type: number example: -4 msg: type: string - example: "bad request" + example: bad request cause: type: string status: @@ -133,13 +135,13 @@ components: properties: error: type: string - example: "WebrpcBadResponse" + example: WebrpcBadResponse code: type: number example: -5 msg: type: string - example: "bad response" + example: bad response cause: type: string status: @@ -155,13 +157,13 @@ components: properties: error: type: string - example: "WebrpcServerPanic" + example: WebrpcServerPanic code: type: number example: -6 msg: type: string - example: "server panic" + example: server panic cause: type: string status: @@ -177,13 +179,13 @@ components: properties: error: type: string - example: "WebrpcInternalError" + example: WebrpcInternalError code: type: number example: -7 msg: type: string - example: "internal error" + example: internal error cause: type: string status: @@ -199,13 +201,13 @@ components: properties: error: type: string - example: "WebrpcClientDisconnected" + example: WebrpcClientDisconnected code: type: number example: -8 msg: type: string - example: "client disconnected" + example: client disconnected cause: type: string status: @@ -221,13 +223,13 @@ components: properties: error: type: string - example: "WebrpcStreamLost" + example: WebrpcStreamLost code: type: number example: -9 msg: type: string - example: "stream lost" + example: stream lost cause: type: string status: @@ -243,13 +245,13 @@ components: properties: error: type: string - example: "WebrpcStreamFinished" + example: WebrpcStreamFinished code: type: number example: -10 msg: type: string - example: "stream finished" + example: stream finished cause: type: string status: @@ -265,13 +267,13 @@ components: properties: error: type: string - example: "Unauthorized" + example: Unauthorized code: type: number example: 1000 msg: type: string - example: "Unauthorized access" + example: Unauthorized access cause: type: string status: @@ -287,13 +289,13 @@ components: properties: error: type: string - example: "PermissionDenied" + example: PermissionDenied code: type: number example: 1001 msg: type: string - example: "Permission denied" + example: Permission denied cause: type: string status: @@ -309,13 +311,13 @@ components: properties: error: type: string - example: "SessionExpired" + example: SessionExpired code: type: number example: 1002 msg: type: string - example: "Session expired" + example: Session expired cause: type: string status: @@ -331,13 +333,13 @@ components: properties: error: type: string - example: "MethodNotFound" + example: MethodNotFound code: type: number example: 1003 msg: type: string - example: "Method not found" + example: Method not found cause: type: string status: @@ -353,13 +355,13 @@ components: properties: error: type: string - example: "Timeout" + example: Timeout code: type: number example: 2000 msg: type: string - example: "Request timed out" + example: Request timed out cause: type: string status: @@ -375,13 +377,13 @@ components: properties: error: type: string - example: "InvalidArgument" + example: InvalidArgument code: type: number example: 2001 msg: type: string - example: "Invalid argument" + example: Invalid argument cause: type: string status: @@ -397,13 +399,13 @@ components: properties: error: type: string - example: "NotFound" + example: NotFound code: type: number example: 3000 msg: type: string - example: "Resource not found" + example: Resource not found cause: type: string status: @@ -419,13 +421,13 @@ components: properties: error: type: string - example: "UserNotFound" + example: UserNotFound code: type: number example: 3001 msg: type: string - example: "User not found" + example: User not found cause: type: string status: @@ -441,13 +443,13 @@ components: properties: error: type: string - example: "ProjectNotFound" + example: ProjectNotFound code: type: number example: 3002 msg: type: string - example: "Project not found" + example: Project not found cause: type: string status: @@ -463,13 +465,13 @@ components: properties: error: type: string - example: "InvalidTier" + example: InvalidTier code: type: number example: 3003 msg: type: string - example: "Invalid subscription tier" + example: Invalid subscription tier cause: type: string status: @@ -485,13 +487,13 @@ components: properties: error: type: string - example: "ProjectLimitReached" + example: ProjectLimitReached code: type: number example: 3005 msg: type: string - example: "Project limit reached" + example: Project limit reached cause: type: string status: @@ -507,13 +509,13 @@ components: properties: error: type: string - example: "NotImplemented" + example: NotImplemented code: type: number example: 9999 msg: type: string - example: "Not Implemented" + example: Not Implemented cause: type: string status: @@ -540,7 +542,7 @@ components: type: string properties: type: object - description: 'map' + description: map additionalProperties: type: object attributes: @@ -548,7 +550,7 @@ components: description: '[]map' items: type: object - description: 'map' + description: map additionalProperties: type: object imageData: @@ -1082,7 +1084,7 @@ components: properties: lastSynced: type: object - description: 'map' + description: map additionalProperties: $ref: '#/components/schemas/CollectionLastSynced' collectiblesSynced: @@ -1851,7 +1853,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_ListCurrencies_Response' - '4XX': + example: + currencies: + - chainId: 137 + contractAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359' + name: '' + symbol: '' + decimals: 18 + imageUrl: '' + exchangeRate: 0 + defaultChainCurrency: true + nativeCurrency: false + sardineSupported: false + transakSupported: false + createdAt: '2024-10-10T14:09:23.649572Z' + updatedAt: '2024-10-10T14:09:23.649572Z' + - chainId: 137 + contractAddress: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' + name: '' + symbol: '' + decimals: 18 + imageUrl: '' + exchangeRate: 0 + defaultChainCurrency: true + nativeCurrency: false + sardineSupported: false + transakSupported: false + createdAt: '2024-10-10T14:09:23.649578Z' + updatedAt: '2024-10-10T14:09:23.649578Z' + - chainId: 137 + contractAddress: '0x0000000000000000000000000000000000000000' + name: Matic + symbol: MATIC + decimals: 18 + imageUrl: >- + https://assets.sequence.info/images/networks/medium/137.webp + exchangeRate: 0 + defaultChainCurrency: false + nativeCurrency: true + sardineSupported: false + transakSupported: false + createdAt: '2024-10-10T14:09:24.295951Z' + updatedAt: '2024-10-10T14:09:24Z' + 4XX: description: Client error content: application/json: @@ -1875,7 +1919,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -1893,6 +1937,9 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_GetCollectible_Request' + example: + contractAddress: '0x44B3F42E2BF34F62868FF9E9DAB7C2F807BA97CB' + tokenId: '0' responses: '200': description: OK @@ -1900,7 +1947,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_GetCollectible_Response' - '4XX': + example: + metadata: + tokenId: '0' + name: Elf Archer Shard - Common + description: Shards for the Hunters On-Chain game + image: https://hunt-nft.cdn.boombit.cloud/Shards/0.png + properties: null + attributes: + - trait_type: Rarity + value: Common + - trait_type: Type + value: Elf Archer + external_url: https://boomland.io + updatedAt: '2024-10-10T14:25:44.332280097Z' + 4XX: description: Client error content: application/json: @@ -1924,7 +1985,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -1941,15 +2002,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetLowestPriceOfferForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_GetLowestPriceOfferForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetLowestPriceOfferForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetLowestPriceOfferForCollectible_Response + 4XX: description: Client error content: application/json: @@ -1973,7 +2036,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -1990,15 +2053,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetHighestPriceOfferForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_GetHighestPriceOfferForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetHighestPriceOfferForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetHighestPriceOfferForCollectible_Response + 4XX: description: Client error content: application/json: @@ -2022,7 +2087,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2039,15 +2104,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetLowestPriceListingForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_GetLowestPriceListingForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetLowestPriceListingForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetLowestPriceListingForCollectible_Response + 4XX: description: Client error content: application/json: @@ -2071,7 +2138,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2088,15 +2155,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetHighestPriceListingForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_GetHighestPriceListingForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetHighestPriceListingForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetHighestPriceListingForCollectible_Response + 4XX: description: Client error content: application/json: @@ -2120,7 +2189,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2137,15 +2206,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListListingsForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_ListListingsForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListListingsForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListListingsForCollectible_Response + 4XX: description: Client error content: application/json: @@ -2169,7 +2240,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2186,15 +2257,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListOffersForCollectible_Request' + $ref: >- + #/components/schemas/Marketplace_ListOffersForCollectible_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListOffersForCollectible_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListOffersForCollectible_Response + 4XX: description: Client error content: application/json: @@ -2218,7 +2291,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2238,15 +2311,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleLowestOffer_Request' + $ref: >- + #/components/schemas/Marketplace_GetCollectibleLowestOffer_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleLowestOffer_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetCollectibleLowestOffer_Response + 4XX: description: Client error content: application/json: @@ -2270,7 +2345,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2284,20 +2359,24 @@ paths: post: summary: GetCollectibleHighestOffer deprecated: true - description: "This endpoint is deprecated. Please use GetHighestPriceOfferForCollectible()" + description: >- + This endpoint is deprecated. Please use + GetHighestPriceOfferForCollectible() requestBody: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleHighestOffer_Request' + $ref: >- + #/components/schemas/Marketplace_GetCollectibleHighestOffer_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleHighestOffer_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetCollectibleHighestOffer_Response + 4XX: description: Client error content: application/json: @@ -2321,7 +2400,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2335,20 +2414,24 @@ paths: post: summary: GetCollectibleLowestListing deprecated: true - description: "This endpoint is deprecated. Please use GetLowestPriceListingForCollectible()" + description: >- + This endpoint is deprecated. Please use + GetLowestPriceListingForCollectible() requestBody: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleLowestListing_Request' + $ref: >- + #/components/schemas/Marketplace_GetCollectibleLowestListing_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleLowestListing_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetCollectibleLowestListing_Response + 4XX: description: Client error content: application/json: @@ -2372,7 +2455,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2386,20 +2469,24 @@ paths: post: summary: GetCollectibleHighestListing deprecated: true - description: "This endpoint is deprecated. Please use GetHighestPriceListingForCollectible()" + description: >- + This endpoint is deprecated. Please use + GetHighestPriceListingForCollectible() requestBody: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleHighestListing_Request' + $ref: >- + #/components/schemas/Marketplace_GetCollectibleHighestListing_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GetCollectibleHighestListing_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GetCollectibleHighestListing_Response + 4XX: description: Client error content: application/json: @@ -2423,7 +2510,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2437,7 +2524,7 @@ paths: post: summary: ListCollectibleListings deprecated: true - description: "This endpoint is deprecated. Please use ListListingsForCollectible()" + description: This endpoint is deprecated. Please use ListListingsForCollectible() requestBody: content: application/json: @@ -2449,8 +2536,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectibleListings_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListCollectibleListings_Response + 4XX: description: Client error content: application/json: @@ -2474,7 +2562,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2488,7 +2576,7 @@ paths: post: summary: ListCollectibleOffers deprecated: true - description: "This endpoint is deprecated. Please use ListOffersForCollectible()" + description: This endpoint is deprecated. Please use ListOffersForCollectible() requestBody: content: application/json: @@ -2500,8 +2588,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectibleOffers_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListCollectibleOffers_Response + 4XX: description: Client error content: application/json: @@ -2525,7 +2614,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2538,20 +2627,40 @@ paths: /rpc/Marketplace/GenerateBuyTransaction: post: summary: GenerateBuyTransaction - description: "checkout process" + description: checkout process requestBody: content: application/json: schema: $ref: '#/components/schemas/Marketplace_GenerateBuyTransaction_Request' + example: + collectionAddress: '0x44b3f42e2bf34f62868ff9e9dab7c2f807ba97cb' + buyer: '0xD2eFbb2f18bfE3D265b26D2ACe83400A65335a07' + marketplace: magic_eden + ordersData: + - orderId: >- + 0xdb10541c97abdf95eaf55e77b619c58ed06d6b14469131badc657dabb2a823f0 + quantity: '18' + walletType: sequence responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateBuyTransaction_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GenerateBuyTransaction_Response + example: + steps: + - id: tokenApproval + data: >- + 0xe7acab24000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000006c00000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000d2efbb2f18bfe3d265b26d2ace83400a65335a0700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000004cefda7eb55d6f7dd913032d4ee88ac5609594380000000000000000000000002d1a340cd83434243d090931afabf95b7d3078b00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000066fe1db4000000000000000000000000000000000000000000000000000000006726fc7000000000000000000000000000000000000000000000000000000000000000000e1c0c381d4da48b0000000000000000d467a7aec379c278c0ddc9a86b559e5a87328c9043e7bf343695554eaaf5a8892f7205e300000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000044b3f42e2bf34f62868ff9e9dab7c2f807ba97cb0000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d3751fe908000000000000000000000000000000000000000000000000000000d3751fe9080000000000000000000000000004cefda7eb55d6f7dd913032d4ee88ac5609594380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b5e620f480000000000000000000000000000000000000000000000000000000b5e620f4800000000000000000000000000099f1117f13e072b299942037e6a5d1469912b47a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048c273950000000000000000000000000000000000000000000000000000000048c2739500000000000000000000000000006fa303e72bed54f515a513496f922bc331e2f27e00000000000000000000000000000000000000000000000000000000000000413cc3ca6b43ab8b01102879bf64a0311a4d92a6727904c2f29a475bf163d77f3900e2fea71f1b616059f353a17e39ccc6c65b289c52aeb971bc0b2dea67d0380c1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000006707e6368b5bfbd9116608291be1bb6c97bb58d16839d624521f85dd1c8a09368e7d4c7d5d8ce5d60813788e5f08aae22963c5af59a51f087b98ff8a5181cba8ab8278e300c3d56aceec35c08a9a2ed624c39a99054544aa5ccdaba5b2792fce5025476b31000000000000000000000000000000000000000000000000000000000000000000001d4da48b00000000 + to: '0x0000000000000068F116a894984e2DB1123eB395' + value: '0x038d7ea4c68000' + signature: null + post: null + executeType: null + 4XX: description: Client error content: application/json: @@ -2575,7 +2684,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2599,8 +2708,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateSellTransaction_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GenerateSellTransaction_Response + 4XX: description: Client error content: application/json: @@ -2624,7 +2734,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2641,15 +2751,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateListingTransaction_Request' + $ref: >- + #/components/schemas/Marketplace_GenerateListingTransaction_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateListingTransaction_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GenerateListingTransaction_Response + 4XX: description: Client error content: application/json: @@ -2673,7 +2785,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2690,15 +2802,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateOfferTransaction_Request' + $ref: >- + #/components/schemas/Marketplace_GenerateOfferTransaction_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_GenerateOfferTransaction_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_GenerateOfferTransaction_Response + 4XX: description: Client error content: application/json: @@ -2722,7 +2836,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2735,7 +2849,9 @@ paths: /rpc/Marketplace/Execute: post: summary: Execute - description: "only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market" + description: >- + only used in a case of external transactions ( when we create off-chain + transactions ) for instance opensea market requestBody: content: application/json: @@ -2748,7 +2864,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_Execute_Response' - '4XX': + 4XX: description: Client error content: application/json: @@ -2772,7 +2888,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2797,7 +2913,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_ListCollectibles_Response' - '4XX': + 4XX: description: Client error content: application/json: @@ -2821,7 +2937,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2846,7 +2962,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_GetFloorOrder_Response' - '4XX': + 4XX: description: Client error content: application/json: @@ -2870,7 +2986,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2884,20 +3000,22 @@ paths: post: summary: ListCollectiblesWithLowestListing deprecated: true - description: "Deprecated use ListCollectibles() with OrderSide = Listing" + description: Deprecated use ListCollectibles() with OrderSide = Listing requestBody: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectiblesWithLowestListing_Request' + $ref: >- + #/components/schemas/Marketplace_ListCollectiblesWithLowestListing_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectiblesWithLowestListing_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListCollectiblesWithLowestListing_Response + 4XX: description: Client error content: application/json: @@ -2921,7 +3039,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2935,20 +3053,22 @@ paths: post: summary: ListCollectiblesWithHighestOffer deprecated: true - description: "Deprecated use ListCollectibles() with OrderSide = Offer" + description: Deprecated use ListCollectibles() with OrderSide = Offer requestBody: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectiblesWithHighestOffer_Request' + $ref: >- + #/components/schemas/Marketplace_ListCollectiblesWithHighestOffer_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_ListCollectiblesWithHighestOffer_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_ListCollectiblesWithHighestOffer_Response + 4XX: description: Client error content: application/json: @@ -2972,7 +3092,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -2997,7 +3117,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Marketplace_GetOrders_Response' - '4XX': + 4XX: description: Client error content: application/json: @@ -3021,7 +3141,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -3038,15 +3158,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_CheckoutOptionsMarketplace_Request' + $ref: >- + #/components/schemas/Marketplace_CheckoutOptionsMarketplace_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_CheckoutOptionsMarketplace_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_CheckoutOptionsMarketplace_Response + 4XX: description: Client error content: application/json: @@ -3070,7 +3192,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: @@ -3087,15 +3209,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Marketplace_CheckoutOptionsSalesContract_Request' + $ref: >- + #/components/schemas/Marketplace_CheckoutOptionsSalesContract_Request responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Marketplace_CheckoutOptionsSalesContract_Response' - '4XX': + $ref: >- + #/components/schemas/Marketplace_CheckoutOptionsSalesContract_Response + 4XX: description: Client error content: application/json: @@ -3119,7 +3243,7 @@ paths: - $ref: '#/components/schemas/ErrorProjectNotFound' - $ref: '#/components/schemas/ErrorInvalidTier' - $ref: '#/components/schemas/ErrorProjectLimitReached' - '5XX': + 5XX: description: Server error content: application/json: diff --git a/libs/example_merger.js b/libs/example_merger.js new file mode 100644 index 0000000000..020a17349f --- /dev/null +++ b/libs/example_merger.js @@ -0,0 +1,78 @@ +import * as fs from 'fs'; +import path from 'path'; +import * as yaml from 'js-yaml'; +import yargs from 'yargs' +import { hideBin } from 'yargs/helpers' + +const loadOpenAPIDocument = (filePath) => { + try { + const file = fs.readFileSync(filePath, 'utf8'); + return yaml.load(file); + } catch (error) { + console.error(`Error loading OpenAPI document from ${filePath}:`, error); + throw error; + } +}; + +const saveOpenAPIDocument = (filePath, document) => { + try { + const yamlStr = yaml.dump(document); + fs.writeFileSync(filePath, yamlStr, 'utf8'); + console.log('OpenAPI document updated with examples!'); + } catch (error) { + console.error(`Error saving OpenAPI document to ${filePath}:`, error); + throw error; + } +}; + +const addExamplesToOpenAPI = (doc, examples) => { + for (let [endpoint, value] of Object.entries(examples)) { + const path = doc.paths[endpoint]; + + if (path) { + if (value["request"] && Object.keys(value["request"]).length > 0) { + const response = path.post.requestBody; + response.content['application/json']['example'] = value["request"]; + } + + if (value["response"] && Object.keys(value["response"]).length > 0) { + const response = path.post.responses['200']; + response.content['application/json']['example'] = value["response"]; + } + } else { + console.error("non existent endpoint", endpoint) + } + } +}; + +export const merge = (openApiFilepath) => { + // /docs/pages/api/marketplace/marketplace.gen.yaml + let openAPIDoc = loadOpenAPIDocument(openApiFilepath); + + const dir = path.dirname(openApiFilepath); + + // expect to live inside same directory as generated openapi + // /docs/pages/api/marketplace/examples.json + const examplesPath = path.join(dir, 'examples.json'); + + // do nothing if examples.json file does not exist + if (fs.existsSync(examplesPath)) { + const reqResponseExamples = JSON.parse(fs.readFileSync(examplesPath).toString()); + + addExamplesToOpenAPI(openAPIDoc, reqResponseExamples); + + saveOpenAPIDocument(openApiFilepath, openAPIDoc); + } else { + console.log(examplesPath, "does not exist") + } +}; + +yargs(hideBin(process.argv)) + .command('merge ', 'merge request/response examples with generated openapi document', () => {}, (argv) => { + argv.input.forEach((filePath) => { + merge(filePath) + console.log(filePath, "updated") + }) + }) + .demandCommand(1) + .parse() diff --git a/package.json b/package.json index 86069e702f..0e31a1f4e3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,9 @@ "clsx": "^2.1.0", "core-js": "^3.36.1", "ethers": "6.13.0", + "js-yaml": "^4.1.0", "lucide-react": "^0.447.0", + "openapi3-ts": "^4.4.0", "react": "latest", "react-dom": "^18.2.0", "react-syntax-highlighter": "^15.5.0", @@ -34,7 +36,8 @@ "swagger-ui-react": "^5.15.0", "tailwind-merge": "^2.5.2", "typescript": "latest", - "vocs": "https://github.com/0xsequence/vocs#build" + "vocs": "https://github.com/0xsequence/vocs#build", + "yargs": "^17.7.2" }, "packageManager": "pnpm@9.1.4", "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8acd0d0413..8534b4012d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,9 +47,15 @@ importers: ethers: specifier: 6.13.0 version: 6.13.0 + js-yaml: + specifier: ^4.1.0 + version: 4.1.0 lucide-react: specifier: ^0.447.0 version: 0.447.0(react@18.3.1) + openapi3-ts: + specifier: ^4.4.0 + version: 4.4.0 react: specifier: latest version: 18.3.1 @@ -83,6 +89,9 @@ importers: vocs: specifier: https://github.com/0xsequence/vocs#build version: https://codeload.github.com/0xsequence/vocs/tar.gz/ffaeb295c4fcf7867145c1938516cf3f917cf7d6(@types/node@20.14.9)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.18.0)(typescript@5.5.3) + yargs: + specifier: ^17.7.2 + version: 17.7.2 devDependencies: '@types/react-syntax-highlighter': specifier: ^15.5.13 @@ -3095,6 +3104,9 @@ packages: resolution: {integrity: sha512-dtyTFKx2xVcO0W8JKaluXIHC9l/MLjHeflBaWjiWNMCHp/TBs9dEjQDbj/VFlHR4omFOKjjmqm1pW1aCAhmPBg==} engines: {node: '>=12.20.0'} + openapi3-ts@4.4.0: + resolution: {integrity: sha512-9asTNB9IkKEzWMcHmVZE7Ts3kC9G7AFHfs8i7caD8HbI76gEjdkId4z/AkP83xdZsH7PLAnnbl47qZkXuxpArw==} + ora@7.0.1: resolution: {integrity: sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==} engines: {node: '>=16'} @@ -4185,6 +4197,11 @@ packages: engines: {node: '>= 14'} hasBin: true + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -7990,6 +8007,10 @@ snapshots: dependencies: apg-lite: 1.0.4 + openapi3-ts@4.4.0: + dependencies: + yaml: 2.5.1 + ora@7.0.1: dependencies: chalk: 5.3.0 @@ -9416,6 +9437,8 @@ snapshots: yaml@2.4.5: {} + yaml@2.5.1: {} + yargs-parser@21.1.1: {} yargs@17.7.2: