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

fix: wrap properties beginning with a number in quotes #247

Merged

Conversation

tillschweneker
Copy link
Contributor

When a property starts with a number, e.g. 1st, instead of first, the generated Zod-Schema is corrupt.

The change in the wrapWithQuotesIfNeeded method makes sure, that any property starting with a number is wrapped in quotes.

Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openapi-zod-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 10:23am

@astahmer
Copy link
Owner

astahmer commented Dec 4, 2023

hey, LGTM ! could you add a test & a changeset ?

@tillschweneker
Copy link
Contributor Author

@astahmer Done 👍

@astahmer astahmer merged commit 1e1dcd8 into astahmer:main Dec 5, 2023
7 checks passed
@github-actions github-actions bot mentioned this pull request Dec 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants