
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@neuralegion/openapi-sampler
Advanced tools
Tool for generation samples based on OpenAPI payload/response schema
THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk
Tool for generation samples based on OpenAPI payload/response schema
allOfadditionalPropertiesdefault, const, enum and examples where possibleminItems, and tuples (items as an array)minLength, maxLength, min, max, exclusiveMinimum, exclusiveMaximumstring formats:
$ref resolvingInstall using npm
npm install @neuralegion/openapi-sampler --save
or using yarn
yarn add @neuralegion/openapi-sampler
Then require it in your code:
var OpenAPISampler = require('@neuralegion/openapi-sampler');
OpenAPISampler.sample(schema, [options], [spec])object
A OpenAPI Schema Objectobject
Available options:
boolean
Don't include non-required object properties not specified in required property of the schema objectboolean
Don't include readOnly object propertiesboolean
Don't include writeOnly object propertiesboolean
Don't log console warning messages$ref. spec must not contain any external referencesconst OpenAPISampler = require('.');
OpenAPISampler.sample({
type: 'object',
properties: {
a: {type: 'integer', minimum: 10},
b: {type: 'string', format: 'password', minLength: 10},
c: {type: 'boolean', readOnly: true}
}
}, {skipReadOnly: true});
// { a: 10, b: 'pa$$word_q' }
FAQs
Tool for generation samples based on OpenAPI payload/response schema
We found that @neuralegion/openapi-sampler demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.