All Versions
21
Latest Version
Avg Release Cycle
202 days
Latest Release
1861 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v2.0.pre.1 Changes
February 22, 2020- π Bring over partial functionality from praxis-mapper and remove dependency on same
- Praxis::Mapper's ::Resource and ::SelectorGenerator are now included
- General cleanup and simplification
- π Bring over partial functionality from praxis-mapper and remove dependency on same
-
v2.0.0.alpha1
February 22, 2020 -
v0.22.pre.2
September 17, 2019 -
v0.21 Changes
August 19, 2016- Protect against
MediaType
s 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.
- If this is provided, the default validation handler will add a
- π
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 useExampleProvider.removeHandlersForKey('general')
to get rid of the default example if required. - π° Make Traits accumulate block definitions for
params
,headers
andpayload
rather than overriding them. - Switch to lazy evaluation of
base_params
fromApiDefinition
to properly inherit them into the resources and their corresponding actions even before the application'sMediaTtypes
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.
- Protect against
-
v0.20.1 Changes
March 15, 2016- Doc generation: handle SimpleMediaTypes so that they donβt show up in the generated schemas.
- Ensure we require AS#Enumerable extension is loaded, which is required in the generator code.
- β Add Date to the list of primitive types so that it does not show in the generated schemas.
- Enhance the
:created
response_template, so that it can take the associated media_type - π» Doc Browser: fix route display to have the captures instead of the example
-
v0.20.0 Changes
February 18, 2016- π You can now add a
bower.json
file to yourdocs
folder. Any dependencies you list there will be included in the doc browser. - The Plugin API now exposes
Praxis::Plugin#register_doc_browser_plugin(path)
, which allows plugins to register assets that will be included in the doc browser. This is a convenient way to share customizations and optional features amongst different API projects. - π Fixes an issue where an odd scrollbar would appear in some cases in the doc browser.
- π Fixed a corner-case in doc generation which could omit certain existing MediaTypes (when these existed but there were never referenced in any other part of the app).
- β Added
ApiGeneralInfo
to supported modules aPluginConcern
can extend. - π Fixed
MediaType
support for attributor advanced requirements. - π» Doc Browser now exposes an API to register functions that generate code examples.
These can be registered with
ExamplesProvider.register
call.
- π You can now add a
-
v0.19.0 Changes
December 21, 2015- π Handle loading empty
MediaTypeIdentifier
values (to returnnil
) - π» Doc browser now displays examples for action responses.
- Added
Controller#media_type
helper that returns themedia_type
defined for the current response, or defaults to the one defined by the controller's resource definition. - β Added assorted extensions, all under the
Praxis::Extensions
module:FieldSelection
adds a new type,Praxis::Extensions::FieldSelection::FieldSelector
that wraps theAttributor::FieldSelector
type and improves the definition of parameters for a set of fields. Must be required explicitly from 'praxis/extensions/field_selection'.- The parsed set of fields will be available as the
fields
accessor of the loaded value. - For example, to define a parameter that should take a set of fields
for a
Person
media type, you would define a:fields
attribute in the params like:attribute :fields, FieldSelector.for(Person)
. The parsed fields in the request would then be available withrequest.params.fields.fields
. Rendering
addsrender
anddisplay
helper methods to controllers to reduce common boilerplate in producing rendered representations of media types and setting response "Content-Type" headers.Controller#render(object, include_nil: false)
loadsobject
into the the current applicableMediaType
(as fromController#media_type
) and renders it using the fields provided byController#expanded_fields
(from theFieldExpansion
extension).Controller#display(object, include_nil: false)
callsrender
(above) withobject
, assigns the result to the currentresponse.body
, sets the response's "Content-Type" header to the appropriate MediaType identifier, and returns the response.- To use this extension, include it in a controller with
include Praxis::Extensions::Rendering
. MapperSelectors
addsController#set_selectors
, which sets selectors in the controller'sidentity_map
to ensure any fields and associations necessary to render the:view
and/or:fields
params specified in the request are loaded for a given model whenidentity_map.load(model)
is called.- To use this extension, include it in a controller with
include Praxis::Extensions::MapperSelectors
, and definebefore
callbacks on relevant actions that callset_selectors
. For example:before actions: [:index, :show] { |controller| controller.set_selectors }
FieldExpansion
provides aController#expanded_fields
helper for processing:view
and/or:fields
params to determine the final set fields necessary to handle the request.- Note: This is primarily an internal extension used by the
MapperSelectors
andRendering
extensions, and is automatically included by them.
- π» A slew of Doc browser improvements:
- Now uses the new JSON format for responses.
- Traits now get exposed in the doc browser.
- Now displays examples for requesting actions.
- Now correctly displays top-level collections in action payloads.
- Has improved scrolling for the sidebar.
- Displays more detailed HTML titles.
- Has been switched back to having a separate page per action, however actions are now shown in the sidebar.
- Will now display multiply nested resources in a proper hierarchy.
- π Fix doc generator to only output versions in index for which we have resources (i.e. some can be nodoc!)
- π Handle loading empty
-
v0.18.1 Changes
September 21, 2015- π Fix Doc Browser regression, which would not show the schema in the Resource Definition home page.
-
v0.18.0 Changes
September 18, 2015- β Added
display_name
DSL toResourceDefinition
andMediaType
- It is a purely informational field, mostly to be used by consumers of the generated docs
- It defaults to the class name (stripping any of the prefix modules)
- Revamped document generation to output a more compact format:
- 1 file per api version: including info, resources, schemas and traits.
- 1 single index file with global info plus just a list of version names
- new task currently usable through
bundle exec rake praxis:docs:generate_beta
- NOTE: leaves the current doc generation tasks and code intact (until the doc browser is switched to use this)
- Specialized
Multipart
βs family in its description to be βmultipartβ instead of βhashβ. - β Added
Praxis::Handlers::FormData
for 'multipart/form-data'. Currently returns the input unchanged inparse
andgenerate
. - β Added
Praxis::Handlers::WWWForm
for form-encoded data. - Added
Docs::Generator
, experimental new documentation generator. Use thepraxis:docs:experiments
rake task to generate. Note: not currently compatible with the documentation browser. - β Added 'praxis.request_stage.execute'
ActiveSupport::Notifications
instrumentation to contorller action method execution inRequestStages::Action#execute
. - π° Make action headers, params and payloads be required by default as it is probably what most people expect from it. To make any of those three definitions non-required, simply add the
:required
option as used in any other attribute definition. For example:payload required: false do ...
- β Added
-
v0.17.1 Changes
- π Fixes an issue that would make exported documentation broken.
- π Fixes an issue that would make the version selector broken.