
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@har-sdk/validator
Advanced tools
A validator for HAR v1.2 Spec, OpenAPI and Postman documents.
npm i --save @har-sdk/validator
import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, ErrorHumanizer } from '@har-sdk/validator';
const apiDoc = {
swagger: '2.0',
host: 'localhost',
info: {
title: 'Some valid API document'
},
paths: {}
} as OpenAPIV2.Document;
const errors = await new OASValidator().verify(apiDoc as any);
console.log(errors);
// [
// {
// "instancePath": "/info",
// "schemaPath": "#/required",
// "keyword": "required",
// "params": {
// "missingProperty": "version"
// },
// "message": "must have required property 'version'"
// }
// ]
const humanizedErrors = await new ErrorHumanizer().humanizeErrors(errors);
console.log(humanizedErrors);
// [
// {
// "originalError": {
// "instancePath": "/info",
// "schemaPath": "#/required",
// "keyword": "required",
// "params": {
// "missingProperty": "version"
// },
// "message": "must have required property 'version'"
// },
// "message": "the value at /info is missing the required field `version`",
// "messageParts": [
// {
// "text": "the value at /info",
// "jsonPointer": "/info"
// },
// {
// "text": "is missing the required field `version`"
// }
// ]
// }
// ]
See Error Object
FAQs
A validator for HAR v1.2 Spec, OpenAPI and Postman documents.
The npm package @har-sdk/validator receives a total of 201 weekly downloads. As such, @har-sdk/validator popularity was classified as not popular.
We found that @har-sdk/validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.