1. 12 Dec, 2017 4 commits
  2. 11 Dec, 2017 4 commits
  3. 08 Dec, 2017 3 commits
  4. 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.
  5. 06 Dec, 2017 1 commit
  6. 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.
  7. 07 Dec, 2017 1 commit
  8. 06 Dec, 2017 5 commits
  9. 05 Dec, 2017 6 commits
  10. 04 Dec, 2017 7 commits
  11. 01 Dec, 2017 2 commits
  12. 30 Nov, 2017 3 commits
  13. 01 Dec, 2017 2 commits
    • Denis Laxalde's avatar
      Only add "links" to schema of type "object" · 5c2f3851c513
      Denis Laxalde authored
      For other kinds of JSON Schema (e.g. "array" or any final type), it does
      not make sense and will not work.
    • Denis Laxalde's avatar
      Do not return None ETypeRelationItemMapper.schema_and_definitions() · eb6de896fb08
      Denis Laxalde authored
      The previous None value would be converted as null in JSON which does
      not have this meaning (and is not even a valid JSON Schema).
      Instead we now return False to indicate that there is no data for items
      of the relation collection, so that when this "items" sub-schema is used
      within a type: "array", validation will always fail (which in turns,
      means that no entity creation is possible in such cases).