32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from rest_framework.schemas import AutoSchema
|
|
import coreapi
|
|
import coreschema
|
|
|
|
class SendMailSchema(AutoSchema):
|
|
def get_serializer_fields(self, path, method):
|
|
return [
|
|
coreapi.Field(
|
|
name='FCs',
|
|
location='form',
|
|
required=False,
|
|
schema=coreschema.String(description='ФИО')
|
|
),
|
|
coreapi.Field(
|
|
name='Name of organization',
|
|
location='form',
|
|
required=False,
|
|
schema=coreschema.String(description='Название организации')
|
|
),
|
|
coreapi.Field(
|
|
name='Email',
|
|
location='form',
|
|
required=False,
|
|
schema=coreschema.String(description='Почта отправителя')
|
|
),
|
|
coreapi.Field(
|
|
name='Text',
|
|
location='form',
|
|
required=False,
|
|
schema=coreschema.String(description='Текст сообщения')
|
|
),
|
|
] |