Changelog for rest-core-0.39.0.2
Changelog
0.39
- Add support for versionless APIs, thanks to Tenor Biel. This is a
breaking change. Old API users will have to add
Versionedbefore their list of api versions, so it becomesVersioned [ (mkVersion ...) ].
0.38
- Add
RawJsonO,RawJsonI,RawJsonAndXmlI, andRawJsonAndXmlO. - Remove Show constraint from ReadId
0.37
-
Allow specifying custom multi-action. Previously there was always a top-level POST that could perform multiple actions in the API at once. Now you can customize this handler (e.g. to add logging or optimisations) , or turn it off completely by returning
NotFound.Because this is an experimental feature, it's exposed through
Rest.Driver.Routing.Internaland is subject to future breaking changes without a major bump.There is one breaking change due to this: the signature of
routenow requires aMonadandApplicativeconstraint onm. This propagates toRest.Run.apiToHandler(')and related functions in the rest-happstack, rest-snap and rest-wai packages.
0.36.0.6
- Security: don't allow newlines in filenames.
0.36.0.5
- Fix documentation for
fileO. - Allow
HUnit 1.3.*.
0.36.0.4
- Drop (internal) dependency on either, this removes 20(!) transitive dependecies.
0.36.0.3
- Allow
either 4.4.*
0.36.0.2
- Allow
aeson 0.9.*
0.36.0.1
- Allow
errors 2.0.*
0.36
-
File output now needs a third component, specifying if the file is served as 'attachment' or not. If so, this will make most browsers download the file instead of displaying it. This is a breaking change. You can add a third element
Falseto the return value to get the old behaviour. -
Re-exported XML serializable types from
rest-typesno longer haveregularPFinstances since they are now using GHC Generics.
0.35.1
- Remove unneeded constraint from
domainReason.
0.35
-
Change input/output dictionaries to indicate separately if there are dictionaries, and for what type. This is a breaking change. The most likely problems are where
Reason ()is explicitly used in handlers without error dictionaries. Simply replace these withReason_. Additionally, allsome*combinators are deprecated now. They are just the identity function and can be removed. -
The types of all dictionary combinators have changed, the Dicts type, the dicts smart constructor, empty, SomeError, Modifier, many internal (but exported) things in Rest.Driver.Perform, some types in Rest.Handler, and Void was moved.
-
Switched all usages of
ErrorTtoExceptT. To stay backwards compatible with older versions oftransformersandmtlyou can use thetransformers-compatandmtl-compatpackages. To update your code:s/ErrorT/ExceptTands/Control.Monad.Error/Control.Monad.Except/. -
Add
>|<toRest.Error. It combines twoExceptTcomputations yielding the last error if both fail. This is a replacement for using<|>withErrorTsince theAlternative ExceptTinstance needs aMonoidinstance for the error. -
Fix typos in haddock for
Paramdictionary. -
Switch to explicit export lists where missing.
0.34.0.3
- Allow
aeson-utils 0.3.*
0.34.0.2
- Allow utf8-string 1.
0.34.0.1
- Fix for base 4.8/GHC 7.10.
0.34
- Allow setting the method in the requests in a top level multi handler.
- The
getMethodRestclass function now returns aMaybe. - The
routemethod inRest.Driver.Routingnow takes aMaybe Method. - The
Methodtype was removed fromRest.Driver.Typesand moved to rest-types'Rest.Types.Method.
0.33.2
- Allow top level multi handler as a POST as well as a GET. Technically, you're not allowed to vary the response based on the body of a GET. Also, in some frameworks (e.g. jQuery) it isn't possible to set the body of a GET.
0.33.1.2
- Typo fixes in documentation.
0.33.1.1
- Declare correct error return type for derived multi handlers. These
were declared as
Reason (Reason e), now they areReason (). This generated confusing documentation.
0.33.1
- Move
RangefromRest.Handlerintorest-types. Still re-exported.
0.33
- Added a
Rest.Types.Error.ToResponseCodeconstraint tojsonE,xmlE, andxmlJsonE. - Changed
domainReasonto have aToResponseCodeconstraint instead of an explicit argument. - Added
Rest.ShowUrlre-exportingShowUrlfromrest-types. application/*andapplication/octet-streamaccept headers now match file outputs.
0.32.0.2
- Allow random 1.1.*
0.32.0.1
- Fix bug in Chrome when serving files with commas in name.
0.32
- Add
addHeaderdictionary combinator, to extend instead of replace the header dictionaries. For this, a constructorTwoHeaderswas added toHeader. - Relax the types of
mkListingandmkOrderedListingto allow parameters and headers.
0.31.1
- Expose
Rest.Driver.Routing.splitUriString. - Make test cases compile again.
0.31
- Schema:
actionhas been renamed tostaticsince it is tied tostaticsand to disambiguate it from the unrelatedactions.
0.30.0.3
- Use
json-schema 0.5.*
0.30.0.2
- Use
rest-stringmap == 0.2.*
0.30.0.1
- Allow
mtl == 2.2.*andtransformers == 0.4.*
0.30
-
Use
Content-Dispositionto provide filenames for file responses. This slightly changes the semantics ofFileO: what used to be interpreted as the file extension is now used for the whole file name. -
Rest.Types.Container.StringMapHas been replaced byrest-stringmap. This changes the XML serialization format of multi part messages, the old format was<map><key>k</key>v[...]</map>and the new one is<map><value key="k">v</value>[...]</map>.
0.29
- Add multi-delete handler. It is used on a DELETE to
/<resource>/<id>/and is derived from the single delete handler. - Don't put
Cache-Control: privateheader on served files. This way they can be cached by public proxies, e.g. cloudfront. - Add
Showinstances forHeader,ParamandDict. - Renamed
mkMultiPutHandlertomkMultiHandlerinRest.Driver.Routing. - Explicit exports in
Rest.Driver.Routing, removing a lot of private functions from the public interface.