Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Replace plural categories as field name with singular category #583

Merged
merged 5 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/catalog/api/serializers/audio_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ class AudioSearchRequestSerializer(
fields_names = [
*MediaSearchRequestSerializer.fields_names,
*AudioSearchRequestSourceSerializer.field_names,
"categories",
"category",
"duration",
]
"""
Keep the fields names in sync with the actual fields below as this list is
used to generate Swagger documentation.
"""

categories = serializers.CharField(
label="categories",
category = serializers.CharField(
label="category",
help_text="A comma separated list of categories; available categories "
"include `music`, `sound_effect`, `podcast`, `audiobook`, "
"and `news`.",
Expand Down
6 changes: 3 additions & 3 deletions api/catalog/api/serializers/image_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ImageSearchRequestSerializer(
fields_names = [
*MediaSearchRequestSerializer.fields_names,
*ImageSearchRequestSourceSerializer.field_names,
"categories",
"category",
"aspect_ratio",
"size",
]
Expand All @@ -36,8 +36,8 @@ class ImageSearchRequestSerializer(
"""

# Ref: ingestion_server/ingestion_server/categorize.py#Category
categories = serializers.CharField(
label="categories",
category = serializers.CharField(
label="category",
help_text="A comma separated list of categories; available categories "
"include `illustration`, `photograph`, and "
"`digitized_artwork`.",
Expand Down