Skip to content

fix(openapi): use correct tag type, maintain operation order #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 75 additions & 11 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,87 @@

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",
"SERVE_INCLUDE_SCHEMA": False,
"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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR!

I see that we have this description in the api.py file as well:

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.",

Would it be possible to use that one so to avoid duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naramsim Which tag description, pokemon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naramsim I updated the tag descriptions with the ones from the API. Let me know if you see any that I missed.

},
},
{
"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"},
],
}
Loading