Skip to content

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.

License

Notifications You must be signed in to change notification settings

mehdijouan/springmvc-raml-plugin

 
 

Repository files navigation

PhoenixNAP Logo

Spring MVC-RAML Synchronizer Build Status Apache License 2 Maven Central

The Spring MVC-RAML Sychronizer parent project aims to provide a live representation of the endpoints exposed in a project by using the Spring MVC Annotation in that project as the single source of truth. This can be used to either:

  1. Generate RAML code from Spring annotations
  2. Keep hand-written RAML files in sync with the Spring MVC implementation by cross-checking the contract with the implementation
  3. Generate SpringMVC Rest Controller Endpoints from a RAML file

When generating RAML, the project will extract information using reflection and source inspection (for JavaDoc) so as to expose all information available to it.

The project provides three artifacts:

  • springmvc-raml-plugin: A maven plugin designed to be run on Java 8 code which has been compiled with argument name information.
  • springmvc-raml-parser: This is a seperate project that contains the parser which converts Spring MVC annotations to a RAML Model
  • springmvc-raml-annotations: This project allows the use of custom annotations such as @Example which can be used to embed example inputs or outputs.

Sample Project

A sample project that includes a SpringMVC Server implementation using the Decorator pattern as well as a RestTemplate based REST client is available here: SpringMVC RAML Contract First Sample. This sample is based on the contract first scenario whereby the RAML document is authored and used as the basis for implementation

Documentation & Getting Support

Usage and documentation are available in the Javadoc and README.md of the child projects. Kindly contact the developers via email (available in the pom files) if required or open an Issue in our tracking system.

Building from Source

The SpringMVC-RAML plugin uses a Maven-based build system.

Prerequisites

Git and JDK 8 update 20 or later

Be sure that your JAVA_HOME environment variable points to the jdk1.8.0 folder extracted from the JDK download.

License

The SpringMVC-RAML plugin is released under version 2.0 of the Apache License.

Contributing

Pull requests are welcome; Be a good citizen and create unit tests for any bugs squished or features added

About

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 93.8%
  • RAML 6.2%