Changelogs » Aiohttp-json-api

Aiohttp-json-api

0.37.0

-------------------

* Drop Python 3.5 support
* Update documentation

0.36.1

-------------------

* Fix bug with content negotiation
* Add cherry-picked and improved helpers from python-mimeparse_

0.36.0

-------------------

* Improve content negotiation (fix 185) with python-mimeparse
* Update requirements

0.35.2

-------------------

* Fix bug with wrong query parameters of links in compound documents

0.35.1

-------------------

* Fix ``trafaret`` requirement to 1.0.2 (included ``rfc3339.Date``)

0.35.0

-------------------

**BREAKING CHANGES!**

* Schema is separated into Schema (marshaller) and Controller
* Request context instantiated in handlers and was renamed to ``JSONAPIContext``
* Change signature of setup JSON API method in application (now we should pass a mapping between schemas and controllers)
* New abstract base class for Controller
* Schema and Controller must be initialized with only one parameter — ``JSONAPIContext``
* Passing a context to almost each method of Schema no more required (context is accessible from Schema or Controller instance directly)
* Remove decorator for JSON API handlers (content negotiation moved to middleware)
* Refactored fields and schema modules
* Improved fetching of compound documents
* Examples are updated to conform with all changes in this release

0.33.1

-------------------

* Fix bug with no Accept header in request

0.33.0

-------------------

* Improve content type negotiation
* Improve documentation
* Add field for Date
* Add example based on `fantasy database <https://github.com/endpoints/fantasy-database>`_
* Introduce JSON API integration test suite (not done yet!)
* Improve collections helpers
* No more links normalization by default
* Move meta object at top level of result document

0.32.0

-------------------

* Constants, enums and structs refactoring *(backward incompatible)*
* Add useful typings
* Documentation fixes
* Extend development requirements

0.31.0

-------------------

* Improve performance of URL resolving again. At this time with usage of standard Python urllib
* Upgrade requirements

0.30.0

-------------------

* Improve performance of URL resolving in Link field (with `cachetools`_)
* Upgrade requirements

0.29.2

-------------------

* Documentation improvements

0.29.1

-------------------

* Update README
* Upgrade requirements

0.29.0

-------------------

* Simple example of usage is added
* Fix bug in handler of relationship query

0.28.3

-------------------

* Fix bug with wrong read-only field error
* Don’t require setup ID field in Schema to update a resource

0.28.2

-------------------

* Add multidict_ to requirements and to README

0.28.1

-------------------

* Fix small bug with wrong empty sorting in RequestContext

0.28.0

-------------------

* Add support for customizable inflection of fields from query string.
* Convert static methods of RequestContext to class methods
* Update docs of RequestContext methods

0.27.1

-------------------

* Fix packaging of ABCs and compats

0.27.0

-------------------

* Abstract base classes refactoring (separate Field and Schema ABCs)
* Fix bug with compound documents in case models has no property “resource_id”
* Remove buggy helper to check subclass of any instance
* Decompose setup application method to increase readability
* Properly error raised in jsonapi_handler decorator
* Use one field instead of two to check what type of relation have the field

0.26.0

-------------------

* Properly use abstract base classes. Inherit SchemaABC from ABC.
* Rename resource validation methods *(backward incompatible)*

0.25.0

-------------------

* Add Tuple field
* Fix bug with List field items enumeration
* Fix wrong conversion of Decimal field to string on deserialization
* Add yarl_ (>=0.13) to requirements

0.24.1

-------------------

* Add support for length range specifying for List field

0.24.0

-------------------

* Convert document render utility to async coroutine *(backward incompatible)*
* Rename Error class property "json" to "as_dict" to clarify

0.23.0

-------------------

* Use MultiDict for request context filters and FilterRule tuple *(backward incompatible)*
* Debug info on request context creation

0.22.2

-------------------

* Add support for nullable List field

0.22.1

-------------------

* Fix bug with wrong exit from compound documents fetch utility ("return" instead of "break")

0.22.0

-------------------

* Remove recursive fetching of compound documents. Replace it with simple loop.

0.21.2

-------------------

* Fix bug with fetching compound documents when query parameter "include" contains the same relation twice and more.

0.21.1

-------------------

* Fix bug with non-underscored relation name in relationship handlers

0.21.0

-------------------

* Add support for field names conversion passed to "include" request context
* Update development requirements

0.20.2

-------------------

* Avoid assertion in Registry ensure identifier method
* Make Schema getter of object id static
* Avoid to filter out empty fields of rendered documents (less memory and faster)
* Get id field of schema more safely in URI resource ID validator

0.20.1

-------------------

* Add support for load only fields (like a Marshmallow)

0.20.0

-------------------

* Asynchronous validators support
* Routes namespace can be customized
* Relative links support

0.19.1

-------------------

* Improve serialization result default keys creation

0.19.0

-------------------

* Refactor schema serializer to fix bug with no resource link in result
* Clean-up validation of expected ID in pre-validaiton of resource
* Use status property of ErrorList in error middleware to return HTTP status
* Remove default getter from Link field, because it doesn't used anymore

0.18.1

-------------------

* Migrate to trafaret >= 0.11.0
* Fix requirement of trafaret to version greater than 0.11.0

0.18.0

-------------------

