NgRx OpenAPI Generator
Generate fully-typed NgRx Signal Stores from your OpenAPI specifications.
What is it?
ngrx-openapi-gen transforms OpenAPI 3.x specs into NgRx Signal Stores using @angular-architects/ngrx-toolkit:
withResource- HTTP resources for GET operationswithMutations- Mutations for POST, PUT, DELETE- Type-safe models - TypeScript interfaces from schemas
Quick Example
Input (OpenAPI):
paths:
/api/tasks:
get:
tags: [Task]
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Task'
Output (Signal Store):
export const TaskStore = signalStore(
{ providedIn: 'root' },
withResource((store) => ({
tasks: httpResource<TaskModel[]>(
() => `${store._baseUrl}/api/tasks`,
{ defaultValue: [] }
)
}))
);
Architecture
Next Steps
- Installation - Set up the generator
- Quick Start - Generate your first stores
- Domain Generation - How domains are created
- Store API - Generated store features