1. 29 Jan, 2018 2 commits
    • Denis Laxalde's avatar
      Merge with 0.2 · 81cfc97a4f14
      Denis Laxalde authored
      Apart from resolving merge conflict, the
      CompoundMapperTC:test_object_relation test had to be almost entirely
      rewritten because tests' schema changed in "default" branch ("author"
      relation semantics changed in cdff71d0dd27, we thus now use "in_library"
      instead) and because the rendering of array items is now different
      (items are objects with a "id" property instead of plain strings
    • Denis Laxalde's avatar
      Add a doc-requirements.txt file · fb6f75047ecb
      Denis Laxalde authored
      This will be useful on readthedocs.
  2. 26 Jan, 2018 1 commit
  3. 15 Jan, 2018 1 commit
  4. 12 Dec, 2017 8 commits
  5. 11 Dec, 2017 4 commits
  6. 08 Dec, 2017 3 commits
  7. 11 Dec, 2017 1 commit
    • Denis Laxalde's avatar
      Add JSON and JSON Schema views for entities' workflow transitions · 4bf8a69fed72
      Denis Laxalde authored
      We associate the proper 'jsonschema.collection' mapper from the
      WorkflowTransitionsResource resource by implementing the mapper()
      Most added views are straightforward except the
      post_entity_workflow_transition which handles adapter.fire_transition()
      call directly (instead of passing through mapper.values()) since, as
      noted in previous changeset we diverge from the actual implementation of
      workflows in CubicWeb to expose a simpler REST API.
      See functional tests for how it works.
  8. 06 Dec, 2017 1 commit
  9. 08 Dec, 2017 1 commit
    • Denis Laxalde's avatar
      Add mappers for "workflow objects" · 8eda96bb89ab
      Denis Laxalde authored
      We add two mappers corresponding to the TrInfo entity type:
      * TrInfoEntityMapper is used for JSON Schema generation with "creation"
        role; this schema is different from what the normal mapper would
        produce in that it exposes the "name" of the transition directly and
        hides the implementation details of CubicWeb's workflows (which is a
        state machine not really needed in the framework of a REST API).
      * TrInfoCollectionMapper is a collection mapper that only supports
        serialization and produces the array of transitions fired for the
        entity given in context.
  10. 07 Dec, 2017 1 commit
  11. 06 Dec, 2017 5 commits
  12. 05 Dec, 2017 6 commits
  13. 04 Dec, 2017 3 commits
    • Denis Laxalde's avatar
      Merge with branch 0.2 · 6ae9b95ef4da
      Denis Laxalde authored
      In this branch, server-side JSON Schema validation got dropped. However,
      we still need some kind of validation in order to return a proper bad
      request error in HTTP API (instead of an Internal Server Error). Hence,
      we introduce an extra validation step in RelationMapper.values() to keep
      test_api_misc.py working (though with a different error message). Also
      notice the change in test_post_related_bad_target where the payload was
      badly formatted (should have been a list of dicts) and is now fixed.
    • Denis Laxalde's avatar
    • Denis Laxalde's avatar
      [pkg] Version 0.2.2 · b38cb5cf748a
      Denis Laxalde authored
      branch : 0.2
  14. 25 Jan, 2018 1 commit
    • Tanguy Le Carrour's avatar
      Handle object relations in CompoundMapper · 9e19371beea8
      Tanguy Le Carrour authored
      - Add a test for object relations
      - Change _relation_mapper signature to accept "role"
      - Add a _relations attribute that contains relation/role pairs
      - Use the new _relations instead of the old relations attribute
      - Hide subject and object relations mapped to this document from etype JSON Schema
      - Add 2 tests to detect relation duplications
      - Detect relation duplications
      branch : 0.2
  15. 04 Dec, 2017 2 commits