glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL

Home Page:https://app.quicktype.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript: patterns in keys like `Id` or `Ids` are uppercased after transformation

timagixe opened this issue · comments

Hi there!

I have found your service pretty useful. Thank you!

Working with typescript and converting massive JSONs to TS types I have found the following issue:

JSON keys that have id or ids in its name like below:

{
    "localeId": [1, 2],
    "localeIds": [1, 2]
}

Are uppercased after transformation to a TS type.

export interface Pokedex {
    localeID:  number[];
    localeIDS: number[];
}

This behavior is not expected. (i.e. in JS / JS PropTypes it is not observed)