From 8999159e2c97901502288ed7db0db4650a7799b8 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Fri, 24 May 2024 01:21:13 -0500 Subject: [PATCH 1/8] refactor(drf-spectacular): maintain operation order in `api.py` --- config/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config/settings.py b/config/settings.py index 5459cc7d..41433fd5 100755 --- a/config/settings.py +++ b/config/settings.py @@ -157,6 +157,7 @@ This API will always be publicly available and will never require any extensive Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI contributors***](https://github.com/PokeAPI/pokeapi#contributing) around the world. Pokémon and Pokémon character names are trademarks of Nintendo. """, + "SORT_OPERATIONS": False, "SERVERS": [{"url": "https://pokeapi.co"}], "EXTERNAL_DOCS": {"url": "https://pokeapi.co/docs/v2"}, "VERSION": "2.7.0", From 435545a0db6bfe3b9f52d1fa2b0360537db88e5b Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Fri, 24 May 2024 01:24:15 -0500 Subject: [PATCH 2/8] fix(drf-spectacular): use correct type (`Tag Object`), add descriptions, URLs --- config/settings.py | 90 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 11 deletions(-) diff --git a/config/settings.py b/config/settings.py index 41433fd5..812bba3e 100755 --- a/config/settings.py +++ b/config/settings.py @@ -165,16 +165,84 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "OAS_VERSION": "3.1.0", "COMPONENT_SPLIT_REQUEST": True, "TAGS": [ - "pokemon", - "evolution", - "berries", - "items", - "machines", - "location", - "contest", - "moves", - "encounters", - "games", - "utility", + { + "name": "pokemon", + "description": "Pokémon are the creatures that inhabit the world of the Pokémon games", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon" + } + }, + { + "name": "evolution", + "description": "Evolution (Japanese: 進化 evolution) is a process in which a Pokémon changes into a different species of Pokémon.", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Evolution" + } + }, + { + "name": "berries", + "description": "Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. As in the real world, a large variety exists in the Pokémon world, with a large range of flavors and effects", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Berry" + } + }, + { + "name": "items", + "description": "An item (Japanese: 道具 tool) is an object in the Pokémon games which the player can pick up, keep in their Bag, and use in some manner", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Item" + } + }, + { + "name": "machines", + "description": "Machines are the representation of items that teach moves to Pokémon.", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/TM" + } + }, + { + "name": "location", + "description": "Locations that can be visited within the games", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number" + } + }, + { + "name": "contest", + "description": "Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type of competition often contrasted with Pokémon battles and held in Contest Halls", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest" + } + }, + { + "name": "moves", + "description": "A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill Pokémon primarily use in battle.", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name" + + } + }, + { + "name": "encounters" + }, + { + "name": "games", + "description": "The Pokémon games are all video games in the Pokémon franchise.", + "externalDocs": { + "description": "Fine more info here", + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games" + } + }, + { + "name": "utility" + }, ], } From 7335327088bcf3e91adff2b89f3380377f281687 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Fri, 24 May 2024 01:26:24 -0500 Subject: [PATCH 3/8] docs(openapi): generate yaml --- openapi.yml | 1215 ++++++++++++++++++++++++++------------------------- 1 file changed, 629 insertions(+), 586 deletions(-) diff --git a/openapi.yml b/openapi.yml index e2c77654..92937cdf 100644 --- a/openapi.yml +++ b/openapi.yml @@ -120,6 +120,34 @@ paths: schema: $ref: '#/components/schemas/PaginatedBerrySummaryList' description: '' + /api/v2/berry/{id}/: + get: + operationId: berry_retrieve + 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. + summary: Get a berry + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - berries + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BerryDetail' + description: '' /api/v2/berry-firmness/: get: operationId: berry_firmness_list @@ -250,34 +278,6 @@ paths: schema: $ref: '#/components/schemas/BerryFlavorDetail' description: '' - /api/v2/berry/{id}/: - get: - operationId: berry_retrieve - 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. - summary: Get a berry - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - berries - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BerryDetail' - description: '' /api/v2/characteristic/: get: operationId: characteristic_list @@ -346,68 +346,6 @@ paths: schema: $ref: '#/components/schemas/CharacteristicDetail' description: '' - /api/v2/contest-effect/: - get: - operationId: contest_effect_list - description: Contest effects refer to the effects of moves when used in contests. - summary: List contest effects - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: q - schema: - type: string - description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ - Case-insensitive query applied on the `name` property. " - tags: - - contests - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedContestEffectSummaryList' - description: '' - /api/v2/contest-effect/{id}/: - get: - operationId: contest_effect_retrieve - description: Contest effects refer to the effects of moves when used in contests. - summary: Get contest effect - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - contests - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ContestEffectDetail' - description: '' /api/v2/contest-type/: get: operationId: contest_type_list @@ -474,6 +412,68 @@ paths: schema: $ref: '#/components/schemas/ContestTypeDetail' description: '' + /api/v2/contest-effect/: + get: + operationId: contest_effect_list + description: Contest effects refer to the effects of moves when used in contests. + summary: List contest effects + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: q + schema: + type: string + description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ + Case-insensitive query applied on the `name` property. " + tags: + - contests + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedContestEffectSummaryList' + description: '' + /api/v2/contest-effect/{id}/: + get: + operationId: contest_effect_retrieve + description: Contest effects refer to the effects of moves when used in contests. + summary: Get contest effect + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - contests + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ContestEffectDetail' + description: '' /api/v2/egg-group/: get: operationId: egg_group_list @@ -542,6 +542,70 @@ paths: schema: $ref: '#/components/schemas/EggGroupDetail' description: '' + /api/v2/encounter-method/: + get: + operationId: encounter_method_list + 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. + summary: List encounter methods + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: q + schema: + type: string + description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ + Case-insensitive query applied on the `name` property. " + tags: + - encounters + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEncounterMethodSummaryList' + description: '' + /api/v2/encounter-method/{id}/: + get: + operationId: encounter_method_retrieve + 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. + summary: Get encounter method + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - encounters + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EncounterMethodDetail' + description: '' /api/v2/encounter-condition/: get: operationId: encounter_condition_list @@ -580,6 +644,32 @@ paths: schema: $ref: '#/components/schemas/PaginatedEncounterConditionSummaryList' description: '' + /api/v2/encounter-condition/{id}/: + get: + operationId: encounter_condition_retrieve + description: Conditions which affect what pokemon might appear in the wild, + e.g., day or night. + summary: Get encounter condition + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - encounters + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EncounterConditionDetail' + description: '' /api/v2/encounter-condition-value/: get: operationId: encounter_condition_value_list @@ -644,96 +734,6 @@ paths: schema: $ref: '#/components/schemas/EncounterConditionValueDetail' description: '' - /api/v2/encounter-condition/{id}/: - get: - operationId: encounter_condition_retrieve - description: Conditions which affect what pokemon might appear in the wild, - e.g., day or night. - summary: Get encounter condition - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - encounters - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EncounterConditionDetail' - description: '' - /api/v2/encounter-method/: - get: - operationId: encounter_method_list - 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. - summary: List encounter methods - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: q - schema: - type: string - description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ - Case-insensitive query applied on the `name` property. " - tags: - - encounters - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedEncounterMethodSummaryList' - description: '' - /api/v2/encounter-method/{id}/: - get: - operationId: encounter_method_retrieve - 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. - summary: Get encounter method - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - encounters - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EncounterMethodDetail' - description: '' /api/v2/evolution-chain/: get: operationId: evolution_chain_list @@ -866,74 +866,6 @@ paths: schema: $ref: '#/components/schemas/EvolutionTriggerDetail' description: '' - /api/v2/gender/: - get: - operationId: gender_list - 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. - summary: List genders - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: q - schema: - type: string - description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ - Case-insensitive query applied on the `name` property. " - tags: - - pokemon - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedGenderSummaryList' - description: '' - /api/v2/gender/{id}/: - get: - operationId: gender_retrieve - 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. - summary: Get gender - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - pokemon - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GenderDetail' - description: '' /api/v2/generation/: get: operationId: generation_list @@ -1002,6 +934,74 @@ paths: schema: $ref: '#/components/schemas/GenerationDetail' description: '' + /api/v2/gender/: + get: + operationId: gender_list + 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. + summary: List genders + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: q + schema: + type: string + description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ + Case-insensitive query applied on the `name` property. " + tags: + - pokemon + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenderSummaryList' + description: '' + /api/v2/gender/{id}/: + get: + operationId: gender_retrieve + 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. + summary: Get gender + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - pokemon + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GenderDetail' + description: '' /api/v2/growth-rate/: get: operationId: growth_rate_list @@ -1107,50 +1107,13 @@ paths: schema: $ref: '#/components/schemas/PaginatedItemSummaryList' description: '' - /api/v2/item-attribute/: + /api/v2/item/{id}/: get: - operationId: item_attribute_list - description: Item attributes define particular aspects of items, e.g."usable - in battle" or "consumable". - summary: List item attributes - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: q - schema: - type: string - description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ - Case-insensitive query applied on the `name` property. " - tags: - - items - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedItemAttributeSummaryList' - description: '' - /api/v2/item-attribute/{id}/: - get: - operationId: item_attribute_retrieve - description: Item attributes define particular aspects of items, e.g."usable - in battle" or "consumable". - summary: Get item attribute + operationId: item_retrieve + 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. + summary: Get item parameters: - in: path name: id @@ -1169,7 +1132,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ItemAttributeDetail' + $ref: '#/components/schemas/ItemDetail' description: '' /api/v2/item-category/: get: @@ -1235,6 +1198,70 @@ paths: schema: $ref: '#/components/schemas/ItemCategoryDetail' description: '' + /api/v2/item-attribute/: + get: + operationId: item_attribute_list + description: Item attributes define particular aspects of items, e.g."usable + in battle" or "consumable". + summary: List item attributes + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: q + schema: + type: string + description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ + Case-insensitive query applied on the `name` property. " + tags: + - items + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedItemAttributeSummaryList' + description: '' + /api/v2/item-attribute/{id}/: + get: + operationId: item_attribute_retrieve + description: Item attributes define particular aspects of items, e.g."usable + in battle" or "consumable". + summary: Get item attribute + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - items + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ItemAttributeDetail' + description: '' /api/v2/item-fling-effect/: get: operationId: item_fling_effect_list @@ -1361,33 +1388,6 @@ paths: schema: $ref: '#/components/schemas/ItemPocketDetail' description: '' - /api/v2/item/{id}/: - get: - operationId: item_retrieve - 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. - summary: Get item - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - items - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ItemDetail' - description: '' /api/v2/language/: get: operationId: language_list @@ -1488,6 +1488,32 @@ paths: schema: $ref: '#/components/schemas/PaginatedLocationSummaryList' description: '' + /api/v2/location/{id}/: + get: + operationId: location_retrieve + description: Locations that can be visited within the games. Locations make + up sizable portions of regions, like cities or routes. + summary: Get location + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - location + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LocationDetail' + description: '' /api/v2/location-area/: get: operationId: location_area_list @@ -1546,32 +1572,6 @@ paths: schema: $ref: '#/components/schemas/LocationAreaDetail' description: '' - /api/v2/location/{id}/: - get: - operationId: location_retrieve - description: Locations that can be visited within the games. Locations make - up sizable portions of regions, like cities or routes. - summary: Get location - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - location - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LocationDetail' - description: '' /api/v2/machine/: get: operationId: machine_list @@ -1678,6 +1678,34 @@ paths: schema: $ref: '#/components/schemas/PaginatedMoveSummaryList' description: '' + /api/v2/move/{id}/: + get: + operationId: move_retrieve + 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. + summary: Get move + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - moves + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MoveDetail' + description: '' /api/v2/move-ailment/: get: operationId: move_ailment_list @@ -2058,34 +2086,6 @@ paths: schema: $ref: '#/components/schemas/MoveTargetDetail' description: '' - /api/v2/move/{id}/: - get: - operationId: move_retrieve - 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. - summary: Get move - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - moves - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MoveDetail' - description: '' /api/v2/nature/: get: operationId: nature_list @@ -2214,74 +2214,6 @@ paths: schema: $ref: '#/components/schemas/PalParkAreaDetail' description: '' - /api/v2/pokeathlon-stat/: - get: - operationId: pokeathlon_stat_list - 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. - summary: List pokeathlon stats - parameters: - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: q - schema: - type: string - description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ - Case-insensitive query applied on the `name` property. " - tags: - - pokemon - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedPokeathlonStatSummaryList' - description: '' - /api/v2/pokeathlon-stat/{id}/: - get: - operationId: pokeathlon_stat_retrieve - 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. - summary: Get pokeathlon stat - parameters: - - in: path - name: id - schema: - type: string - description: This parameter can be a string or an integer. - required: true - tags: - - pokemon - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PokeathlonStatDetail' - description: '' /api/v2/pokedex/: get: operationId: pokedex_list @@ -2394,6 +2326,36 @@ paths: schema: $ref: '#/components/schemas/PaginatedPokemonSummaryList' description: '' + /api/v2/pokemon/{id}/: + get: + operationId: pokemon_retrieve + 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. + summary: Get pokemon + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - pokemon + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PokemonDetail' + description: '' /api/v2/pokemon-color/: get: operationId: pokemon_color_list @@ -2724,16 +2686,54 @@ paths: schema: $ref: '#/components/schemas/PokemonSpeciesDetail' description: '' - /api/v2/pokemon/{id}/: + /api/v2/pokeathlon-stat/: get: - operationId: pokemon_retrieve - 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)) + operationId: pokeathlon_stat_list + 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. - summary: Get pokemon + summary: List pokeathlon stats + parameters: + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: q + schema: + type: string + description: "> Only available locally and not at [pokeapi.co](https://pokeapi.co/docs/v2)\n\ + Case-insensitive query applied on the `name` property. " + tags: + - pokemon + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPokeathlonStatSummaryList' + description: '' + /api/v2/pokeathlon-stat/{id}/: + get: + operationId: pokeathlon_stat_retrieve + 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. + summary: Get pokeathlon stat parameters: - in: path name: id @@ -2752,124 +2752,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PokemonDetail' - description: '' - /api/v2/pokemon/{pokemon_id}/encounters: - get: - operationId: pokemon_encounters_retrieve - description: Handles Pokemon Encounters as a sub-resource. - summary: Get pokemon encounter - parameters: - - in: path - name: pokemon_id - schema: - type: string - pattern: ^\d+$ - required: true - tags: - - encounters - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - '200': - content: - application/json: - schema: - type: array - items: - type: object - required: - - location_area - - version_details - properties: - location_area: - type: object - required: - - name - - url - properties: - name: - type: string - example: cerulean-city-area - url: - type: string - format: uri - example: https://pokeapi.co/api/v2/location-area/281/ - version_details: - type: array - items: - type: object - required: - - encounter_details - - max_chance - - version - properties: - encounter_details: - type: array - items: - type: object - required: - - chance - - condition_values - - max_level - - method - - min_level - properties: - chance: - type: number - example: 100 - condition_values: - type: array - items: - type: object - required: - - name - - url - properties: - name: - type: string - example: story-progress-beat-red - url: - type: string - format: uri - example: https://pokeapi.co/api/v2/encounter-condition-value/55/ - max_level: - type: number - example: 10 - method: - type: object - required: - - name - - url - properties: - name: - type: string - example: gift - url: - type: string - format: uri - example: https://pokeapi.co/api/v2/encounter-method/18/ - min_level: - type: number - example: 10 - max_chance: - type: number - example: 100 - version: - type: object - required: - - name - - url - properties: - name: - type: string - example: red - url: - type: string - format: uri - example: https://pokeapi.co/api/v2/version/1/ + $ref: '#/components/schemas/PokeathlonStatDetail' description: '' /api/v2/region/: get: @@ -3172,6 +3055,31 @@ paths: schema: $ref: '#/components/schemas/PaginatedVersionSummaryList' description: '' + /api/v2/version/{id}/: + get: + operationId: version_retrieve + description: Versions of the games, e.g., Red, Blue or Yellow. + summary: Get version + parameters: + - in: path + name: id + schema: + type: string + description: This parameter can be a string or an integer. + required: true + tags: + - games + security: + - cookieAuth: [] + - basicAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VersionDetail' + description: '' /api/v2/version-group/: get: operationId: version_group_list @@ -3234,20 +3142,20 @@ paths: schema: $ref: '#/components/schemas/VersionGroupDetail' description: '' - /api/v2/version/{id}/: + /api/v2/pokemon/{pokemon_id}/encounters: get: - operationId: version_retrieve - description: Versions of the games, e.g., Red, Blue or Yellow. - summary: Get version + operationId: pokemon_encounters_retrieve + description: Handles Pokemon Encounters as a sub-resource. + summary: Get pokemon encounter parameters: - in: path - name: id + name: pokemon_id schema: type: string - description: This parameter can be a string or an integer. + pattern: ^\d+$ required: true tags: - - games + - encounters security: - cookieAuth: [] - basicAuth: [] @@ -3257,7 +3165,99 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VersionDetail' + type: array + items: + type: object + required: + - location_area + - version_details + properties: + location_area: + type: object + required: + - name + - url + properties: + name: + type: string + example: cerulean-city-area + url: + type: string + format: uri + example: https://pokeapi.co/api/v2/location-area/281/ + version_details: + type: array + items: + type: object + required: + - encounter_details + - max_chance + - version + properties: + encounter_details: + type: array + items: + type: object + required: + - chance + - condition_values + - max_level + - method + - min_level + properties: + chance: + type: number + example: 100 + condition_values: + type: array + items: + type: object + required: + - name + - url + properties: + name: + type: string + example: story-progress-beat-red + url: + type: string + format: uri + example: https://pokeapi.co/api/v2/encounter-condition-value/55/ + max_level: + type: number + example: 10 + method: + type: object + required: + - name + - url + properties: + name: + type: string + example: gift + url: + type: string + format: uri + example: https://pokeapi.co/api/v2/encounter-method/18/ + min_level: + type: number + example: 10 + max_chance: + type: number + example: 100 + version: + type: object + required: + - name + - url + properties: + name: + type: string + example: red + url: + type: string + format: uri + example: https://pokeapi.co/api/v2/version/1/ description: '' components: schemas: @@ -9318,16 +9318,59 @@ components: servers: - url: https://pokeapi.co tags: -- pokemon -- evolution -- berries -- items -- machines -- location -- contest -- moves -- encounters -- games -- utility +- name: pokemon + description: Pokémon are the creatures that inhabit the world of the Pokémon games + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon +- name: evolution + description: 'Evolution (Japanese: 進化 evolution) is a process in which a Pokémon + changes into a different species of Pokémon.' + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Evolution +- name: berries + description: 'Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. + As in the real world, a large variety exists in the Pokémon world, with a large + range of flavors and effects' + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Berry +- name: items + description: 'An item (Japanese: 道具 tool) is an object in the Pokémon games which + the player can pick up, keep in their Bag, and use in some manner' + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Item +- name: machines + description: Machines are the representation of items that teach moves to Pokémon. + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/TM +- name: location + description: Locations that can be visited within the games + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number +- name: contest + description: 'Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type + of competition often contrasted with Pokémon battles and held in Contest Halls' + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest +- name: moves + description: 'A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ + attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill + Pokémon primarily use in battle.' + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name +- name: encounters +- name: games + description: The Pokémon games are all video games in the Pokémon franchise. + externalDocs: + description: Fine more info here + url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games +- name: utility externalDocs: url: https://pokeapi.co/docs/v2 From b06fd1bd36b33906d6bfa395b86dfcb06486eae5 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Sat, 25 May 2024 02:44:13 -0500 Subject: [PATCH 4/8] fix(fmt): run `make format` --- config/settings.py | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/config/settings.py b/config/settings.py index 812bba3e..5346d019 100755 --- a/config/settings.py +++ b/config/settings.py @@ -170,79 +170,74 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "description": "Pokémon are the creatures that inhabit the world of the Pokémon games", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon", + }, }, { "name": "evolution", "description": "Evolution (Japanese: 進化 evolution) is a process in which a Pokémon changes into a different species of Pokémon.", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Evolution" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/Evolution", + }, }, { "name": "berries", "description": "Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. As in the real world, a large variety exists in the Pokémon world, with a large range of flavors and effects", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Berry" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/Berry", + }, }, { "name": "items", "description": "An item (Japanese: 道具 tool) is an object in the Pokémon games which the player can pick up, keep in their Bag, and use in some manner", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Item" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/Item", + }, }, { "name": "machines", "description": "Machines are the representation of items that teach moves to Pokémon.", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/TM" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/TM", + }, }, { "name": "location", "description": "Locations that can be visited within the games", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number", + }, }, { "name": "contest", "description": "Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type of competition often contrasted with Pokémon battles and held in Contest Halls", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest" - } + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest", + }, }, { "name": "moves", "description": "A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill Pokémon primarily use in battle.", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name" - - } - }, - { - "name": "encounters" + "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name", + }, }, + {"name": "encounters"}, { "name": "games", "description": "The Pokémon games are all video games in the Pokémon franchise.", "externalDocs": { "description": "Fine more info here", - "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games" - } - }, - { - "name": "utility" + "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games", + }, }, + {"name": "utility"}, ], } From 843ff18385a1d0c85ab474e6c3fab187d77eda07 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Thu, 30 May 2024 23:42:14 -0500 Subject: [PATCH 5/8] fix: typo --- config/settings.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/settings.py b/config/settings.py index 5346d019..93b748a9 100755 --- a/config/settings.py +++ b/config/settings.py @@ -169,7 +169,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "pokemon", "description": "Pokémon are the creatures that inhabit the world of the Pokémon games", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon", }, }, @@ -177,7 +177,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "evolution", "description": "Evolution (Japanese: 進化 evolution) is a process in which a Pokémon changes into a different species of Pokémon.", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Evolution", }, }, @@ -185,7 +185,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "berries", "description": "Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. As in the real world, a large variety exists in the Pokémon world, with a large range of flavors and effects", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Berry", }, }, @@ -193,7 +193,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "items", "description": "An item (Japanese: 道具 tool) is an object in the Pokémon games which the player can pick up, keep in their Bag, and use in some manner", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Item", }, }, @@ -201,7 +201,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "machines", "description": "Machines are the representation of items that teach moves to Pokémon.", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/TM", }, }, @@ -209,7 +209,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "location", "description": "Locations that can be visited within the games", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number", }, }, @@ -217,7 +217,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "contest", "description": "Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type of competition often contrasted with Pokémon battles and held in Contest Halls", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest", }, }, @@ -225,7 +225,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "moves", "description": "A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill Pokémon primarily use in battle.", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name", }, }, @@ -234,7 +234,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "name": "games", "description": "The Pokémon games are all video games in the Pokémon franchise.", "externalDocs": { - "description": "Fine more info here", + "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games", }, }, From f3918c26cbcca725d0db17f34c7b5289b2cbcfb5 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Thu, 30 May 2024 23:58:29 -0500 Subject: [PATCH 6/8] docs: update tag descriptions --- config/settings.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/settings.py b/config/settings.py index 93b748a9..4456a88a 100755 --- a/config/settings.py +++ b/config/settings.py @@ -167,7 +167,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co "TAGS": [ { "name": "pokemon", - "description": "Pokémon are the creatures that inhabit the world of the Pokémon games", + "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.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon", @@ -175,7 +175,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "evolution", - "description": "Evolution (Japanese: 進化 evolution) is a process in which a Pokémon changes into a different species of Pokémon.", + "description": "Evolution is a process in which a Pokémon changes into a different species of Pokémon.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Evolution", @@ -183,7 +183,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "berries", - "description": "Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. As in the real world, a large variety exists in the Pokémon world, with a large range of flavors and effects", + "description": "Berries can be soft or hard. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) for greater detail.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Berry", @@ -191,7 +191,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "items", - "description": "An item (Japanese: 道具 tool) is an object in the Pokémon games which the player can pick up, keep in their Bag, and use in some manner", + "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.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Item", @@ -199,7 +199,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "machines", - "description": "Machines are the representation of items that teach moves to Pokémon.", + "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.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/TM", @@ -207,7 +207,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "location", - "description": "Locations that can be visited within the games", + "description": "Locations that can be visited within the games. Locations make up sizable portions of regions, like cities or routes.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number", @@ -215,7 +215,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "contest", - "description": "Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type of competition often contrasted with Pokémon battles and held in Contest Halls", + "description": "Pokémon Contests are a type of competition often contrasted with Pokémon battles and held in Contest Halls", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest", @@ -223,7 +223,7 @@ Created by [**Paul Hallett**(]https://github.com/phalt) and other [**PokéAPI co }, { "name": "moves", - "description": "A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill Pokémon primarily use in battle.", + "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.", "externalDocs": { "description": "Find more info here", "url": "https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name", From b036eacb86d46dfd9dc18f8b9f0b2972616c5d25 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Fri, 31 May 2024 00:16:39 -0500 Subject: [PATCH 7/8] docs(openapi): generate spec --- openapi.yml | 55 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/openapi.yml b/openapi.yml index 92937cdf..5e45840d 100644 --- a/openapi.yml +++ b/openapi.yml @@ -9319,57 +9319,66 @@ servers: - url: https://pokeapi.co tags: - name: pokemon - description: Pokémon are the creatures that inhabit the world of the Pokémon games + 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. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon - name: evolution - description: 'Evolution (Japanese: 進化 evolution) is a process in which a Pokémon - changes into a different species of Pokémon.' + description: Evolution is a process in which a Pokémon changes into a different + species of Pokémon. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Evolution - name: berries - description: 'Berries (Japanese: きのみ Tree Fruit) are small, juicy, fleshy fruit. - As in the real world, a large variety exists in the Pokémon world, with a large - range of flavors and effects' + description: Berries can be soft or hard. Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Category:Berries_by_firmness) + for greater detail. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Berry - name: items - description: 'An item (Japanese: 道具 tool) is an object in the Pokémon games which - the player can pick up, keep in their Bag, and use in some manner' + 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. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Item - name: machines 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. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/TM - name: location - description: Locations that can be visited within the games + description: Locations that can be visited within the games. Locations make up sizable + portions of regions, like cities or routes. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number - name: contest - description: 'Pokémon Contests (Japanese: ポケモンコンテスト Pokémon Contest) are a type - of competition often contrasted with Pokémon battles and held in Contest Halls' + description: Pokémon Contests are a type of competition often contrasted with Pokémon + battles and held in Contest Halls externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Contest - name: moves - description: 'A move (Japanese: わざ move), also known as an attack (Japanese: こうげきわざ - attack technique) or technique (Japanese: とくしゅわざ special technique), is the skill - Pokémon primarily use in battle.' + 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. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_name - name: encounters - name: games description: The Pokémon games are all video games in the Pokémon franchise. externalDocs: - description: Fine more info here + description: Find more info here url: https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_games - name: utility externalDocs: From 4e4de2d46e53db19e4e6efedf0f3863b17f52925 Mon Sep 17 00:00:00 2001 From: Naramsim Date: Sun, 2 Jun 2024 11:39:26 +0200 Subject: [PATCH 8/8] chore: prune images --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7fbb29be..2d081bd8 100755 --- a/Makefile +++ b/Makefile @@ -154,4 +154,5 @@ update-graphql-data-prod: make hasura-apply docker compose ${gql_compose_config} up --pull always -d web docker compose exec -T web sh -c 'rm -rf /tmp/cache/*' + docker image prune -af sync; echo 3 > /proc/sys/vm/drop_caches