fix(oas): define id path parameter

This commit is contained in:
indyandie 2024-05-10 00:04:44 -05:00
parent a8d24a493f
commit 03237957fc
No known key found for this signature in database
GPG key ID: FDB83C1AED3933E1
2 changed files with 295 additions and 212 deletions

View file

@ -58,8 +58,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this ability. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -150,8 +150,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this berry firmness. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- berries - berries
@ -210,8 +210,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this berry flavor. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- berries - berries
@ -238,8 +238,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this berry. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- berries - berries
@ -300,8 +300,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this characteristic. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -356,8 +356,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this contest effect. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- contests - contests
@ -416,8 +416,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this contest type. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- contests - contests
@ -478,8 +478,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this egg group. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -568,8 +568,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this encounter condition value. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- encounters - encounters
@ -594,8 +594,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this encounter condition. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- encounters - encounters
@ -652,8 +652,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this encounter method. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- encounters - encounters
@ -712,8 +712,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this evolution chain. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- evolution - evolution
@ -772,8 +772,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this evolution trigger. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- evolution - evolution
@ -834,8 +834,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this gender. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -896,8 +896,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this generation. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- games - games
@ -956,8 +956,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this growth rate. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -1047,8 +1047,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this item attribute. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- items - items
@ -1105,8 +1105,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this item category. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- items - items
@ -1163,8 +1163,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this item fling effect. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- items - items
@ -1219,8 +1219,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this item pocket. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- items - items
@ -1246,8 +1246,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this item. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- items - items
@ -1302,8 +1302,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this language. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- utility - utility
@ -1392,8 +1392,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this location area. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- location - location
@ -1418,8 +1418,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this location. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- location - location
@ -1478,8 +1478,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this machine. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- machines - machines
@ -1572,8 +1572,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move meta ailment. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1630,8 +1630,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move battle style. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1686,8 +1686,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move meta category. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1742,8 +1742,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move damage class. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -1798,8 +1798,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move learn method. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1856,8 +1856,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move target. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1884,8 +1884,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this move. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- moves - moves
@ -1942,8 +1942,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this nature. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2000,8 +2000,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pal park area. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- location - location
@ -2062,8 +2062,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokeathlon stat. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2126,8 +2126,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokedex. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- games - games
@ -2224,8 +2224,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon color. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2286,8 +2286,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon form. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2344,8 +2344,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon habitat. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2400,8 +2400,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon shape. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2462,8 +2462,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon species. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2492,8 +2492,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this pokemon. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2669,8 +2669,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this region. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- location - location
@ -2729,8 +2729,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this stat. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2787,8 +2787,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this super contest effect. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- contests - contests
@ -2849,8 +2849,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this type. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- pokemon - pokemon
@ -2936,8 +2936,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this version group. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- games - games
@ -2961,8 +2961,8 @@ paths:
- in: path - in: path
name: id name: id
schema: schema:
type: integer type: string
description: A unique integer value identifying this version. description: This parameter can be a string or an integer.
required: true required: true
tags: tags:
- games - games
@ -3140,28 +3140,16 @@ components:
maxLength: 100 maxLength: 100
growth_time: growth_time:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
max_harvest: max_harvest:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
natural_gift_power: natural_gift_power:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
size: size:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
smoothness: smoothness:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
soil_dryness: soil_dryness:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
firmness: firmness:
$ref: '#/components/schemas/BerryFirmnessSummary' $ref: '#/components/schemas/BerryFirmnessSummary'
flavors: flavors:
@ -3410,12 +3398,8 @@ components:
readOnly: true readOnly: true
appeal: appeal:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
jam: jam:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
effect_entries: effect_entries:
type: array type: array
items: items:
@ -3683,8 +3667,6 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
names: names:
type: array type: array
items: items:
@ -3998,12 +3980,8 @@ components:
properties: properties:
level: level:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
experience: experience:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
required: required:
- experience - experience
- level - level
@ -4354,14 +4332,10 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
fling_power: fling_power:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
fling_effect: fling_effect:
$ref: '#/components/schemas/ItemFlingEffectSummary' $ref: '#/components/schemas/ItemFlingEffectSummary'
attributes: attributes:
@ -4602,8 +4576,6 @@ components:
properties: properties:
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
generation: generation:
$ref: '#/components/schemas/GenerationSummary' $ref: '#/components/schemas/GenerationSummary'
required: required:
@ -4744,8 +4716,6 @@ components:
maxLength: 100 maxLength: 100
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
encounter_method_rates: encounter_method_rates:
type: array type: array
items: items:
@ -4982,8 +4952,6 @@ components:
properties: properties:
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
generation: generation:
$ref: '#/components/schemas/GenerationSummary' $ref: '#/components/schemas/GenerationSummary'
required: required:
@ -5088,20 +5056,14 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
power: power:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
pp: pp:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
effect_chance: effect_chance:
type: integer type: integer
effect_entries: effect_entries:
@ -5223,28 +5185,20 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
effect_chance: effect_chance:
type: integer type: integer
pp: pp:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
priority: priority:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
power: power:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
contest_combos: contest_combos:
type: object type: object
required: required:
@ -5656,62 +5610,42 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
max_hits: max_hits:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
min_turns: min_turns:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
max_turns: max_turns:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
drain: drain:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
healing: healing:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
crit_rate: crit_rate:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
ailment_chance: ailment_chance:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
flinch_chance: flinch_chance:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
stat_chance: stat_chance:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
required: required:
- ailment - ailment
- category - category
@ -5929,12 +5863,8 @@ components:
properties: properties:
low_hp_preference: low_hp_preference:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
high_hp_preference: high_hp_preference:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
move_battle_style: move_battle_style:
$ref: '#/components/schemas/MoveBattleStyleSummary' $ref: '#/components/schemas/MoveBattleStyleSummary'
required: required:
@ -7356,28 +7286,20 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
height: height:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
is_default: is_default:
type: boolean type: boolean
order: order:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
weight: weight:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
abilities: abilities:
type: array type: array
items: items:
@ -7765,14 +7687,10 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
form_order: form_order:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
is_default: is_default:
type: boolean type: boolean
is_battle_only: is_battle_only:
@ -7923,8 +7841,6 @@ components:
properties: properties:
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
version: version:
$ref: '#/components/schemas/VersionSummary' $ref: '#/components/schemas/VersionSummary'
required: required:
@ -8080,26 +7996,18 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
gender_rate: gender_rate:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
capture_rate: capture_rate:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
base_happiness: base_happiness:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
is_baby: is_baby:
type: boolean type: boolean
is_legendary: is_legendary:
@ -8110,8 +8018,6 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
has_gender_differences: has_gender_differences:
type: boolean type: boolean
forms_switchable: forms_switchable:
@ -8329,12 +8235,8 @@ components:
properties: properties:
base_stat: base_stat:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
effort: effort:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
stat: stat:
$ref: '#/components/schemas/StatSummary' $ref: '#/components/schemas/StatSummary'
required: required:
@ -8443,8 +8345,6 @@ components:
maxLength: 100 maxLength: 100
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
is_battle_only: is_battle_only:
type: boolean type: boolean
affecting_moves: affecting_moves:
@ -8604,8 +8504,6 @@ components:
readOnly: true readOnly: true
appeal: appeal:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
flavor_text_entries: flavor_text_entries:
type: array type: array
items: items:
@ -8965,8 +8863,6 @@ components:
properties: properties:
game_index: game_index:
type: integer type: integer
maximum: 2147483647
minimum: -2147483648
generation: generation:
$ref: '#/components/schemas/GenerationSummary' $ref: '#/components/schemas/GenerationSummary'
required: required:
@ -9023,8 +8919,6 @@ components:
type: type:
- integer - integer
- 'null' - 'null'
maximum: 2147483647
minimum: -2147483648
generation: generation:
$ref: '#/components/schemas/GenerationSummary' $ref: '#/components/schemas/GenerationSummary'
move_learn_methods: move_learn_methods:

