raml-typesystem

WebJar for raml-typesystem

Лицензия

Лицензия

Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

raml-typesystem
Последняя версия

Последняя версия

0.0.86
Дата

Дата

Тип

Тип

jar
Описание

Описание

raml-typesystem
WebJar for raml-typesystem
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/raml-org/raml-typesystem

Скачать raml-typesystem

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/raml-typesystem/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>raml-typesystem</artifactId>
    <version>0.0.86</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/raml-typesystem/
implementation 'org.webjars.npm:raml-typesystem:0.0.86'
// https://jarcasting.com/artifacts/org.webjars.npm/raml-typesystem/
implementation ("org.webjars.npm:raml-typesystem:0.0.86")
'org.webjars.npm:raml-typesystem:jar:0.0.86'
<dependency org="org.webjars.npm" name="raml-typesystem" rev="0.0.86">
  <artifact name="raml-typesystem" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='raml-typesystem', version='0.0.86')
)
libraryDependencies += "org.webjars.npm" % "raml-typesystem" % "0.0.86"
[org.webjars.npm/raml-typesystem "0.0.86"]

Зависимости

compile (11)

Идентификатор библиотеки Тип Версия
org.webjars.npm » json-schema-compatibility jar [1.1.0]
org.webjars.npm : xml2js jar [0.4.19]
org.webjars.npm : bignumber.js jar [4.1.0]
org.webjars.npm : escape-html jar [1.0.3]
org.webjars.npm : lrucache jar [1.0.3]
org.webjars.npm : json-to-ast jar [2.0.0-alpha1.3]
org.webjars.npm : xmldom jar [0.1.27]
org.webjars.npm : underscore jar [1.8.3]
org.webjars.npm : date-and-time jar [0.5.0]
org.webjars.npm » raml-xml-validation Необязательный jar [0.0.14]
org.webjars.npm » raml-json-validation Необязательный jar [0.0.16]

Модули Проекта

Данный проект не имеет модулей.

RAML Data Type System

Build Status Greenkeeper badge

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.

Installation

npm install raml-typesystem --save

Usage

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})

Contribute

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:

  1. Check for open issues or open a fresh issue to start a discussion around an idea or a bug.
  2. Fork the repository on Github and make your changes on the develop branch (or branch off of it).
  3. Send a pull request (with the develop branch as the target).
  4. One of the main contributor or admin will review the PR and merge.

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

org.webjars.npm

RAML

The simplest way to model APIs

Версии библиотеки

Версия
0.0.86