Generate type-safe hooks and unified docs from any OpenAPI spec — with code awareness. Built for React. SDKs are generated into node_modules (keep your repo clean).
paths:
/employee/{id}:
get:
operationId: getEmployee
parameters:
- in: path
name: id
required: true
schema: { type: string }
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
import { isPending, isError, isSuccess } from '@intrig/react';
import { useGetEmployee } from '@intrig/react/employee/client';
export default function EmployeeCard({ id }: { id: string }) {
// Stateful hook: [state, execute, clear]
const [state, getEmployee, clear] = useGetEmployee({
fetchOnMount: true,
clearOnUnmount: true,
params: { id },
});
if (isPending(state)) return <p>Loading…</p>;
if (isError(state)) return <p>Failed: {String(state.error)}</p>;
if (!isSuccess(state)) return null;
return (
<div className="card">
<h3>{state.data.name}</h3>
<div className="flex gap-2">
<button onClick={() => getEmployee({ id })}>Refresh</button>
<button onClick={clear}>Reset</button>
</div>
</div>
);
}
From code generation to searchable docs and a live workbench.
node_modules
(don’t commit generated code).Point Intrig at an OpenAPI doc and let it do the heavy lifting.
node_modules
for your app code (avoid committing generated code).Spin up typed hooks, searchable docs, and an engineer-friendly workbench in minutes.