Giter Club home page Giter Club logo

raml-java-parser's Introduction

RAML Java Parser

This project contains a RAML java parser compatible with version 0.8 of the RAML specification. The parser depends on SnakeYaml, a Java YAML parser.

Versioning

The Java RAML parser is versioned in the following manner:

x.y.z

in which x.y denotes the version of the RAML specification and z is the version of the parser.

So 0.1.2 is the 2nd revision of the parser for the 0.1 version of the RAML specification.

Build

JAR file without dependencies

mvn clean package

JAR file with dependencies

mvn clean package -P jar-with-dependencies

Run standalone validator

java -jar raml-parser-{version}.jar raml-file ...

Usage

Validation

The validator allows you to check whether a RAML resource is valid or not, and in the case is not valid it provides a List of validation results:

List<ValidationResult> results = RamlValidationService.createDefault().validate(ramlLocation);

Parsing

The parser returns a Raml object and can be invoked using a String with the RAML file location:

Raml raml = new RamlDocumentBuilder().build(ramlLocation);

Emitter

If you do any change to the Raml object model and you want to get the updated RAML descriptor you can use RamlEmitter class:

Raml raml = new RamlDocumentBuilder().build(ramlLocation);

// modify the raml object

RamlEmitter emitter = new RamlEmitter();
String dumpFromRaml = emitter.dump(raml);

raml-java-parser's People

Contributors

svacas avatar sebasampaoli avatar machaval avatar pose avatar 3miliano avatar pmbober avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.