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
Hi, would it be possible/a good idea to be able to import operations(endpoints) from an openapi specification and use it as a server action?
something like
import{createPost}from"../openapi.json"'use client'//<- is this even needed?exportdefaultfunctionClientComponent(){return<formaction={createPost}>{/* ... */}</form>}
I assume I culd just add "use server" on top of a generated list of typed fetchers, but then the fetch would would be executed on the server.
I want the fetch to be executed on the client, but no Idea if its feasable, or how complicated it would be
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
-
Hi, would it be possible/a good idea to be able to import operations(endpoints) from an openapi specification and use it as a server action?
something like
I assume I culd just add "use server" on top of a generated list of typed fetchers, but then the fetch would would be executed on the server.
I want the fetch to be executed on the client, but no Idea if its feasable, or how complicated it would be
Beta Was this translation helpful? Give feedback.
All reactions