* Properly handle missing values in deserialization and validation

0.17.1

-------------------

* Add support for validation of Relationships ID field

0.17.0

-------------------

* Normalize resource_id parameter usage in all mutation methods.
* Add fetch_resource schema coroutine to receive resource instance by ID.
* Add separate method for mapping deserialized data to schema.
* Context is required parameter for deserialization schema method.
* Move docs to ABC schema.
* Properly handle allow_none parameter for UUID field

0.16.2

-------------------

* Fix arguments passed to validators

0.16.1

-------------------

* Pass context to value setter in update methods

0.16.0

-------------------

* Strict member names and type checking to conform JSON API requirements (routes and schema level). See also: http://jsonapi.org/format/document-member-names
* Strict check for overrides of handlers
* Improve debug logging

0.15.2

-------------------

* Initialize default relationships links in meta-class, to avoid bug with empty names of relationships fields

0.15.1

-------------------

* Rename resource ID parameter of query_resource schema' method.

0.15.0

-------------------

* Pagination is initialized from request by default. Remove separate class method of BasePagination to initialize pagination instance
* Improve value validation error for absent fields
* Improve validation error of string field with choices

0.14.0

-------------------

* Customisable JSON API handlers support
* DRY in handlers
* Move context builder from middleware to jsonapi_handler decorator
* Request context receive optional resource_type now

0.13.0

-------------------

* Revert back to asynchronous setters, because it's used in update relationships and it might want to query DB, for example

0.12.0

-------------------

* Base Registry class from UserDict, so Registry is a dict with ensure_identifier method.
* More strict typing checks on setup.

0.11.1

-------------------

* Fix bug with mutation not cloned resource in method for delete relationship
* Require JSON API content type on delete relationships

0.11.0

-------------------

* Method for update return original and updated resource as result. Updated resource is created via deepcopy. It will be useful to determine returned HTTP status
* Fix bug with enumeration (choices) in String field
* Fix bug with context event setup for OPTIONS, HEAD and another request methods not used in JSON API

0.10.0

-------------------

* Mass refactoring of schema, fields, validation and decorators
* Generic approach to setup Schema decorators is used (inspired by Marshmallow)
* Fields are used only for encode/decode now (with pre/post validation). Additional validators for fields must be created on schema level
* Custom JSON encoder with support JSONPointer serialization
* Remove boltons from requirements
* No more remap input data dictionary with key names to underscores conversion.
* Add helpers "first" and "make_sentinel" (cherry-picked from boltons)
* Fix enumeration (choices) support in String field

0.9.3

------------------

* Setup content-type validation on mutation API methods (application/vnd.api+json is required)
* Properly get and encode relationships fields
* Update docs and typing for ensure_identifier Registry's method

0.9.2

------------------

* Fix bugs related to Python 3.5
* Generation of documentation on RTD is fixed

0.9.1

------------------

* Python 3.5 compatibility changes

0.9.0

------------------

* Handle aiohttp-json-api exceptions and errors in middleware. If exceptions is not related to JSON API errors, then exception is reraised
* Huge refactoring of RequestContext
* No more use of boltons cachedproperties, instead use parsing static methods related to each request context' entity
* Update docs for RequestContext methods
* Add typings to RequestContext

0.8.2

------------------

* Properly handle error with wrong relation name (raise HTTP 400)

0.8.1

------------------

* Fix bdist_wheel python tag to support Python 3.5

0.8.0

------------------

* Python 3.5 support (avoid usage of Python 3.6 format strings)
* Registry is plain object now
* Custom Registry support (`registry_class` parameter in ``aiohttp_json_api.setup_jsonapi`` method)
* Log debugging information at start about registered resources, methods and routes
* Use OrderedDict inside SchemaMeta

0.7.2

------------------

* Fix bug with JSONPointer when part passed via __truediv__ is integer
* Validate relationship object before adding relationship in ToMany field

0.7.1

------------------

* Fix bugs with validation of resource identifier in relationships fields
* Add typings for base fields

0.7.0

------------------

* Setup of JSON API must be imported from package directly
* Fix bugs with decode fields and allow None values

0.6.2

------------------

* Update HISTORY

0.6.1

------------------

* Fix bug with Enum choices of String field

0.6.0

------------------

* Return resource in update method of Schema class. This will be helpful in inherit classes of Schemas.

0.5.5

------------------

* Setup auto-deploy to PyPI in Travis CI

0.5.4

------------------

* Initial release on PyPI

0.5.3

------------------

* Improve documentation

0.5.0

------------------

* Don't use attrs_ package anymore
* Refactor requirements (move it into `setup.py`)

0.4.0

------------------

* Schema imports refactoring (e.g. don't use ``aiohttp_json_api.schema.schema.Schema`` anymore)

0.3.0

------------------

* Upgrade requirements

0.2.0

------------------

* Fix setup.py
* Add test for Decimal trafaret field

0.1.1

------------------

* Dirty initial version


.. _attrs: http://www.attrs.org/en/stable/
.. _yarl: https://yarl.readthedocs.io
.. _multidict: http://multidict.readthedocs.io/en/stable/
.. _cachetools: https://github.com/tkem/cachetools
.. _python-mimeparse: https://pypi.python.org/pypi/python-mimeparse