Esempio n. 1
0
class LinkSchema(serpy.Serializer):
    """This Class is not used as a serializer, but here only to get the schema of a link"""
    id = StrField()
    title = StrField()
    rel = StrField()
    templated = BoolField()
    internal = BoolField()
    type = StrField()
Esempio n. 2
0
    class JsonchemaSupportedType(serpy.Serializer):
        jsonschemaStrField = StrField(required=False)
        jsonschemaBoolField = BoolField(required=True, display_none=True)
        jsonschemaFloatField = FloatField(required=True, display_none=True)
        jsonschemaIntField = IntField()
        jsonschemaField = Field(schema_type=int)
        jsonschemaMethodField = MethodField(schema_type=str)
        lambda_schema = LambdaField(method=lambda **kw: None, schema_type=Custom())
        list_lambda_schema = LambdaField(method=lambda **kw: None,
                                         schema_type=Custom(many=True))

        def get_jsonschemaMethodField(self, obj):
            pass
Esempio n. 3
0
 class SerpySupportedType(serpy.Serializer):
     serpyStrField = StrField(display_none=True)
     serpyBoolField = BoolField(display_none=True)
     serpyFloatField = FloatField()
     serpyIntField = IntField()