class HeaderSerializer(PbNestedSerializer): additional_informations = EnumListField(attr='additional_informations', display_none=True) display_informations = pt.VJDisplayInformationSerializer(attr='pt_display_informations') links = jsonschema.MethodField(schema_type=LinkSchema(many=True)) def get_links(self, obj): return _get_links(obj)
class PassageSerializer(PbNestedSerializer): route = pt.RouteSerializer() stop_point = pt.StopPointSerializer() stop_date_time = pt.StopDateTimeSerializer() display_informations = pt.VJDisplayInformationSerializer(attr='pt_display_informations') links = jsonschema.MethodField(schema_type=LinkSchema(many=True)) def get_links(self, obj): return _get_links(obj)