You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing an API that accepts callback URLs from clients, I'd like type-safe support for making requests to those callbacks using the schema defined in the OpenAPI spec's callbacks section.
Use case:
My server exposes an endpoint where clients register a callback URL:
Later, my server needs to POST to that callback URL with the EventPayload shape. I'd like openapi-fetch to help me make that outbound request with type checking against the callback schema.
Question:
Is this already achievable with the current types generated by openapi-typescript? If so, what's the recommended pattern?
If not, would you be open to supporting this use case? I'm happy to contribute but wanted to check interest and get design guidance before starting.
Context:
This is for server-to-server scenarios where openapi-fetch is used on the backend to call external services (including client-provided callback URLs).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
When implementing an API that accepts callback URLs from clients, I'd like type-safe support for making requests to those callbacks using the schema defined in the OpenAPI spec's
callbackssection.Use case:
My server exposes an endpoint where clients register a callback URL:
Later, my server needs to POST to that callback URL with the
EventPayloadshape. I'd like openapi-fetch to help me make that outbound request with type checking against the callback schema.Question:
Is this already achievable with the current types generated by openapi-typescript? If so, what's the recommended pattern?
If not, would you be open to supporting this use case? I'm happy to contribute but wanted to check interest and get design guidance before starting.
Context:
This is for server-to-server scenarios where openapi-fetch is used on the backend to call external services (including client-provided callback URLs).
Beta Was this translation helpful? Give feedback.
All reactions