FlavorText documentation is incorrect
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- documentation
Research direction
Start with the FlavorText response model in src/docs/utility.json and compare its fields with the endpoint models in src/docs/contests.json and src/docs/pokemon.json. Remove version from FlavorText, add VersionFlavorText, and update the PokemonSpecies flavor_text_entries reference; done when the documented schemas match the referenced API schemas.
Written by the indexing model from the issue text.
Description
The documentation for the FlavorText type does not match its schema.
All referenced schema are from PokeAPI / api-data in the data/schema/v2 folder.
I have checked that the referenced schemas match the API results (for at least an id of 1).
The examples given in the documentation do match the schemas, so would not need changing.
Issue details
FlavorText is specified as having a version field, when most references to it do not have one.
The FlavorText type is documented as having three fields:
flavor_textlanguageversion
FlavorText is used in three endpoints (all under the field flavor_text_entries) in the documentation:
In the contest-effect and super-contest-effect endpoints, the value under flavor_text_entries does not have a version field (ie. it only has flavor_text and language fields).
In the pokemon-species endpoint, the value under flavor_text_entries does have a version field, so matches the online documentation.
Suggestion
Making a new VersionFlavorText type for use in the PokemonSpecies endpoint, and changing the FlavorText type to not have the version field.
The naming of this type would match the pattern of VersionGroupFlavorText type (which has the fields text, language, and version_group).
VersionGroupFlavorText is also only used once (in the item endpoint), so it seems reasonable to add VersionFlavorText in the utility section along with it. Alternatively, it could be added in the Pokemon group under the PokemonSpecies endpoint.
This would affect:
- /src/docs/utility.json
- Remove
versionfield from the FlavorText type response model (link to line) - Add a VersionFlavorText type identical to the current FlavorText type (with
flavor_text,language, andversionfields) (link to line)
- Remove
- /src/docs/contests.json
- Change type of
flavor_text_entriesfield in the PokemonSpecies response model from list of FlavorText to list of VersionFlavorText (link to line)
- Change type of
- Dominant language
- JavaScript
- Stars
- 159
- Forks
- 63
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 3
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PokeAPI/pokeapi.co
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
PokeAPI/pokeapi.co#171 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
PokeAPI/pokeapi.co#162 · 20 comments · 1 reaction ·
-
Edit this pageOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
PokeAPI/pokeapi.co#12 · 2 comments · 1 reaction ·
All issues in PokeAPI/pokeapi.co
Similar issues
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
amponce/archive-movie-browser#354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
saayam-for-all/webapp#1870 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Imageomics/OpenCite#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
chr15m/twiiit.com#20 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
antropos17/Aegis#629 ·
Maintainers usually reply within 4 days