New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blockfrost/openapi

Package Overview
Dependencies
Maintainers
3
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockfrost/openapi - npm Package Compare versions

Comparing version 0.1.45-beta.1 to 0.1.45-beta.2

lib/functions/custom-schemas/asset.d.ts

150

lib/functions/get-schema-for-endpoint.js

@@ -9,2 +9,7 @@ "use strict";

const yaml_1 = __importDefault(require("yaml"));
const asset_1 = __importDefault(require("./custom-schemas/asset"));
const nutlink_address_tickers_1 = __importDefault(require("./custom-schemas/nutlink-address-tickers"));
const nutlink_ticker_1 = __importDefault(require("./custom-schemas/nutlink-ticker"));
const scripts_json_1 = __importDefault(require("./custom-schemas/scripts-json"));
const txs_metadata_1 = __importDefault(require("./custom-schemas/txs-metadata"));
const file = fs_1.default.readFileSync(path_1.default.resolve(__dirname, '../../openapi.yaml'), 'utf8');

@@ -86,147 +91,18 @@ const spec = yaml_1.default.parse(file);

}
// 1 bug -> edge case
// custom schemas
if (endpointName === '/txs/{hash}/metadata') {
responses.response[200] = {
type: 'array',
items: {
type: 'object',
properties: {
label: {
type: 'string',
},
json_metadata: {
// possible bug FIXME https://github.com/fastify/fast-json-stringify/issues/246
// oneOf: [
// {
// type: 'string',
// },
// {
// type: 'object',
// },
// ],
},
},
required: ['label', 'json_metadata'],
},
};
responses.response[200] = txs_metadata_1.default;
}
// 2 bug -> edge case
if (endpointName === '/nutlink/{address}/tickers/{ticker}') {
responses.response[200] = {
type: 'array',
items: {
type: 'object',
properties: {
tx_hash: {
type: 'string',
},
block_height: {
type: 'integer',
},
tx_index: {
type: 'integer',
},
payload: {
// possible bug FIXME https://github.com/fastify/fast-json-stringify/issues/246
// anyOf: [
// {
// type: 'string',
// },
// // {
// // type: 'object',
// // },
// {
// type: 'array',
// //items: {},
// additionalProperties: true,
// },
// {
// type: 'integer',
// },
// {
// type: 'number',
// },
// {
// type: 'boolean',
// },
// ],
//additionalProperties: true,
},
},
required: ['tx_hash', 'tx_index', 'block_height', 'payload'],
},
};
responses.response[200] = nutlink_address_tickers_1.default;
}
// 3 bug -> edge case
if (endpointName === '/nutlink/tickers/{ticker}') {
responses.response[200] = {
type: 'array',
items: {
type: 'object',
properties: {
address: {
type: 'string',
description: 'Address of a metadata oracle',
},
tx_hash: {
type: 'string',
description: 'Hash of the transaction',
},
block_height: {
type: 'integer',
description: 'Block height of the record',
},
tx_index: {
type: 'integer',
description: 'Transaction index within the block',
},
payload: {
// possible bug FIXME https://github.com/fastify/fast-json-stringify/issues/246
// anyOf: [
// {
// type: 'string',
// },
// // {
// // type: 'object',
// // },
// {
// type: 'array',
// //items: {},
// additionalProperties: true,
// },
// {
// type: 'integer',
// },
// {
// type: 'number',
// },
// {
// type: 'boolean',
// },
// ],
//additionalProperties: true,
},
},
required: [
'address',
'tx_hash',
'block_height',
'tx_index',
'payload',
],
},
};
responses.response[200] = nutlink_ticker_1.default;
}
// 4 bug -> edge case
if (endpointName === '/scripts/{script_hash}/json') {
responses.response[200] = {
type: 'object',
properties: {
json: {
nullable: true,
},
},
required: ['json'],
};
responses.response[200] = scripts_json_1.default;
}
if (endpointName === '/assets/{asset}') {
responses.response[200] = asset_1.default;
}
}

@@ -233,0 +109,0 @@ // errors and others

{
"name": "@blockfrost/openapi",
"version": "0.1.45-beta.1",
"version": "0.1.45-beta.2",
"description": "OpenAPI specifications for blockfrost.io",

@@ -5,0 +5,0 @@ "repository": "git@github.com:blockfrost/openapi.git",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc