backend/app/search/api/serializers.py

34 lines
810 B
Python
Raw Normal View History

2022-10-21 21:39:04 +03:00
from rest_framework import serializers
class SearchSerializer(serializers.Serializer):
body = serializers.CharField(max_length=200)
def create(self, validated_data):
raise NotImplemented
def update(self, instance, validated_data):
raise NotImplemented
class ResponseSerializer(serializers.Serializer):
results = serializers.JSONField()
def create(self, validated_data):
raise NotImplemented
def update(self, instance, validated_data):
raise NotImplemented
2022-10-21 23:22:14 +03:00
class HintRequestSerializer(serializers.Serializer):
content = serializers.CharField()
def create(self, validated_data):
raise NotImplemented
class HintResponseSerializer(serializers.Serializer):
type = serializers.CharField()
content = serializers.CharField()