Skip to content

Releases: Cornices/cornice

3.3.0

11 Apr 14:03
759d0b8
Compare
Choose a tag to compare
  • Cornice now accepts Marshmallow schemas instead of instances (#482, @ergo)
  • Marshmallow schemas get request object added to their context
    during validation (#482, @ergo)

3.2.0

03 Apr 11:13
66c314a
Compare
Choose a tag to compare

New features

  • Add marshmallow request validation support (#475, thanks @ergo)
  • Allow to reuse Pyramid existing routes in services (#477, thanks @ergo)

Documentation

Internal changes

  • Remove configuration commit (#476, thanks @ergo)
  • Remove mentions of text/json in tests and docs (#478, thanks @wjehenddher)

3.1.0

08 Feb 16:31
debe487
Compare
Choose a tag to compare

New features

  • In addition to the colander_body_validator, there are now three more similar validators:
    colander_headers_validator, colander_path_validator, and
    colander_querystring_validator.

Internal changes

  • six is now a required dependency.

3.0.0

20 Oct 09:13
ca2640a
Compare
Choose a tag to compare

Breaking changes

Please refer to upgrading docs <https://cornice.readthedocs.io/en/stable/upgrading.html>_ for detailed migration instructions.

  • acl and traverse parameters are not supported anymore on services
  • Constructors of resource decorated classed must now be __init__(self, request, context=None)

Enhancements

  • Align Cornice with Pyramid ACL pattern: Dynamic ACLs based
    on resource are now possible (#452, thanks @wjehenddher)

Bug fixes

  • Disable CSRF check on predicate fallback view (fixes #458)
  • Fix to use own validator for Header Accept (fixes #431)

2.4.1

20 Oct 09:20
5452cc0
Compare
Choose a tag to compare

Bug fixes

  • Disable CSRF check on predicate fallback view (fixes #458)
  • Fix to use own validator for Header Accept (fixes #431)

2.4.0

19 Jan 15:34
235a2fb
Compare
Choose a tag to compare

Enhancements

  • Add support for arrays on request body top level (fixes #433)

2.3.0

15 Dec 13:41
da5d229
Compare
Choose a tag to compare

Enhancements

  • Add support for validation with specific JSON Content-Types
    (i.e application/merge-patch+json). Thanks @gabisurita!
  • Add X-Content-Type-Options: nosniff headers to responses (fixes #102)
  • Add a request.current_service attribute (fixes #105)

Bug fixes

  • Fix cornice.cors.get_cors_preflight_view to make it parse
    Access-Control-Request-Headers header correctly event if its value
    contains zero number of white spaces between commas (#422, thanks @spoof!)

Internal changes

  • Clean-up an inconsistency in cornice.service.decorate_view() function
    where acl and factory were expected as view arguments (whereas
    deprecated since 1.0)

2.2.0

25 Nov 16:36
80d84c4
Compare
Choose a tag to compare

Enhancements

  • Add support of custom predicates in resources (#344, thanks @VDigitall!)

Internal changes

  • Assert proper behaviour of UTF-8 content JSON body (#366, thanks @thruflo!)

2.1.0

28 Oct 10:03
Compare
Choose a tag to compare

Enhancements

  • Cornice.validators.colander_validator and
    cornice.validators.colander_body_validator now accept colander
    schema node instances. Previously only schema classes were
    accepted. For some discussion see #412.

Deprecations

  • Passing schema classes to Cornice.validators.colander_validator and
    cornice.validators.colander_body_validator is now deprecated.
    (See above.)

Bug fixes

  • To maintain consistency with cornice 1.2 as to the semantics of
    location='path', change cornice.validators.extract_cstruct
    so that it places request.matchdict (rather than
    request.path) into cstruct['path']. (#411)
  • Fix cornice.validators.colander_validator so that it does
    nothing if schema is unset (or set to None.) Previously
    (contrary to its docstring) it was raising a TypeError.

Internal changes

  • Raised test coverage to 100% (#417)

Huge thanks to @dairiki for his help on this release

2.0.2

28 Oct 10:03
Compare
Choose a tag to compare

Bug fixes

Internal changes

  • Deprecate cornice.util.extract_json_data() and cornice.util.extract_form_urlencoded_data()
    in favor of cornice.validators.extract_cstruct() (#409)