An open API service indexing awesome lists of open source software.

https://github.com/commercetools/rest-modeling-framework

The rest modeling framework provides an EMF based model for RAML api definition files.
https://github.com/commercetools/rest-modeling-framework

audit-sdk

Last synced: about 1 year ago
JSON representation

The rest modeling framework provides an EMF based model for RAML api definition files.

Awesome Lists containing this project

README

          

The rest modeling framework provides an EMF based model for RAML api definition files.

### Using in your own project

The latest unstable release can be retrieved from [Maven](https://search.maven.org/artifact/com.commercetools.rmf/rest-modeling-framework) with:
```gradle
ext {
rmfVersion = "0.2.0-20240722205528"
}

sourceCompatibility = 1.8

dependencies {
compile "com.commercetools.rmf:raml-model:${rmfVersion}"
}
```

The main entry point is the `io.vrap.rmf.raml.model.RamlModelBuilder` class, see the following code for an example on how to use it:

```java
final URI fileURI = URI.createFileURI("/path/api.raml");
final RamlModelResult modelResult = new RamlModelBuilder().buildApi(fileURI);
final List validationResults = modelResult.getValidationResults();

if (validationResults.isEmpty()) {
final Api api = modelResult.getRootObject();
}
```

### Docker

To start the RMF generator using docker use the following command

```
docker run --rm -v:/api -v:/out vrapio/rmf-generator -l postman /api/update-actions.raml
```