Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple types in asType #2140

Open
air2 opened this issue Dec 20, 2024 · 1 comment
Open

Support for multiple types in asType #2140

air2 opened this issue Dec 20, 2024 · 1 comment

Comments

@air2
Copy link

air2 commented Dec 20, 2024

I would like support for:

export interface IPageSizeConfig {
    /**
     * @description The number of records to return in a single page.
     * @asType number | string
     */
    page_size?: number,
}

And I do not mind to specify ["number", "string"] or some other syntax to support multiple types.
Currently it's always escaped and put directly in the type value of the JSON schema, but the JSON Schema support arrays for types so it would be great if this would be supported.

Anyway thanks for all the work so far, it's really a cool library.

@domoritz
Copy link
Member

Makes sense. Can you send a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants