Skip to content

[Feature Request] Improve request and response type properties optionality #113

@mderriey

Description

@mderriey

Is your feature request related to a problem? Please describe.

Most request and response types have all their properties defined as optional, which makes it hard to work against, as we often have to resort to using the null-forgiving operator !..

Describe the solution you'd like

Types should be typed according to the OpenAPI spec and/or the OpenAPI spec should be improved to reflect the correct optionality.

For example, the OpenAPI definition for TransactionResponse defines id, status, and operation as required, yet the corresponding TypeScript type defines all these 3 properties as optional:

export interface TransactionResponse {
    /**
     * ID of the transaction.
     * @type {string}
     * @memberof TransactionResponse
     */
    'id'?: string;
    /**
     * The primary status of the transaction. For details, see [Primary transaction statuses](https://developers.fireblocks.com/reference/primary-transaction-statuses).
     * @type {string}
     * @memberof TransactionResponse
     */
    'status'?: string;
    /**
     * 
     * @type {GetTransactionOperation}
     * @memberof TransactionResponse
     */
    'operation'?: GetTransactionOperation;
}

Additional context

N/A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions