API Generation
API generation reads a compiled manifest and produces REST API endpoints. Each entity in the manifest drives a set of CRUD routes.
Packages
text
@ikary/generator-nest : NestJS module, controller, and service generator (in progress)text
ikary-manifest-fastapi : FastAPI route generator (planned)What it generates
Given an entity in the manifest, the generator produces five endpoints per resource:
| Method | Path | Action |
|---|---|---|
GET | /resource | List with filtering and pagination |
GET | /resource/:id | Fetch a single record |
POST | /resource | Create a record |
PATCH | /resource/:id | Update a record |
DELETE | /resource/:id | Delete a record |
Role scopes from the manifest apply to each endpoint. A role with actions: [read] on an entity gets access to the GET endpoints only.
Routes follow the API Conventions.
Install
bash
pnpm add @ikary/generator-nestPythonPython support for this section is coming soon.
Node.js: NestJS generator
The NestJS generator reads a compiled manifest and produces NestJS modules, controllers, and services. It is in active development.
typescript
// Usage will be documented as the package stabilises.
import { generateNestApp } from '@ikary/generator-nest';Python: FastAPI generator
The FastAPI generator is planned. It will consume the same compiled manifest and produce FastAPI route definitions.
Related pages
- Runtime API: concept-level explanation
- API Conventions: route structure, request and response shapes, error taxonomy, pagination
- Entity Definition: fields, relations, lifecycle states, and access policies