Skip to content

Add option to prepend "readonly" to all fields #627

Open
@Bluscream

Description

@Bluscream

This would be nice to ensure i don't accidentally try playing with values from responses but create my own local copy instead

Example:

start "" json2ts -i "schemas/pietsmiet.de/*.schema.json" -o "src/responses/pietsmiet.de/" --inferStringEnumKeysFromValues true --readonly true
export interface PietsmietDEConfig {
    readonly API: Record<string, Record<string, string>>;
    readonly URLs: Record<string, string>;
    readonly Limits: Record<string, number>;
    readonly Orders: Record<string, string>;
    readonly Platform: Record<string, string>;
    readonly Stream: Record<string, string>;
  }
...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions