MCPcopy Index your code
hub / github.com/PokeAPI/pokeapi / EvolutionChainDetailSerializer

Class EvolutionChainDetailSerializer

pokemon_v2/serializers.py:5539–5834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5537
5538
5539class EvolutionChainDetailSerializer(serializers.ModelSerializer):
5540 baby_trigger_item = ItemSummarySerializer()
5541 chain = serializers.SerializerMethodField("build_chain")
5542
5543 class Meta:
5544 model = EvolutionChain
5545 fields = ("id", "baby_trigger_item", "chain")
5546
5547 # TODO: Revisit Schema
5548 @extend_schema_field(
5549 field={
5550 "type": "object",
5551 "required": ["evolution_details", "evolves_to", "is_baby", "species"],
5552 "properties": {
5553 "evolution_details": {"type": "array", "items": {}, "examples": []},
5554 "evolves_to": {
5555 "type": "array",
5556 "items": {
5557 "type": "object",
5558 "required": [
5559 "evolution_details",
5560 "evolves_to",
5561 "is_baby",
5562 "species",
5563 ],
5564 "properties": {
5565 "evolution_details": {
5566 "type": "array",
5567 "items": {
5568 "type": "object",
5569 "required": [
5570 "gender",
5571 "held_item",
5572 "item",
5573 "known_move",
5574 "known_move_type",
5575 "location",
5576 "min_affection",
5577 "min_beauty",
5578 "min_happiness",
5579 "min_level",
5580 "needs_overworld_rain",
5581 "party_species",
5582 "party_type",
5583 "relative_physical_stats",
5584 "time_of_day",
5585 "trade_species",
5586 "trigger",
5587 "turn_upside_down",
5588 ],
5589 "properties": {
5590 "gender": {
5591 "type": "",
5592 "nullable": True,
5593 "type": "object",
5594 "required": ["name", "url"],
5595 "properties": {
5596 "name": {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected