Praxis 0.21 is out!

10 views
Skip to first unread message

Josep Blanquer

unread,
Aug 19, 2016, 2:49:24 PM8/19/16
to praxis-...@googlegroups.com, praxis-support
All,

 We just pushed a new release of Praxis, 0.21. Again, it comes with a large number of additions and a few fixes both in the Ruby codebase, documentation generation as well as the document browser. Plus it has been upgraded to use the latest Blueprints, Mapper and Attributor gems which, themselves, have been greatly enhanced.

A couple notables to point out are:
  • More robust document generation and browser:
    • Support customizable top-level home pages for types
    • Show all your defined header expectations for responses
    • HTML style urls
  • Api definition allows defining a `documentation_url` for where your Praxis API docs live:
    • And by default, validation responses will automatically give you a link you can follow to see more information about the error.
  • Built a simple Middleware helper so you can easily embed Praxis within another rails app such as Rails. Stay tuned for more help in this area.
Anyway, that's all for now.

Happy Praxing!

 Josep M.


0.21

  • Protect against MediaTypes that do not have any links defined.
  • More robust scanning of existing types when generating docs. Some types might have not been properly reported in the schemas section of the JSON docs if they were only used somewhere deep in some other type or action hierarchy
  • Build doc browser support for defining top-level home pages for types. Apps can achieve the override by registering templates that respond to the ‘main’ type (instead of the other existing ‘label’,’embedded’ and ‘standalone’ modes).
  • Enhance doc browser to show header and location expectations on action responses that have them defined
  • Allow Plugin registration without requiring config_key
    • registration will select a default config_key based on the class name
  • A new documentation_url global directive is exposed for authors to be able to indicate where documentation will be hosted.
    • If this is provided, the default validation handler will add a documentation key to the response pointing at a url that should correspond to the documentation for the resource the user was requesting.
    • Praxis::Docs::LinkBuilder can be used to generate these documentation urls from the praxis application.
  • You can now switch your doc browser to use HTML5 style urls (i.e. /1.0/type/V1-MediaTypes-PriceFilter instead of/index.html#/1.0/type/V1-MediaTypes-PriceFilter).
  • Remove deprecated rake tasks.
  • Remove some remaining inline styling in doc browser.
  • Adds a ExampleProvider.removeHandlersForKey call. You can use ExampleProvider.removeHandlersForKey('general') to get rid of the default example if required.
  • Make Traits accumulate block definitions for params,headers and payload rather than overriding them.
  • Switch to lazy evaluation of base_params from ApiDefinition to properly inherit them into the resources and their corresponding actions even before the application's MediaTtypes have been finalized.
  • Built the MiddlewareApp class to make it easy to run a Praxis app mounted as an intercepting middleware which will only forward requests down the stack if they didn't match any of its routes.
    • Note: it properly skips forwarding when 404s are purposedly returned by the application itself.
    • Note2: it also respects the X-Cascade=pass conventions.
Reply all
Reply to author
Forward
0 new messages