0

As per http://perfect.org/feature-requests.html

I would like to request that RAML functionality be included out of the box.

I would like to see something like the following on the server for serving RAML documentation:

server.addRamlDocs(path: "/raml.raml", versionRaml: 1.0, versionApi: "v1", title: "Test API title")

This would add a route that when matched creates a full RAML file for all RAML routes.

RAML routes should probably be created in a similar fashion to MustachePageHandler but split into RamlDescriptionHandler, RamlValidateRequestHandler, RamlRequestHandler and RamlResponseHandler.

RamlDescriptionHandler

This should be responsible for:

  • Describing the request / response
  • Automatically creating documentation for the request (when server docs matched)

RamlValidateRequestHandler

  • Validating and type casting the request

This should then inject HTTPRequest.ramlRequestData and HTTPRequest.ramlRequestIsValid. This should require no action from the application developer.

RamlRequestHandler

Application logic to be coded by the developer, should check and use HTTPRequest.ramlRequestData and HTTPRequest.ramlRequestIsValid

Should set HTTPResponse.ramlStatus (HTTP Status Code) and HTTPResponse.ramlData

RamlResponseHandler

Should validate the response and send matching against RamlDescriptionHandler, no action from the application developer.

  • 1
    I'm voting to close this question as off-topic because it is not a question, it is a feature request for a specific piece of software. – Joseph Earl Oct 26 '16 at 10:59
  • @joseph-earl The Swift Perfect documentation asks for feature requests to be raised here in the format provided. Please see http://perfect.org/feature-requests.html as per the first line of my post. Thanks – Danny Lewis Oct 26 '16 at 11:17
  • StackOverflow is a site for programming questions, not product feature requests. Feature requests are clearly stated as improper use of this site on http://stackoverflow.com/help/product-support. The Perfect developers should use another service such as uservoice.com for this. – Joseph Earl Oct 26 '16 at 12:24
  • I've started a project for this on [github](https://github.com/openbuild-sheffield/jolt) Will happily accept feedback, contributors, pull requests etc – Danny Lewis Jan 26 '17 at 12:42

0 Answers0