Skip to content
Snippets Groups Projects

chore(pkg): new patch release (0.2.12)

Merged Nicola Spanti requested to merge topic/0.2/version-0-2-12 into branch/0.2
All threads resolved!
Compare and Show latest version
8 files
+ 43
19
Compare changes
  • Side-by-side
  • Inline
Files
8
# copyright 2016-2023 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact https://www.logilab.fr -- mailto:contact@logilab.fr
# copyright 2016-2024 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
@@ -19,7 +19,7 @@
import jsl
from cubicweb.schema import META_RTYPES
from cubicweb_web.view import Component
from cubicweb.server import Service
from cubicweb_jsonschema import CREATION_ROLE
@@ -40,7 +40,7 @@
yield rtype.type, 'subject'
class JslDocumentBuilder(Component):
class JslDocumentBuilder(Service):
"""Class that builds a jsl document from a description class.
Inherit this class and pass an instance to `y2j_etype` to
@@ -67,7 +67,7 @@
include_base_fields = False
def __init__(self, *args, **kwargs):
super(JslDocumentBuilder, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.relation_targets = {}
def base_fields(self, etype):
@@ -199,6 +199,7 @@
component.
"""
def decorator(cls):
builder = vreg['components'].select('jsonschema.map.builder', cnx)
builder = vreg['services'].select('jsonschema.map.builder', cnx)
assert builder
return builder.document(cls, schema_role)
return decorator
Loading