
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@stoplight/json-schema-sampler
Advanced tools
Tool for generation samples based on JSON Schema Draft 7
It's a fork of openapi-sampler by Redocly, with focus on supporting JSON Schema Draft 7.
Tool for generation samples based on JSON Schema Draft 7.
allOf, oneOf, anyOf, if/then/elseadditionalPropertiesdefault, const, enum and examples where possiblecontains, minItems, maxItems, and tuples (items as an array)minLength, maxLength, min, max, exclusiveMinimum, exclusiveMaximumstring formats:
$ref resolvingInstall using npm
npm install @stoplight/json-schema-sampler --save
or using yarn
yarn add @stoplight/json-schema-sampler
Then require it in your code:
const JSONSchemaSampler = require('@stoplight/json-schema-sampler');
JSONSchemaSampler.sample(schema, [options], [spec])object
A JSON Schema Draft 7 document.object
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 messagesnumber
Max depth sampler should traverseschema passed is only a portion of the whole schema and $refs aren't resected. doc must not contain any external referencesconst JSONSchemaSampler = require('@stoplight/json-schema-sampler');
JSONSchemaSampler.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' }
[0.3.0]
SchemaSizeExceededError to handle when an example response can't be generated because it's too largeFAQs
Tool for generation samples based on JSON Schema Draft 7
The npm package @stoplight/json-schema-sampler receives a total of 140,462 weekly downloads. As such, @stoplight/json-schema-sampler popularity was classified as popular.
We found that @stoplight/json-schema-sampler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 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
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.