Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
raml-typesystem
Advanced tools
[![Build Status](https://travis-ci.org/raml-org/raml-typesystem.svg?branch=master)](https://travis-ci.org/raml-org/raml-typesystem) [![Greenkeeper badge](https://badges.greenkeeper.io/raml-org/raml-typesystem.svg)](https://greenkeeper.io/)
This module contains a lightweight implementation of the type system that was introduced with RAML 1.0.
It allows you to to parse, validate , modify RAML types, as well as store them back to JSON.
npm install raml-typesystem --save
Parsing and validating a single type:
import ts = require("raml-typesystem")
var personType = ts.loadType( {
type: "string[]",
minItems:3,
maxItems:2
})
var isValid = personType.validateType();
Parsing and validating a types
collection:
import ts = require("raml-typesystem")
var typeCollection = ts.loadTypeCollection({
types: {
Person: {
type: "object",
properties:{
kind: "string"
}
},
Man: {
type: "Person",
discriminator: "kind"
}
}
})
var isValid = typeCollection.getType("Person").validateType()
Validating object against type:
import ts = require("raml-typesystem")
var typeCollection = ts.loadTypeCollection({
types: {
Person: {
type: "object",
properties:{
kind: "string"
}
},
Man: {
type: "Person",
discriminator: "kind"
}
}
})
var isValid = typeCollection.getType("Person").validate({dd: true})
The raml-typesystem repo is an open source project and any contribution is always welcome. Please follow these simple steps when contributing to this project:
A big thank you goes out to everyone who helped with the project, the contributors and everyone who took the time to report issues and give feedback.
You can also directly get in touch with us. Simply send us an email to: info@raml.org
FAQs
[![Build Status](https://travis-ci.org/raml-org/raml-typesystem.svg?branch=master)](https://travis-ci.org/raml-org/raml-typesystem) [![Greenkeeper badge](https://badges.greenkeeper.io/raml-org/raml-typesystem.svg)](https://greenkeeper.io/)
The npm package raml-typesystem receives a total of 10,730 weekly downloads. As such, raml-typesystem popularity was classified as popular.
We found that raml-typesystem 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.