{"id":48272,"library":"json-schema-fast-check","title":"json-schema-fast-check","description":"Generate fast-check arbitraries from JSON Schema for property-based testing. Version 0.0.6, early stage development with limited schema support (subset of JSON Schema). Differentiates by directly integrating JSON Schema with fast-check, enabling property-based tests that automatically generate valid inputs based on schema definitions. Supports faker-js sugar for realistic data. Not production-ready; many JSON Schema features missing (minProperties, if/then/else, oneOf, dependencies as objects).","status":"active","version":"0.0.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install json-schema-fast-check","lang":"bash","label":"npm"},{"cmd":"yarn add json-schema-fast-check","lang":"bash","label":"yarn"},{"cmd":"pnpm add json-schema-fast-check","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for property-based testing arbitraries","package":"fast-check","optional":false}],"imports":[{"note":"Default export is the main function. ESM-only.","wrong":"const jsfc = require('json-schema-fast-check')","symbol":"default","correct":"import jsfc from 'json-schema-fast-check'"},{"note":"Named export for single generation. Can also be imported as a property of default.","wrong":"","symbol":"generate","correct":"import { generate } from 'json-schema-fast-check'"},{"note":"Separate package required. fc is default export from fast-check.","wrong":"import { fc } from 'fast-check'","symbol":"fc","correct":"import fc from 'fast-check'"}],"quickstart":{"code":"import jsfc from 'json-schema-fast-check';\nimport fc from 'fast-check';\n\nconst schema = {\n  type: 'object',\n  properties: {\n    name: { type: 'string' },\n    age: { type: 'integer', minimum: 0 }\n  },\n  required: ['name']\n};\n\nfc.assert(\n  fc.property(jsfc(schema), (obj: any) => {\n    return typeof obj.name === 'string' && (obj.age === undefined || obj.age >= 0);\n  })\n);","lang":"typescript","description":"Property-based test that validates all generated objects from schema satisfy constraints."},"warnings":[{"fix":"Avoid using unimplemented schema constructs or use alternative library like json-schema-faker or quicktype.","message":"Schema features like minProperties, if/then/else, oneOf are not implemented.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Import default as jsfc or any other name: import YourName from 'json-schema-fast-check'.","message":"Default export name is arbitrary; import as any name you want.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Only use array-style dependencies.","message":"Schema with dependencies as objects not supported.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'0.0.6':20 'arbitrari':10 'automat':48 'base':17,45,52 'check':5,9,41 'data':63 'definit':55 'depend':76 'develop':23 'differenti':32 'direct':34 'earli':21 'enabl':42 'faker':58 'faker-j':57 'fast':4,8,40 'fast-check':7,39 'featur':71 'generat':6,49 'if/then/else':74 'input':51 'integr':35 'javascript':79 'js':59 'json':2,12,30,36,69 'json-schema-fast-check':1 'limit':25 'mani':68 'minproperti':73 'miss':72 'object':78 'oneof':75 'product':66 'production-readi':65 'properti':16,44 'property-bas':15,43 'readi':67 'realist':62 'schema':3,13,26,31,37,54,70 'stage':22 'subset':28 'sugar':60 'support':27,56 'test':18,46 'valid':50 'version':19","created_at":"2026-06-07T16:55:46.581641+00:00","updated_at":"2026-06-07T16:55:46.581641+00:00","problems":[{"fix":"Use import jsfc from 'json-schema-fast-check' not import { jsfc } from 'json-schema-fast-check'","cause":"Using default import with wrong syntax (e.g., { jsfc })","error":"TypeError: jsfc is not a function"},{"fix":"Add import fc from 'fast-check'","cause":"Forgot to import fast-check","error":"ReferenceError: fc is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"json-schema-fast-check","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}