ColdBox Relax Updates

Just a little note that the next version of ColdBox Relax will be released next week and we are sporting some great new features for modeling, developing, documenting and testing RESTful services. You can get the “development” branch here: https://github.com/coldbox/coldbox-relax

New Features:

  • Relax Logs search capabilities
  • Ability to define more than 1 API now in the resources folder
  • You can now switch loaded APIs so you can easily test/document between all your modeled APIs
  • Export your API definitions into a relaxed JSON format
  • Import APIs that are built in JSON
  • Yes you heard that right, you can either use a CFC approach for modeling your service or plain JSON
  • Generates module routing tables now a part form parent application routing
  • RelaxURL console now has the capability to auto fill out required parameters and headers for defined resources.
    Please give them a test, there are still a few details to sort out, but please test it out. The API JSON loading is still pending, but the export and import capabilities do work now. Just the JSOn loading is missing.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Sweet! Nice work Luis and team!

Nolan Dubeau

Load .,8,1

Luis,

LOVIN’ the new changes.

I do have a question.

When I select the ‘default’ myapi and choose /api/user/:username, it prefills the parameters perfectly but when I try to replicate this feature on my own api, the parameters & headers are not filled in. Any clue to why /api/user/:username fills in with the default api but my api call is not? oh and when I say prefills, I mean the RelaxURL is populated along with all the input boxes below, with the correct field names/headers and default values.

Here is my relax.cfc struct for this api call

{pattern="/2/login/validate",handler=“api.2.login”,actions=“validate”,

description=“Returns a Valid API Token for a specific user”,

methods=“PUT,POST”,headers=[],

parameters=[

{name=“email”,description=“The Email Address provided by the User”,required=true},

{name=“pasword”,description=“The Password provided by the User”,required=true}

],

placeholders=[

{name=“email”,description=“The Email Address provided by the User”,required=true,default="test@test.com’},

{name=“pasword”,description=“The Password provided by the User”,required=true,default=“password”}

]},


Jeremy R. DeYoung
Phone:615.261.8201

RantsFromAMadMan.com

Hmm, the only thing I can think of is that the required=true instead of required=“true”, maybe the JSON get’s confused.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

That was it. Fixed now, just in time for the release.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Luis,

one more request, can you add the ability to specify the UserAgent to the relax interface?

A lot of my APIs generate device specific responses for my mobile native apps and it would be nice to test those thru Relax.


Jeremy R. DeYoung
Phone:615.261.8201

RantsFromAMadMan.com

Agh good point. Would you like to submit a pull request?

Hi Luis,

Does the new version of relax require CB 3.5? I loaded it up today running 3.1 and got a strange error…something like cbstorage is undefined in session. I can send the full stack trace tomorrow. Any ideas? Thanks.

Nolan Dubeau

Load .,8,1

did it work?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano