Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Using number | null ends up in an error #60

@PeterMK85

Description

@PeterMK85

Hey 👋

I think I faced with a possible issue, the source type generated by the swagger-typescript-api package.

Steps to reproduce

  • Have a type with a nullable field:
    Failing Example:
    export interface ExampleKey {
    /** @format int64 */
    activeUntil: number | null;
    allowExportDashboard: boolean;
    email: string;
    firstName?: string;
    isValid: boolean;
    lastName?: string;
    }

If the ... | null removed, the mock will be created as expected.

Errors:

Online interface will throw the following error:
m[a] is not a function

CLI will throw the following error:
Unsupported Primitive type 173

Is it something expected or it is a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions