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

Adds YAML to Zod Schema, YAML category #376

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thatrobotdev
Copy link

  • Adds a YAML to Zod Schema transformer by first converting the YAML to JSON using the same method as the YAML to JSON transformer, then converting the JSON to Zod Schema using the same method as the JSON to Zod Schema transformer.
  • Creates a new YAML category in the sidebar

Problems with this PR ;)

The implementation in this PR works, but has some minor flaws that I need help fixing! It could be merged as is with these caveats:

  • Doesn't define packageName or packageUrl in routes.tsx because it uses both the packages json-to-zod and yaml.
    • To fix: Add a way to credit two packages at once, or implement a package that does a direct YAML to Zod Schema conversion.
  • Reuses code from YamlToJson() and JsonToZod() without importing them.
    • To fix: Importing the functions YamlToJson() and JsonToZod() directly instead of being made up of their code.

- Adds a YAML to Zod Schema transformer by first converting the YAML to JSON using the same method as the YAML to JSON transformer, then converting the JSON to Zod Schema using the same method as the JSON to Zod Schema transformer.
- Creates a new YAML category in the sidebar
@vercel
Copy link

vercel bot commented Sep 2, 2023

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

Name Status Preview Comments Updated (UTC)
transform ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2024 10:06am

Comment on lines -390 to -391
label: "TOML to YAML",
path: "/toml-to-yaml"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been removed ?

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.

None yet

2 participants