Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
raml-typesystem-test
Advanced tools
[![Build Status](https://travis-ci.org/raml-org/raml-typesystem.svg?branch=master)](https://travis-ci.org/raml-org/raml-typesystem)
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)
The npm package raml-typesystem-test receives a total of 3 weekly downloads. As such, raml-typesystem-test popularity was classified as not popular.
We found that raml-typesystem-test 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.