Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
assemble-json-schemas
Advanced tools
If you're building a repo with your JSON schemas, and want automatic creation of TypeScript interfaces (as well as the schemas as objects), this package is probably for you.
The easiest way to use this, is to add a scripts
entry in your package.json
, which runs node_modules/.bin/ajs schema-dir out-file
. The schema-dir
should point to a directory (which could have sub-directories) where the json schemas are located, and out-file
is a base file name (without extension) which will be generated. The generated files will be out-file.js
, out-file.ts
and out-file.d.ts
. If the out-file
is left blank, it will default to index
in the current working directory and if set to the name of an existing directory, /index
will be appended automatically.
Let's say you put your schemas in a schemas/
directory, and you want to automatically have index.ts
, index.js
and index.d.ts
created for you, the command will be node_modules/.bin/ajs schemas
.
The following is an example of how to use assemble-json-schemas
given a directory of schemas, and an output file (to which .js
, .ts
and .d.ts
will be appended):
import { assemble } from 'assemble-json-schemas'
assemble( __dirname + "/schemas", __dirname + "/index" )
.catch( err => console.error( err ) );
FAQs
Assemble JSON Schemas into TypeScript and JavaScript
We found that assemble-json-schemas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.