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 const schemas #1551

Open
zumm opened this issue Jan 12, 2025 · 1 comment
Open

Support for const schemas #1551

zumm opened this issue Jan 12, 2025 · 1 comment
Labels
feature 🚀 New feature or request

Comments

@zumm
Copy link

zumm commented Jan 12, 2025

Description

According to this schemes like that is valid:

    schema:
        const: 
            result: "ERROR"
            error_code: "ERROR__PET_NOT_FOUND"

Would be nice to have it supported by openapi-ts.

@zumm zumm added the feature 🚀 New feature or request label Jan 12, 2025
@mrlubos
Copy link
Member

mrlubos commented Jan 12, 2025

Yep! I've recently added primitive constants in https://github.com/hey-api/openapi-ts/releases/tag/%40hey-api/openapi-ts%400.61.1, this would be the next iteration as well as arrays I think

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

No branches or pull requests

2 participants