Blog

ColdBox Relax v3.0 Released

Jon Clausen April 11, 2017

Spread the word

Jon Clausen

April 11, 2017

Spread the word


Share your thoughts

Coldbox Relax LogoColdBox Relax Moldule v3.0 has been officially released, which includes native support for the OpenAPI/Swagger specification, in addition to a variety of feature upgrades and enhancements.

Version 3.0 makes the OpenAPI/Swagger specification the default documentation format for describing your APIs, while deprecating the Relax programmatic DSL ( scheduled EOL is v4.0 ). In addition, the release includes a complete overhaul of the user interface and Relax API Test Tool, to provide users with a seamless experience for documenting, viewing, testing and exporting in a variety of formats.

The OpenAPI specification offers a convenient and portable way to describe your API, its requirements, parameters, and data conventions. You may also choose to use this to describe your API in the form of HTTP OPTIONS responses to fulfill CORS requirements or to allow rich hypermedia documentation for your consumers.

What can you do with Relax?

  • Define your ReSTful services via the OpenAPI/Swagger JSON syntax
  • Use the "Relaxer" API Test tool to test your RESTful web service enpoints
  • Use the "Relaxer" API Test too to test against ANY RESTful service
  • Keep a history of your latest Relaxed test requests so you can rebuild your request and test again
  • Programmatic DSL for configuration of your RESTful services (Deprecated as of v2.3)

Relax also allows you to import an OpenAPI/Swagger JSON specification in to your defined apiResources directory, export normalized schema (JSON) for other services and also four export formats:

  • HTML
  • PDF
  • WikiText
  • TRAC Format

Markdown export is also planned for an upcoming minor release.

By convention, Relax looks for supported formats in the following order (note that the top-level file shares the name of the parent directory):

  1. myResourceDirectory/myapi/myapi.json - JSON OpenAPI schema
  2. myResourceDirectory/myapi/myapi.yaml - YAML OpenAPI schema
  3. myResourceDirectory/myapi/Relax.cfc - Relax programmatic DSL (deprecated)

To install Relax, use CommandBox:

box install relax

Relax comes with three example API's which are configured by default:

  • Swagger Petstore - The swagger Petstore API example, which is described using the OpenAPI/Swagger specification
  • Forgebox API - Version 2 of the Forgebox API, which is described through the, now-deprecated, RelaxDSL specification.
  • MyAPI - Another example, using the RelaxDSL specification.

Both Forgebox and MyAPI may be exported from within the interface in to a normalized Swagger JSON schema, while the Petstore example provides and complete example of using a nested file structure to contain different parts of your API documentation.

If you'd like to play with Relax, here are a few lines of script, which will create an app skeleton, install the module, and start a server. Simply navigate to the /relax path, once your browser opens, to view the new changes.

mkdir relaxtest && cd relaxtest
box coldbox create app name=relaxTest
box install relax
box server start --rewritesEnable

or from within the CommandBox shell:

mkdir relaxtest --cd
coldbox create app name=relaxTest
install relax
server start --rewritesEnable

For additional information on relax, including installation and advanced configuration, view the official documentation here.

Add Your Comment

Recent Entries

BoxLang 1.0.0 Beta 7 Launched

BoxLang 1.0.0 Beta 7 Launched

We are pleased to announce the release of BoxLang 1.0.0-Beta 7! This latest beta version includes improvements and essential bug fixes, but more importantly it certifies the execution of ColdBox HMVC and TestBox.

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different progr

Luis Majano
Luis Majano
July 26, 2024
New BoxLang Feature: Java Method References and Higher-Order Functions

New BoxLang Feature: Java Method References and Higher-Order Functions

We’ve added more goodies to our BoxLang Java interop: method references and higher-order functions. CFML has never let you do these things, making Java Interop feel like a second-class citizen. But with BoxLang, we’re elevating Java integration to a new level.

Maria Jose Herrera
Maria Jose Herrera
July 26, 2024
Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Are you a CFML developer looking to take your skills to the next level? Look no further than the ColdBox from Zero to Hero Virtual Live Training! This intensive two-day course will equip you with the knowledge and expertise to build robust and scalable applications using ColdBox 7, the latest version of the most popular CFML MVC framework.

What You'll Learn:

  • Master the Fun...

Cristobal Escobar
Cristobal Escobar
July 24, 2024