-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hey! I have an internal integration of coingecko api in my company code and I wanted to migrate our api calls to use this sdk but it does seem like all of the records keys from the response types are optional, and while it's probably safe to assume a lot of keys are optional, some of them do not make sense to be optional ie:
export interface CoinGetIDResponse {
/**
* coin ID
*/
id?: string;
...Other example below. I don't get how id, name or symbol can be optional here.
export type ListGetResponse = Array<ListGetResponse.ListGetResponseItem>;
export namespace ListGetResponse {
export interface ListGetResponseItem {
/**
* coin ID
*/
id?: string;
/**
* coin name
*/
name?: string;
/**
* coin asset platform and contract address
*/
platforms?: { [key: string]: string };
/**
* coin symbol
*/
symbol?: string;
}
}If there is no concept of required fields it makes the client code that much more complicated if we even need to check if the id exists on the coin in the response. If there is anything I can do to help out lmk but I took a look at the code and those types seem to be autogenerated so they will need to be fixed in the api source code probably.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working