Skip to content

Conversation

@Ryan-Amirthan
Copy link
Contributor

Summary

Updates the Schema component documentation to correct an inaccurate claim about type discovery. The previous documentation stated that "types exclusively used by websockets or webhooks won't be available," but after investigating the fern-platform codebase, I found that the IrGraph.build() method does include types from webhooks and websocket channels.

The actual limitation is that types must be defined as named schemas in the OpenAPI spec (under components/schemas) to be discoverable - inline schemas that aren't extracted as named types won't be available.

Review & Testing Checklist for Human

  • Verify the technical accuracy: Confirm that types from webhooks/websockets ARE actually discoverable by the Schema component. My investigation was code-based (looking at IrGraph.build() in fern-platform), not empirically tested.
  • Test with a real webhook type: Try using <Schema type="SomeWebhookType" /> with a type that's only referenced by a webhook to confirm it works.
  • Check if this addresses the original issue: The original issue was about Square's ACHDetails type not being found. The new docs suggest this is because it might be an inline schema - verify this is the actual root cause.

Notes

  • The user also requested "webhook examples" support, but my investigation showed webhook examples are already implemented in the codebase (WebhookExamplesClient.tsx, generateWebhookExample.ts). If webhook examples aren't appearing for Square, it may be a separate issue with their specific OpenAPI spec.
  • Link to Devin run: https://app.devin.ai/sessions/a6fc306d37b04ecd971cdc6505c302b5
  • Requested by: @Ryan-Amirthan

The documentation incorrectly stated that types exclusively used by
webhooks or websockets won't be available. After investigating the
fern-platform codebase, I found that:

1. Types from webhooks and websockets ARE included in the API definition
2. The IrGraph.build() method recursively adds types from endpoints,
   webhooks, and websocket channels
3. The actual limitation is that types must be defined as named schemas
   in the OpenAPI spec (under components/schemas) to be discoverable

This commit updates the documentation to accurately reflect the behavior.

Co-Authored-By: ryanstep@buildwithfern.com <ryanstep@umich.edu>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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