Skip to content
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

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

Merged
merged 9 commits into from
Jun 2, 2024

Conversation

Indyandie
Copy link
Contributor

@Indyandie Indyandie commented May 24, 2024

  • Fix tag type
  • Set SORT_OPERATIONS to False

Related to #1087

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

@Naramsim
Copy link
Member

Hi, my question was a bit different.

Is it possible not to write a hardcoded string but to fetch the descriptions with code from the api.py file? I see that settings.py is a Python file, so it should be possible to write Python code and maybe import the api.py file and get the descriptions.

@Indyandie
Copy link
Contributor Author

Indyandie commented Jun 1, 2024

@Naramsim I see... that sounds pretty doable but I'm total python noob 🤓. I think the duplication is okay in this instance since tags and operations are distinct concepts.

@Naramsim
Copy link
Member

Naramsim commented Jun 2, 2024

Ok! I'll merge this PR, but if you have time and will maybe you can look into how to dynamically get the description

@Naramsim Naramsim merged commit fa6ccb6 into PokeAPI:master Jun 2, 2024
3 checks passed
@pokeapi-machine-user
Copy link

A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data.

The staging branch will be deployed in our staging environment and the entire API will be ready to review.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

@pokeapi-machine-user
Copy link

The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data.

The Pull Request can be seen deployed in our staging environment when CircleCI deploy will be finished (check the start time of the last build).

Naramsim pushed a commit to PokeAPI/api-data that referenced this pull request Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants