[PATCH jsonschema] Add a CollectionMapper for unspecified entity types

Philippe Pepiot philippe.pepiot at logilab.fr
Wed Jun 20 10:41:11 CEST 2018


On 20/06/2018, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1529413121 -7200
> #      Tue Jun 19 14:58:41 2018 +0200
> # Node ID 62523c338920edf7f5b6ccd206cff69f20113ec4
> # Parent  94157194f0e01bcd3acbd50003e473db39bdc0d1
> # Available At https://hg.logilab.org/review/cubicweb-jsonschema
> #              hg pull https://hg.logilab.org/review/cubicweb-jsonschema -r 62523c338920
> # EXP-Topic heterogenous-collection-mapper
> Add a CollectionMapper for unspecified entity types
> 
> This is useful for representing collection of heterogeneous entities.
> 
> This mapper would be selected by its regid only, with no extra argument
> in contrast with other 'jsonschema.collection' mappers that either
> accepts an "etype" parameter or a relation context. This mapper does not
> handle submission (i.e. entity creation) since the target entity type is
> unspecified; so we return a "false" JSON Schema for "creation" role.
> 
> In tests, we rename prior test case CollectionMapperTC as
> EntityCollectionMapperTC and add back a CollectionMapperTC explicitly
> testing the new mapper class.

Applied, thanks!


More information about the cubicweb-devel mailing list