Skip to content
New issue

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

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

Already on GitHub? # to your account

docs: add API response validation example to basic usage #3889

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

braden-w
Copy link
Contributor

@braden-w braden-w commented Dec 6, 2024

The Basic Usage section currently shows simple schema validation but doesn't demonstrate one of Zod's most common use cases: validating API responses. Since API validation is often the entry point for developers discovering Zod, adding this example early in the documentation helps readers understand a practical, real-world application.

The example demonstrates:

  • Schema definition
  • Type inference
  • Runtime validation
  • Async usage

This addition bridges the gap between the existing primitive examples and more complex use cases, providing a clear path for new users to understand Zod's value proposition.

Copy link

netlify bot commented Dec 6, 2024

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b6c623e
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/675368de0f558b00088ebb50
😎 Deploy Preview https://deploy-preview-3889--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@braden-w braden-w force-pushed the docs/add-validating-API-responses-section branch from d8d20a6 to 84e9526 Compare December 6, 2024 21:07
@braden-w braden-w force-pushed the docs/add-validating-API-responses-section branch from 84e9526 to b6c623e Compare December 6, 2024 21:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant