1. 26 Jan, 2018 1 commit
  2. 04 Dec, 2017 1 commit
  3. 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
      
      --HG--
      branch : 0.2
      9e19371beea8
  4. 27 Nov, 2017 2 commits
    • Denis Laxalde's avatar
      Drop JSON Schema validation upon entity creation and update · 0db4b1e79fea
      Denis Laxalde authored
      JSON Schema validation of an instance is arguably the responsibility of
      the client and it's not very useful to (re-)validate the instance on
      server side with a JSON Schema validator since we already have a
      validation in the database.
      
      Also, it creates problems with combined usage of "default" and
      "required" when the client does not supply a value (which is
      legitimate). Closes #17115851. (Added a test for this.)
      
      In ETypeMapper.values(), we now check that "instance" is completely
      consumed when all mappers of the graph have been called and if not, we
      issue a validation error similar to what a JSON Schema validator would
      have raised since we have `"addionnalProperties": "false"` on our JSON
      Schema.
      
      There's no behaviour change in tests, just some error messages changes.
      Useless tests are dropped.
      
      We do not depend on python-jsonschema anymore in application code, but
      only in tests.
      
      --HG--
      branch : 0.2
      0db4b1e79fea
    • Denis Laxalde's avatar
      [tox] Change py34 environment to py3 · 9286c55df588
      Denis Laxalde authored
      The latter works by using whatever python3 executable points to.
      
      --HG--
      branch : 0.2
      9286c55df588
  5. 25 Sep, 2017 1 commit
  6. 22 Sep, 2017 1 commit
  7. 15 Sep, 2017 1 commit
  8. 02 Jun, 2017 2 commits
  9. 30 May, 2017 5 commits
  10. 31 May, 2017 7 commits
  11. 23 May, 2017 1 commit
  12. 31 May, 2017 3 commits
  13. 24 May, 2017 1 commit
  14. 30 May, 2017 1 commit
  15. 29 May, 2017 3 commits
    • Denis Laxalde's avatar
      Make partial_match_etype more generic and rename it into partial_yams_match · e745539ad236
      Denis Laxalde authored
      This predicates would now match on any class attribute with a name usable for
      `yams_match` predicate.
      e745539ad236
    • Denis Laxalde's avatar
      Build DocumentField with a class in InlinedRelationMapper.jsl_field_targets() · dc23ac3b30f2
      Denis Laxalde authored
      Previously (I don't remember why), we used the name of a class (i.e.
      target_type) in DocumentField initialization for target fields of
      InlinedRelationMapper. This causes problem when trying to render the schema of
      the field for such a relation if respective document is not in JSL registry
      (it might not at this point apparently). By using the class directly we avoid
      a registry lookup later when schema of the document field is requested.
      
      Added a test checking that schema of an inlined relation renders correctly.
      dc23ac3b30f2
    • Denis Laxalde's avatar
      Use target type from selection context in InlinedRelationMapper.description() · 2550b523bff8
      Denis Laxalde authored
      Instead of passing `takefirst=True` to rdef(), we use kwown target type from
      selection context if there's only one possible target type. If there are more
      than one possible target types, we set description to None. Otherwise, pass
      targettype=None to rdef as it's probably a final relation hopefully not
      ambiguous.
      2550b523bff8
  16. 18 May, 2017 3 commits
  17. 23 May, 2017 3 commits
  18. 22 May, 2017 3 commits