Skip to content

FlavorText documentation is incorrect #166

@heathercallear

Description

@heathercallear

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_text
  • language
  • version

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions