PokeAPI / pokedex-promise-v2

An easy way to use pokeapi v2 with promises in node.js
MIT License
510 stars 89 forks source link

OfficialArtwork interface is missing the `front_shiny` property #71

Closed AdoryVo closed 1 year ago

AdoryVo commented 1 year ago

The OfficialArtwork interface is missing the front_shiny property that the API data schema now specifies as of 3 months ago (see blame). Looking through the blame, it looks like this is the only schema change to the Pokemon types since types were last generated in December, but there may be other schemas that have changed. Thanks!

Current interface

https://github.com/PokeAPI/pokedex-promise-v2/blob/341b433f87c4ae02605b066f0697aecbe14c8290/types/index.d.ts#L1353-L1355

API data schema

"official-artwork": {
    "properties": {
        "front_default": {
            "type": [
                "null",
                "string"
            ]
        },
        "front_shiny": {
            "type": [
                "null",
                "string"
            ]
        }
    },
    "required": [
        "front_default",
        "front_shiny"
    ],
    "type": "object"
}

https://github.com/PokeAPI/api-data/blob/0fad6c2b908f2de8c1f314cb0206e70f7e09fb8a/data/schema/v2/pokemon/%24id/index.json#L288-L308

Example

"official-artwork": {
    "front_default": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/1.png",
    "front_shiny": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/shiny/1.png"
}

https://github.com/PokeAPI/api-data/blob/0fad6c2b908f2de8c1f314cb0206e70f7e09fb8a/data/api/v2/pokemon/1/index.json#L11229-L11231

HRKings commented 1 year ago

Thanks for the input! I'm looking into regenerating the types using the latest schema