Просмотр исходного кода

adding new field to API schema

main
Simon Bowie 1 год назад
Родитель
Сommit
1084825889
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      web/app/schemas.py

+ 2
- 2
web/app/schemas.py Просмотреть файл

# schema for JSON transformation of Resource table via Marshmallow # schema for JSON transformation of Resource table via Marshmallow
class ToolSchema(ma.Schema): class ToolSchema(ma.Schema):
class Meta: class Meta:
fields = ('id', 'name', 'description', 'developer', 'developerUrl', 'projectUrl', 'repositoryUrl', 'license', 'scriptingLanguage', 'expertiseToUse', 'expertiseToHost', 'dependencies', 'ingestFormats', 'outputFormats', 'status')
fields = ('id', 'name', 'description', 'developer', 'developerUrl', 'projectUrl', 'repositoryUrl', 'license', 'scriptingLanguage', 'expertiseToUse', 'expertiseToHost', 'dependencies', 'ingestFormats', 'outputFormats', 'videoUrl', 'status')
ordered = True ordered = True


class PracticeSchema(ma.Schema): class PracticeSchema(ma.Schema):


class BookSchema(ma.Schema): class BookSchema(ma.Schema):
class Meta: class Meta:
fields = ('id', 'name', 'description', 'author', 'year', 'bookUrl', 'isbn')
fields = ('id', 'name', 'description', 'author', 'year', 'bookUrl', 'videoUrl', 'isbn')
ordered = True ordered = True


# subschemas for nested fields # subschemas for nested fields

Загрузка…
Отмена
Сохранить