Your OpenAPI client,kept current and checked in CI.

For maintainers whose OpenAPI contract changes, MetaEngine generates the client your repository commits and tells CI when that client no longer matches the contract.

petstore.yamlAngularservices/pets.service.ts 37ms recorded
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { BaseApiService } from './base-api.service';
import { Pet } from '../models/pet';
import { NewPet } from '../models/new-pet';

@Injectable()
export class PetsService extends BaseApiService {

  public listPets(limit?: number): Observable<Array<Pet>> {
    const paramObj: Record<string, unknown> = {};
    if (typeof limit !== 'undefined') paramObj['limit'] = limit;
    return this.execute<Array<Pet>>('/pets', undefined, { method: 'get', params: this.createParams(paramObj), headers: this.createHeaders({ }, 'application/json') });
  }

  public createPet(body: NewPet): Observable<void> {
    return this.execute<void>('/pets', body, { headers: this.createHeaders({ }, '') });
  }

  public getPet(petId: string): Observable<Pet> {
    return this.execute<Pet>(`/pets/${this.encodePathSegment(petId)}`, undefined, { method: 'get', headers: this.createHeaders({ }, 'application/json') });
  }
}

Keep an Angular Orders client current in CI

Use MetaEngine CLI 0.1.1 to keep a committed client in sync after a contract change.

  1. Generate and commit the client

    Save Orders v1 as contracts/orders.openapi.json in the example project. The installed CLI generates the client into src/api/generated.

    npm install --save-dev --save-exact @metaengine/cli@0.1.1
    ./node_modules/.bin/metaengine init --target openapi/angular --input contracts/orders.openapi.json --output src/api/generated
    ./node_modules/.bin/metaengine generate
    ./node_modules/.bin/metaengine check
    npm run typecheck

    Commit the OpenAPI file, generation config, npm lockfile and reviewed generated files.

  2. Detect drift in CI

    Orders v2 adds a required region query parameter. The GitHub Action, Azure Pipelines recipe and pre-commit hook run the repository’s installed CLI.

    cp ../fixtures/v2/openapi.json contracts/orders.openapi.json
    ./node_modules/.bin/metaengine check

    The CLI exits 1 and reports changed "services/orders.service.ts". The checkout stays untouched. A malformed contract exits 2.

  3. Regenerate and repair the caller

    ./node_modules/.bin/metaengine generate
    npm run typecheck

    TypeScript reports TS2554: Expected 2 arguments, but got 1. in src/orders.ts. Update the handwritten caller to pass orders.getOrder(id, region).

    ./node_modules/.bin/metaengine check
    npm run typecheck

    Both commands exit 0. Review and commit the contract, generated service and caller together.

Explore the OpenAPI to C# workflow

Compare generation, compilation and native behavior by specification and generator version in the release evidence.

Playground

One model. See the generated code.

Switch languages to see how MetaEngine expresses the same types from the playground's e-commerce model.

model · e-commerce preset
  • id: UUID
  • version: number
  • updatedAt: Date
  • title: string
  • description?: string
  • price: Money
  • status: ProductStatus
  • tags?: string[]
  • constructor(productId: UUID, quantity: number)
  • addedAt: Date
  • note?: string
  • amount: number
  • currency: string
  • value: string
  • id: Id
  • version: number
  • updatedAt: Date
  • items: T[]
  • cursor?: string
  • total: number
  • DRAFT = 0
  • ACTIVE = 1
  • ARCHIVED = 2
import { Versioned } from './versioned';
import { UUID } from './uuid';
import { Money } from './money';
import { ProductStatus } from './product-status.enum';

export class Product implements Versioned<UUID> {
  id!: UUID;
  version!: number;
  updatedAt!: Date;
  title!: string;
  price!: Money;
  status!: ProductStatus;
  description?: string;
  tags?: Array<string>;
}
Generate a Dart Dio client from OpenAPI
01 · Architecture

From contracts to generated code.

Every source format becomes the same typed graph. Everything after parsing is format-agnostic — which is why adding a new target or source doesn't force a rewrite of the other.

Sources
OpenAPI
REST · JSON Schema
GraphQL
SDL · operations
Protobuf
proto3 · services
SQL
DDL · schemas
Intermediate
IR
typed · resolved · language-agnostic
Targets
TypeScript
Python
Rust
Go
Java
C#
Swift
Kotlin
Scala
Groovy
PHP
Dart

In your repository

Follow a generated call, change its input or replay the same example with your own tools.

02 · Pipeline

Compile, don't template.

Four stages — each reasoning about code the way a senior engineer on that stack would, not a string-interpolation pass.

01
→

Parse.

OpenAPI, GraphQL, Protobuf and SQL converge on one unified AST. Everything after this is format-agnostic.

02
→

IR.

Names, references, type relationships and nullability are resolved semantically — not as strings.

03
→

Transform.

Language-specific passes shape the graph for each target, including Angular Signals, Python Pydantic v2 models and Go net/http clients.

04

Emit.

Target emitters write source code with their own layout and formatting rules.

Converter output languages
12
Distinct output languages across the browser converter catalog.
OpenAPI converter targets
11
Separate targets for Angular, React and Fetch all emit TypeScript.
Hosted type-graph languages
11
The Playground and MCP type-graph tools use this language set.
Status
Checking
Waiting for the API health probe.
04 · Principles

Generated code that reviews like hand-written code.

Three ground rules the engine holds to — so the output of MetaEngine stays legible, stable, and safe to regenerate.

Semantic.

The engine reasons about types, references and nullability — not character substitution. A Pet.id that is a UUID stays a UUID through every emitter.

Idiomatic.

Each target reads like code a senior engineer on that stack would ship: Angular inject(), React hooks, Python httpx, Go context, Rust Result<T, E>.

Regenerable.

Commit the contract, generation settings and reviewed output together. With a pinned generator, CI can check whether the committed client still matches the contract.