Giter VIP home page Giter VIP logo

raml-java-parser's Introduction

RAML Java Parser

Gitter Maven Central

This is a Java implementation of a RAML parser for versions 1.0 and 0.8. The parser depends on SnakeYaml, a Java YAML parser.

The old version that only support RAML 0.8 is still available here.

See http://raml.org for more information about RAML.

Maven

  <dependency>
    <groupId>org.raml</groupId>
    <artifactId>raml-parser-2</artifactId>
    <version>${raml-parser-version}</version>
  </dependency>

Development version

SNAPSHOT versions are NOT synchronized to Central. If you want to use a snapshot version you need to add the https://repository.mulesoft.org/nexus/content/repositories/snapshots/ repository to your pom.xml.

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-2-{version}.jar raml-file ...

Raml Java Parser JVM Arguments

In order to provide more flexibility, users can set different system properties when parsing different RAML files. Here we list all the system properties you can use right now:

Argument Description Default Value
yagi.json_duplicate_keys_detection Setting it to true will make the parser fail if any JSON example contains duplicated keys true
raml.json_schema.fail_on_warning Setting it to true will make the parser fail if any example validated against a particular Json Schema throws a warning message false

Usage

RamlModelResult ramlModelResult = new RamlModelBuilder().buildApi(input);
if (ramlModelResult.hasErrors())
{
    for (ValidationResult validationResult : ramlModelResult.getValidationResults())
    {
        System.out.println(validationResult.getMessage());
    }
}
else
{
    Api api = ramlModelResult.getApiV10();

}

Contribution guidelines

Contributor’s Agreement

To contribute source code to this repository, please read our contributor's agreement, and then execute it by running this notebook and following the instructions: https://api-notebook.anypoint.mulesoft.com/notebooks/#380297ed0e474010ff43

Pull requests are always welcome

We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.

If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve.

Create issues...

Any significant improvement should be documented as a GitHub issue before anybody starts working on it.

...but check for existing issues first!

Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to thumb up the original post or add "I have this problem too". This will help prioritize the most common problems and requests.

Merge approval

The maintainers will review your pull request and, if approved, will merge into the main repo. Commits get approval based on the conventions outlined in the previous section. For example, new features without additional tests will be not approved.

raml-java-parser's People

Contributors

aamura avatar angelbarrera92 avatar dahlej avatar dfmacias avatar dlarralde avatar evangelina avatar fbarrios avatar fedeamdan avatar fededonna avatar jpbelang avatar julianesevich avatar lclement57 avatar lorenasoledad avatar machaval avatar martincousido avatar moliva avatar olegdokuka avatar pacafuentes avatar pmantellini avatar sichvoge avatar svacas 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.