aromanovich / jsl

A Python DSL for describing JSON schemas
http://jsl.readthedocs.org/
Other
218 stars 21 forks source link

RECURSIVE_REFERENCE_CONSTANT not working under scopes #14

Closed sebdiem closed 8 years ago

sebdiem commented 8 years ago

Hi,

class Test(jsl.Document):
    with jsl.Scope('test') as test:
        test.field = jsl.DocumentField(jsl.RECURSIVE_REFERENCE_CONSTANT)

generates an infinite recursion loop whereas

class Test(jsl.Document):
     test.field = jsl.DocumentField(jsl.RECURSIVE_REFERENCE_CONSTANT)

works fine. Is it "normal" ?

aromanovich commented 8 years ago

Fixed in jsl==0.1.5.

Thanks for reporting the bug!

sebdiem commented 8 years ago

Thank you for fixing it so quickly ! and for this very useful tool.