View file

@ -50,16 +50,6 @@ class NameOrIdRetrieval:
return queryset return queryset
@extend_schema(
parameters=[
OpenApiParameter(
name="id",
description="This parameter can be a string or an integer.",
location=OpenApiParameter.PATH,
type=OpenApiTypes.STR,
),
]
)
def get_object(self): def get_object(self):
queryset = self.get_queryset() queryset = self.get_queryset()
queryset = self.filter_queryset(queryset) queryset = self.filter_queryset(queryset)
@ -91,6 +81,13 @@ class PokeapiCommonViewset(
# APIS # # APIS #
########## ##########
retrieve_path_parameter = OpenApiParameter(
name="id",
description="This parameter can be a string or an integer.",
location=OpenApiParameter.PATH,
type=OpenApiTypes.STR,
required=True,
)
@extend_schema( @extend_schema(
description="Abilities provide passive effects for Pokémon in battle or in the overworld. Pokémon have multiple possible abilities but can have only one ability at a time. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail.", description="Abilities provide passive effects for Pokémon in battle or in the overworld. Pokémon have multiple possible abilities but can have only one ability at a time. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail.",
@ -101,6 +98,10 @@ class AbilityResource(PokeapiCommonViewset):
serializer_class = AbilityDetailSerializer serializer_class = AbilityDetailSerializer
list_serializer_class = AbilitySummarySerializer list_serializer_class = AbilitySummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Berries are small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by Pokémon. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.", description="Berries are small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by Pokémon. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail.",
@ -117,6 +118,10 @@ class BerryResource(PokeapiCommonViewset):
serializer_class = BerryDetailSerializer serializer_class = BerryDetailSerializer
list_serializer_class = BerrySummarySerializer list_serializer_class = BerrySummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Berries can be soft or hard. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.", description="Berries can be soft or hard. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.",
@ -133,6 +138,10 @@ class BerryFirmnessResource(PokeapiCommonViewset):
serializer_class = BerryFirmnessDetailSerializer serializer_class = BerryFirmnessDetailSerializer
list_serializer_class = BerryFirmnessSummarySerializer list_serializer_class = BerryFirmnessSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on their **nature**. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.", description="Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on their **nature**. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Flavor) for greater detail.",
@ -149,6 +158,10 @@ class BerryFlavorResource(PokeapiCommonViewset):
serializer_class = BerryFlavorDetailSerializer serializer_class = BerryFlavorDetailSerializer
list_serializer_class = BerryFlavorSummarySerializer list_serializer_class = BerryFlavorSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Characteristics indicate which stat contains a Pokémon's highest IV. A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Characteristic) for greater detail.", description="Characteristics indicate which stat contains a Pokémon's highest IV. A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Characteristic) for greater detail.",
@ -165,6 +178,10 @@ class CharacteristicResource(PokeapiCommonViewset):
serializer_class = CharacteristicDetailSerializer serializer_class = CharacteristicDetailSerializer
list_serializer_class = CharacteristicSummarySerializer list_serializer_class = CharacteristicSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Contest effects refer to the effects of moves when used in contests.", description="Contest effects refer to the effects of moves when used in contests.",
@ -181,6 +198,10 @@ class ContestEffectResource(PokeapiCommonViewset):
serializer_class = ContestEffectDetailSerializer serializer_class = ContestEffectDetailSerializer
list_serializer_class = ContestEffectSummarySerializer list_serializer_class = ContestEffectSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Contest types are categories judges used to weigh a Pokémon's condition in Pokémon contests. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Contest_condition) for greater detail.", description="Contest types are categories judges used to weigh a Pokémon's condition in Pokémon contests. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Contest_condition) for greater detail.",
@ -197,6 +218,10 @@ class ContestTypeResource(PokeapiCommonViewset):
serializer_class = ContestTypeDetailSerializer serializer_class = ContestTypeDetailSerializer
list_serializer_class = ContestTypeSummarySerializer list_serializer_class = ContestTypeSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Egg Groups are categories which determine which Pokémon are able to interbreed. Pokémon may belong to either one or two Egg Groups. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Egg_Group) for greater detail.", description="Egg Groups are categories which determine which Pokémon are able to interbreed. Pokémon may belong to either one or two Egg Groups. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Egg_Group) for greater detail.",
@ -213,6 +238,10 @@ class EggGroupResource(PokeapiCommonViewset):
serializer_class = EggGroupDetailSerializer serializer_class = EggGroupDetailSerializer
list_serializer_class = EggGroupSummarySerializer list_serializer_class = EggGroupSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Conditions which affect what pokemon might appear in the wild, e.g., day or night.", description="Conditions which affect what pokemon might appear in the wild, e.g., day or night.",
@ -229,6 +258,10 @@ class EncounterConditionResource(PokeapiCommonViewset):
serializer_class = EncounterConditionDetailSerializer serializer_class = EncounterConditionDetailSerializer
list_serializer_class = EncounterConditionSummarySerializer list_serializer_class = EncounterConditionSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Encounter condition values are the various states that an encounter condition can have, i.e., time of day can be either day or night.", description="Encounter condition values are the various states that an encounter condition can have, i.e., time of day can be either day or night.",
@ -245,6 +278,10 @@ class EncounterConditionValueResource(PokeapiCommonViewset):
serializer_class = EncounterConditionValueDetailSerializer serializer_class = EncounterConditionValueDetailSerializer
list_serializer_class = EncounterConditionValueSummarySerializer list_serializer_class = EncounterConditionValueSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Methods by which the player might can encounter Pokémon in the wild, e.g., walking in tall grass. Check out Bulbapedia for greater detail.", description="Methods by which the player might can encounter Pokémon in the wild, e.g., walking in tall grass. Check out Bulbapedia for greater detail.",
@ -261,6 +298,10 @@ class EncounterMethodResource(PokeapiCommonViewset):
serializer_class = EncounterMethodDetailSerializer serializer_class = EncounterMethodDetailSerializer
list_serializer_class = EncounterMethodSummarySerializer list_serializer_class = EncounterMethodSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Evolution chains are essentially family trees. They start with the lowest stage within a family and detail evolution conditions for each as well as Pokémon they can evolve into up through the hierarchy.", description="Evolution chains are essentially family trees. They start with the lowest stage within a family and detail evolution conditions for each as well as Pokémon they can evolve into up through the hierarchy.",
@ -277,6 +318,10 @@ class EvolutionChainResource(PokeapiCommonViewset):
serializer_class = EvolutionChainDetailSerializer serializer_class = EvolutionChainDetailSerializer
list_serializer_class = EvolutionChainSummarySerializer list_serializer_class = EvolutionChainSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Evolution triggers are the events and conditions that cause a Pokémon to evolve. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Methods_of_evolution) for greater detail.", description="Evolution triggers are the events and conditions that cause a Pokémon to evolve. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Methods_of_evolution) for greater detail.",
@ -293,6 +338,10 @@ class EvolutionTriggerResource(PokeapiCommonViewset):
serializer_class = EvolutionTriggerDetailSerializer serializer_class = EvolutionTriggerDetailSerializer
list_serializer_class = EvolutionTriggerSummarySerializer list_serializer_class = EvolutionTriggerSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include. In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released.", description="A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include. In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released.",
@ -309,6 +358,10 @@ class GenerationResource(PokeapiCommonViewset):
serializer_class = GenerationDetailSerializer serializer_class = GenerationDetailSerializer
list_serializer_class = GenerationSummarySerializer list_serializer_class = GenerationSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Genders were introduced in Generation II for the purposes of breeding Pokémon but can also result in visual differences or even different evolutionary lines. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Gender) for greater detail.", description="Genders were introduced in Generation II for the purposes of breeding Pokémon but can also result in visual differences or even different evolutionary lines. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Gender) for greater detail.",
@ -325,6 +378,10 @@ class GenderResource(PokeapiCommonViewset):
serializer_class = GenderDetailSerializer serializer_class = GenderDetailSerializer
list_serializer_class = GenderSummarySerializer list_serializer_class = GenderSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Growth rates are the speed with which Pokémon gain levels through experience. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Experience) for greater detail.", description="Growth rates are the speed with which Pokémon gain levels through experience. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Experience) for greater detail.",
@ -341,6 +398,10 @@ class GrowthRateResource(PokeapiCommonViewset):
serializer_class = GrowthRateDetailSerializer serializer_class = GrowthRateDetailSerializer
list_serializer_class = GrowthRateSummarySerializer list_serializer_class = GrowthRateSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="An item is an object in the games which the player can pick up, keep in their bag, and use in some manner. They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area.", description="An item is an object in the games which the player can pick up, keep in their bag, and use in some manner. They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area.",
@ -357,6 +418,10 @@ class ItemResource(PokeapiCommonViewset):
serializer_class = ItemDetailSerializer serializer_class = ItemDetailSerializer
list_serializer_class = ItemSummarySerializer list_serializer_class = ItemSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Item categories determine where items will be placed in the players bag.", description="Item categories determine where items will be placed in the players bag.",
@ -373,6 +438,10 @@ class ItemCategoryResource(PokeapiCommonViewset):
serializer_class = ItemCategoryDetailSerializer serializer_class = ItemCategoryDetailSerializer
list_serializer_class = ItemCategorySummarySerializer list_serializer_class = ItemCategorySummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description='Item attributes define particular aspects of items, e.g."usable in battle" or "consumable".', description='Item attributes define particular aspects of items, e.g."usable in battle" or "consumable".',
@ -389,6 +458,10 @@ class ItemAttributeResource(PokeapiCommonViewset):
serializer_class = ItemAttributeDetailSerializer serializer_class = ItemAttributeDetailSerializer
list_serializer_class = ItemAttributeSummarySerializer list_serializer_class = ItemAttributeSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description='The various effects of the move"Fling" when used with different items.', description='The various effects of the move"Fling" when used with different items.',
@ -405,6 +478,10 @@ class ItemFlingEffectResource(PokeapiCommonViewset):
serializer_class = ItemFlingEffectDetailSerializer serializer_class = ItemFlingEffectDetailSerializer
list_serializer_class = ItemFlingEffectSummarySerializer list_serializer_class = ItemFlingEffectSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Pockets within the players bag used for storing items by category.", description="Pockets within the players bag used for storing items by category.",
@ -421,6 +498,10 @@ class ItemPocketResource(PokeapiCommonViewset):
serializer_class = ItemPocketDetailSerializer serializer_class = ItemPocketDetailSerializer
list_serializer_class = ItemPocketSummarySerializer list_serializer_class = ItemPocketSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Languages for translations of API resource information.", description="Languages for translations of API resource information.",
@ -437,6 +518,10 @@ class LanguageResource(PokeapiCommonViewset):
serializer_class = LanguageDetailSerializer serializer_class = LanguageDetailSerializer
list_serializer_class = LanguageSummarySerializer list_serializer_class = LanguageSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Locations that can be visited within the games. Locations make up sizable portions of regions, like cities or routes.", description="Locations that can be visited within the games. Locations make up sizable portions of regions, like cities or routes.",
@ -453,6 +538,10 @@ class LocationResource(PokeapiCommonViewset):
serializer_class = LocationDetailSerializer serializer_class = LocationDetailSerializer
list_serializer_class = LocationSummarySerializer list_serializer_class = LocationSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Location areas are sections of areas, such as floors in a building or cave. Each area has its own set of possible Pokémon encounters.", description="Location areas are sections of areas, such as floors in a building or cave. Each area has its own set of possible Pokémon encounters.",
@ -469,6 +558,10 @@ class LocationAreaResource(ListOrDetailSerialRelation, viewsets.ReadOnlyModelVie
serializer_class = LocationAreaDetailSerializer serializer_class = LocationAreaDetailSerializer
list_serializer_class = LocationAreaSummarySerializer list_serializer_class = LocationAreaSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Machines are the representation of items that teach moves to Pokémon. They vary from version to version, so it is not certain that one specific TM or HM corresponds to a single Machine.", description="Machines are the representation of items that teach moves to Pokémon. They vary from version to version, so it is not certain that one specific TM or HM corresponds to a single Machine.",
@ -485,6 +578,10 @@ class MachineResource(PokeapiCommonViewset):
serializer_class = MachineDetailSerializer serializer_class = MachineDetailSerializer
list_serializer_class = MachineSummarySerializer list_serializer_class = MachineSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Moves are the skills of Pokémon in battle. In battle, a Pokémon uses one move each turn. Some moves (including those learned by Hidden Machine) can be used outside of battle as well, usually for the purpose of removing obstacles or exploring new areas.", description="Moves are the skills of Pokémon in battle. In battle, a Pokémon uses one move each turn. Some moves (including those learned by Hidden Machine) can be used outside of battle as well, usually for the purpose of removing obstacles or exploring new areas.",
@ -501,6 +598,10 @@ class MoveResource(PokeapiCommonViewset):
serializer_class = MoveDetailSerializer serializer_class = MoveDetailSerializer
list_serializer_class = MoveSummarySerializer list_serializer_class = MoveSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Damage classes moves can have, e.g. physical, special, or non-damaging.", description="Damage classes moves can have, e.g. physical, special, or non-damaging.",
@ -517,6 +618,10 @@ class MoveDamageClassResource(PokeapiCommonViewset):
serializer_class = MoveDamageClassDetailSerializer serializer_class = MoveDamageClassDetailSerializer
list_serializer_class = MoveDamageClassSummarySerializer list_serializer_class = MoveDamageClassSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Move Ailments are status conditions caused by moves used during battle. See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Status_condition) for greater detail.", description="Move Ailments are status conditions caused by moves used during battle. See [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Status_condition) for greater detail.",
@ -533,6 +638,10 @@ class MoveMetaAilmentResource(PokeapiCommonViewset):
serializer_class = MoveMetaAilmentDetailSerializer serializer_class = MoveMetaAilmentDetailSerializer
list_serializer_class = MoveMetaAilmentSummarySerializer list_serializer_class = MoveMetaAilmentSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Styles of moves when used in the Battle Palace. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Battle_Frontier_(Generation_III)) for greater detail.", description="Styles of moves when used in the Battle Palace. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Battle_Frontier_(Generation_III)) for greater detail.",
@ -549,6 +658,10 @@ class MoveBattleStyleResource(PokeapiCommonViewset):
serializer_class = MoveBattleStyleDetailSerializer serializer_class = MoveBattleStyleDetailSerializer
list_serializer_class = MoveBattleStyleSummarySerializer list_serializer_class = MoveBattleStyleSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Very general categories that loosely group move effects.", description="Very general categories that loosely group move effects.",
@ -565,6 +678,10 @@ class MoveMetaCategoryResource(PokeapiCommonViewset):
serializer_class = MoveMetaCategoryDetailSerializer serializer_class = MoveMetaCategoryDetailSerializer
list_serializer_class = MoveMetaCategorySummarySerializer list_serializer_class = MoveMetaCategorySummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Methods by which Pokémon can learn moves.", description="Methods by which Pokémon can learn moves.",
@ -581,6 +698,10 @@ class MoveLearnMethodResource(PokeapiCommonViewset):
serializer_class = MoveLearnMethodDetailSerializer serializer_class = MoveLearnMethodDetailSerializer
list_serializer_class = MoveLearnMethodSummarySerializer list_serializer_class = MoveLearnMethodSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Targets moves can be directed at during battle. Targets can be Pokémon, environments or even other moves.", description="Targets moves can be directed at during battle. Targets can be Pokémon, environments or even other moves.",
@ -597,6 +718,10 @@ class MoveTargetResource(PokeapiCommonViewset):
serializer_class = MoveTargetDetailSerializer serializer_class = MoveTargetDetailSerializer
list_serializer_class = MoveTargetSummarySerializer list_serializer_class = MoveTargetSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Natures influence how a Pokémon's stats grow. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Nature) for greater detail.", description="Natures influence how a Pokémon's stats grow. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Nature) for greater detail.",
@ -613,6 +738,10 @@ class NatureResource(PokeapiCommonViewset):
serializer_class = NatureDetailSerializer serializer_class = NatureDetailSerializer
list_serializer_class = NatureSummarySerializer list_serializer_class = NatureSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Areas used for grouping Pokémon encounters in Pal Park. They're like habitats that are specific to Pal Park.", description="Areas used for grouping Pokémon encounters in Pal Park. They're like habitats that are specific to Pal Park.",
@ -629,6 +758,10 @@ class PalParkAreaResource(PokeapiCommonViewset):
serializer_class = PalParkAreaDetailSerializer serializer_class = PalParkAreaDetailSerializer
list_serializer_class = PalParkAreaSummarySerializer list_serializer_class = PalParkAreaSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Pokeathlon Stats are different attributes of a Pokémon's performance in Pokéathlons. In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.", description="Pokeathlon Stats are different attributes of a Pokémon's performance in Pokéathlons. In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9athlon) for greater detail.",
@ -645,6 +778,10 @@ class PokeathlonStatResource(PokeapiCommonViewset):
serializer_class = PokeathlonStatDetailSerializer serializer_class = PokeathlonStatDetailSerializer
list_serializer_class = PokeathlonStatSummarySerializer list_serializer_class = PokeathlonStatSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="A Pokédex is a handheld electronic encyclopedia device; one which is capable of recording and retaining information of the various Pokémon in a given region with the exception of the national dex and some smaller dexes related to portions of a region. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pokedex) for greater detail.", description="A Pokédex is a handheld electronic encyclopedia device; one which is capable of recording and retaining information of the various Pokémon in a given region with the exception of the national dex and some smaller dexes related to portions of a region. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pokedex) for greater detail.",
@ -661,6 +798,10 @@ class PokedexResource(PokeapiCommonViewset):
serializer_class = PokedexDetailSerializer serializer_class = PokedexDetailSerializer
list_serializer_class = PokedexSummarySerializer list_serializer_class = PokedexSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Colors used for sorting Pokémon in a Pokédex. The color listed in the Pokédex is usually the color most apparent or covering each Pokémon's body. No orange category exists; Pokémon that are primarily orange are listed as red or brown.", description="Colors used for sorting Pokémon in a Pokédex. The color listed in the Pokédex is usually the color most apparent or covering each Pokémon's body. No orange category exists; Pokémon that are primarily orange are listed as red or brown.",
@ -677,6 +818,10 @@ class PokemonColorResource(PokeapiCommonViewset):
serializer_class = PokemonColorDetailSerializer serializer_class = PokemonColorDetailSerializer
list_serializer_class = PokemonColorSummarySerializer list_serializer_class = PokemonColorSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Some Pokémon may appear in one of multiple, visually different forms. These differences are purely cosmetic. For variations within a Pokémon species, which do differ in more than just visuals, the 'Pokémon' entity is used to represent such a variety.", description="Some Pokémon may appear in one of multiple, visually different forms. These differences are purely cosmetic. For variations within a Pokémon species, which do differ in more than just visuals, the 'Pokémon' entity is used to represent such a variety.",
@ -693,6 +838,10 @@ class PokemonFormResource(PokeapiCommonViewset):
serializer_class = PokemonFormDetailSerializer serializer_class = PokemonFormDetailSerializer
list_serializer_class = PokemonFormSummarySerializer list_serializer_class = PokemonFormSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Habitats are generally different terrain Pokémon can be found in but can also be areas designated for rare or legendary Pokémon.", description="Habitats are generally different terrain Pokémon can be found in but can also be areas designated for rare or legendary Pokémon.",
@ -709,6 +858,10 @@ class PokemonHabitatResource(PokeapiCommonViewset):
serializer_class = PokemonHabitatDetailSerializer serializer_class = PokemonHabitatDetailSerializer
list_serializer_class = PokemonHabitatSummarySerializer list_serializer_class = PokemonHabitatSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Shapes used for sorting Pokémon in a Pokédex.", description="Shapes used for sorting Pokémon in a Pokédex.",
@ -725,6 +878,10 @@ class PokemonShapeResource(PokeapiCommonViewset):
serializer_class = PokemonShapeDetailSerializer serializer_class = PokemonShapeDetailSerializer
list_serializer_class = PokemonShapeSummarySerializer list_serializer_class = PokemonShapeSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Pokémon are the creatures that inhabit the world of the Pokémon games. They can be caught using Pokéballs and trained by battling with other Pokémon. Each Pokémon belongs to a specific species but may take on a variant which makes it differ from other Pokémon of the same species, such as base stats, available abilities and typings. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_(species)) for greater detail.", description="Pokémon are the creatures that inhabit the world of the Pokémon games. They can be caught using Pokéballs and trained by battling with other Pokémon. Each Pokémon belongs to a specific species but may take on a variant which makes it differ from other Pokémon of the same species, such as base stats, available abilities and typings. See [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_(species)) for greater detail.",
@ -741,6 +898,10 @@ class PokemonResource(PokeapiCommonViewset):
serializer_class = PokemonDetailSerializer serializer_class = PokemonDetailSerializer
list_serializer_class = PokemonSummarySerializer list_serializer_class = PokemonSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="A Pokémon Species forms the basis for at least one Pokémon. Attributes of a Pokémon species are shared across all varieties of Pokémon within the species. A good example is Wormadam; Wormadam is the species which can be found in three different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant.", description="A Pokémon Species forms the basis for at least one Pokémon. Attributes of a Pokémon species are shared across all varieties of Pokémon within the species. A good example is Wormadam; Wormadam is the species which can be found in three different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant.",
@ -757,6 +918,10 @@ class PokemonSpeciesResource(PokeapiCommonViewset):
serializer_class = PokemonSpeciesDetailSerializer serializer_class = PokemonSpeciesDetailSerializer
list_serializer_class = PokemonSpeciesSummarySerializer list_serializer_class = PokemonSpeciesSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="A region is an organized area of the Pokémon world. Most often, the main difference between regions is the species of Pokémon that can be encountered within them.", description="A region is an organized area of the Pokémon world. Most often, the main difference between regions is the species of Pokémon that can be encountered within them.",
@ -773,6 +938,10 @@ class RegionResource(PokeapiCommonViewset):
serializer_class = RegionDetailSerializer serializer_class = RegionDetailSerializer
list_serializer_class = RegionSummarySerializer list_serializer_class = RegionSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Stats determine certain aspects of battles. Each Pokémon has a value for each stat which grows as they gain levels and can be altered momentarily by effects in battles.", description="Stats determine certain aspects of battles. Each Pokémon has a value for each stat which grows as they gain levels and can be altered momentarily by effects in battles.",
@ -789,6 +958,10 @@ class StatResource(PokeapiCommonViewset):
serializer_class = StatDetailSerializer serializer_class = StatDetailSerializer
list_serializer_class = StatSummarySerializer list_serializer_class = StatSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Super contest effects refer to the effects of moves when used in super contests.", description="Super contest effects refer to the effects of moves when used in super contests.",
@ -805,6 +978,10 @@ class SuperContestEffectResource(PokeapiCommonViewset):
serializer_class = SuperContestEffectDetailSerializer serializer_class = SuperContestEffectDetailSerializer
list_serializer_class = SuperContestEffectSummarySerializer list_serializer_class = SuperContestEffectSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Types are properties for Pokémon and their moves. Each type has three properties: which types of Pokémon it is super effective against, which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.", description="Types are properties for Pokémon and their moves. Each type has three properties: which types of Pokémon it is super effective against, which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against.",
@ -821,6 +998,10 @@ class TypeResource(PokeapiCommonViewset):
serializer_class = TypeDetailSerializer serializer_class = TypeDetailSerializer
list_serializer_class = TypeSummarySerializer list_serializer_class = TypeSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Versions of the games, e.g., Red, Blue or Yellow.", description="Versions of the games, e.g., Red, Blue or Yellow.",
@ -837,6 +1018,10 @@ class VersionResource(PokeapiCommonViewset):
serializer_class = VersionDetailSerializer serializer_class = VersionDetailSerializer
list_serializer_class = VersionSummarySerializer list_serializer_class = VersionSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Version groups categorize highly similar versions of the games.", description="Version groups categorize highly similar versions of the games.",
@ -853,6 +1038,10 @@ class VersionGroupResource(PokeapiCommonViewset):
serializer_class = VersionGroupDetailSerializer serializer_class = VersionGroupDetailSerializer
list_serializer_class = VersionGroupSummarySerializer list_serializer_class = VersionGroupSummarySerializer
@extend_schema(parameters=[retrieve_path_parameter])
def retrieve(self, request, pk=None):
return super().retrieve(request, pk)
@extend_schema( @extend_schema(
description="Handles Pokemon Encounters as a sub-resource.", description="Handles Pokemon Encounters as a sub-resource.",