Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-doc-validator

Package Overview
Dependencies
Maintainers
0
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-doc-validator - npm Package Compare versions

Comparing version 2.27.0 to 2.28.0

35

cli.js

@@ -122,7 +122,3 @@ #!/usr/bin/env node

const defaultSchemas = {};
for (const path of defaultSchemasPaths) {
Object.assign(defaultSchemas, require(path));
}

@@ -143,10 +139,29 @@ let files = getFiles(config.include);

if (typeof config.extraProps === 'boolean') {
getProp(defaultSchemas.object, 'additionalProperties').value.value = config.extraProps;
}
Promise.all(
defaultSchemasPaths.map(path => {
let schema = require(path);
const cache = {...defaultSchemas};
if (typeof schema === 'function') {
schema = schema();
}
filesToEndpoints(files, {...config, schemas: cache})
.then(function (endpoints) {
return schema;
})
)
.then(async function (schemasList) {
const defaultSchemas = {};
for (const schema of schemasList) {
Object.assign(defaultSchemas, schema);
}
if (typeof config.extraProps === 'boolean') {
getProp(defaultSchemas.object, 'additionalProperties').value.value = config.extraProps;
}
const cache = {...defaultSchemas};
let endpoints = await filesToEndpoints(files, {...config, schemas: cache});
if (config.namespace) {

@@ -153,0 +168,0 @@ let namespaces = config.namespace.reduce(function (hash, name) {

{
"name": "api-doc-validator",
"version": "2.27.0",
"version": "2.28.0",
"description": "api doc and validator",

@@ -5,0 +5,0 @@ "main": "index.js",

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