30 KiB
OpenAPI Generator: HttpApi Output Mode
Summary
Add a third format mode to @effect/openapi-generator that emits a full
effect/unstable/httpapi module with supporting runtime schemas. Replace the
current --type-only CLI flag with --format httpclient | httpclient-type-only | httpapi, keeping httpclient as the default.
The new httpapi format must generate:
- supporting
Schemaruntime declarations and exported types - an exported
class <Name> extends HttpApi.make("<Name>") {}root API declaration named from--name - generated
HttpApiGroup/HttpApiEndpointstructure - generated placeholder security declarations, but not security layer implementations
- explicit warnings for lossy mappings and skipped operations
Background
The package at packages/tools/openapi-generator already parses OpenAPI and
renders two HttpClient-oriented outputs. The Effect repository also already
contains OpenApi.fromApi(api), so the missing piece is OpenAPI -> HttpApi
code generation.
Goals
- Add
httpapias a first-class generator format without regressing current HttpClient generation. - Reuse the existing schema generation path for supporting schemas and component handling.
- Preserve OpenAPI metadata where
HttpApican represent it directly. - Emit deterministic warnings for every lossy or skipped feature approved during discovery.
- Keep the design maintainable by separating HttpApi rendering concerns from HttpClient rendering concerns.
Non-goals
- Implementing runtime security middleware layers.
- Modeling SSE /
text/event-streamin generated HttpApi output. - Modeling response headers in generated HttpApi output.
- Modeling ordinary non-security cookie parameters.
- Supporting request bodies on
GET,HEAD,OPTIONS, orTRACE.
User-confirmed product decisions
Output modes
- Replace
typeOnly: booleanand--type-onlywith an explicit format enum. - Supported output values:
httpclient,httpclient-type-only,httpapi. - Default output remains
httpclient. - The
nameoption controls both the exported HttpApi class name and the string passed toHttpApi.make(name).
Grouping
- Use the first OpenAPI tag as the owning
HttpApiGroupwhen tags are present. - If an operation has no tags, place it in a generated fallback group with
topLevel: true. - If multiple tags are present, keep the first and drop the rest with a warning.
Lossy / unsupported feature policy
- Generate security declarations, but do not implement them.
- Drop non-security cookie parameters with a warning.
- Skip SSE endpoints with a warning.
- Ignore response headers with a warning.
- Approximate optional request bodies by adding a no-content payload alternative.
- Best-effort map
defaultresponses to numeric statuses with a warning. - For OpenAPI security AND requirements, generate a plain
HttpApiMiddlewareplaceholder instead, with a warning. - If a no-body method defines a request body, skip the operation with a warning.
Public API changes
Replace the generator options with an explicit format mode:
export type OpenApiGeneratorFormat = "httpclient" | "httpclient-type-only" | "httpapi"
export interface OpenApiGeneratorWarning {
readonly code:
| "cookie-parameter-dropped"
| "additional-tags-dropped"
| "sse-operation-skipped"
| "response-headers-ignored"
| "optional-request-body-approximated"
| "default-response-remapped"
| "security-and-downgraded"
| "no-body-method-request-body-skipped"
| "naming-collision"
readonly message: string
readonly path?: string | undefined
readonly method?: OpenAPISpecMethodName | undefined
readonly operationId?: string | undefined
}
export interface OpenApiGenerateOptions {
readonly name: string
readonly format: OpenApiGeneratorFormat
readonly onEnter?: ((js: JsonSchema.JsonSchema) => JsonSchema.JsonSchema) | undefined
readonly onWarning?: ((warning: OpenApiGeneratorWarning) => void) | undefined
}
Requirements:
typeOnlyis removed from the public API.- The CLI prints warnings to stderr-equivalent output only; stdout remains the generated source.
- Existing HttpClient behavior must remain byte-for-byte stable except for the migrated option shape.
- Task 1 must update all downstream callers of
OpenApiGenerator.generate, includingpackages/tools/ai-codegen, so type checking remains green at every task boundary. - The package description / CLI help text should be updated from client-specific wording to output-neutral wording before final release.
Generated HttpApi source shape
The httpapi format must generate one compilable module containing:
- imports for
Schema,HttpApi,HttpApiGroup,HttpApiEndpoint,HttpApiSchema,HttpApiSecurity,HttpApiMiddleware, andOpenApi - supporting schema class / runtime-schema declarations
- generated security scheme constants
- generated placeholder middleware classes
- group builders
export class <Name> extends HttpApi.make("<Name>") {}with subsequent chained.annotate(...)/.add(...)composition applied to the class value
The output should remain deterministic and string-testable, matching the style of the existing generator tests.
Schema declaration style for httpapi
To keep generated HttpApi declarations ergonomic while avoiding Schema.Opaque, supporting schemas in httpapi format should use class declarations for struct-like schemas and runtime-schema declarations for non-struct schemas.
Rules:
-
Prefer
class X extends Schema.Class<X>("X")({ ... }) {}for object / struct-like schemas. -
For non-struct schemas that cannot use
Schema.Class, emit a runtime schema declaration plus a paired type alias, for example:export const SomeType = Schema.Literals([1, 2, 3]) export type SomeType = typeof SomeType.Type -
httpapigeneration must not emitSchema.Opaquewrappers. -
The generated HttpApi graph must reference these runtime schema values directly.
-
The generator should avoid exposing plain structural type aliases in HttpApi mode beyond
typeof <Schema>.Typealiases needed to bind names for declaration exports.
Mapping specification
1. API-level metadata
| OpenAPI | HttpApi output |
|---|---|
info.title |
.annotate(OpenApi.Title, ...) |
info.version |
.annotate(OpenApi.Version, ...) |
info.description |
.annotate(OpenApi.Description, ...) |
info.summary |
.annotate(OpenApi.Summary, ...) |
info.license |
.annotate(OpenApi.License, ...) |
servers |
.annotate(OpenApi.Servers, ...) |
Rules:
- The exported class name and
HttpApi.make(...)identifier come fromoptions.name, notinfo.title. - Global OpenAPI security must be normalized into effective per-operation security before rendering so operation-level
security: []can clear inherited security.
2. Group mapping
- First tag wins ownership.
- Untagged operations are placed in
HttpApiGroup.make("default", { topLevel: true }). - If tag metadata exists in
spec.tags, mapdescriptionandexternalDocsto group annotations. - If later operations force a naming collision after sanitization, suffix deterministically and emit a
naming-collisionwarning.
3. Endpoint identity and annotations
- Endpoint names use the current generator strategy:
operationIdwhen present, otherwise a deterministic method/path-derived identifier. - Preserve the original
operationIdwith.annotate(OpenApi.Identifier, originalOperationId). - Map
summary,description,deprecated, andexternalDocsto the matching endpoint annotations.
4. Parameters
in: path-> endpointparams, converting/pets/{id}to/pets/:id.in: query-> endpointquery.in: header-> endpointheaders.in: cookie-> drop and warn unless the cookie arrives through a security scheme.- Required query / header params become required properties in the assembled parameter schema; optional params become optional properties.
- Unsupported serialization styles or explode behaviors should be approximated only when they already align with the generator's current object-schema assembly; otherwise drop or degrade with a warning rather than silently inventing semantics.
- Warnings for dropped parameters should be emitted once per dropped parameter, in source order.
5. Request bodies
Supported request body mappings:
| OpenAPI content type | HttpApi output |
|---|---|
application/json |
plain schema |
multipart/form-data |
schema piped through HttpApiSchema.asMultipart() |
application/x-www-form-urlencoded |
schema piped through HttpApiSchema.asFormUrlEncoded() |
text/plain |
schema piped through HttpApiSchema.asText() |
application/octet-stream |
schema piped through HttpApiSchema.asUint8Array() |
| custom JSON/text/binary variants | matching HttpApiSchema.as*({ contentType }) helper |
Rules:
- Treat
application/*+jsonas JSON-like,text/*as text-like, andapplication/octet-streamas binary. Other unsupported media types should be dropped with a warning. - Multiple supported media types may be emitted as an array payload in stable input order.
- If
requestBody.required === false, add a no-content payload alternative and emitoptional-request-body-approximated. - If a no-body method defines a request body, skip the operation and emit
no-body-method-request-body-skipped.
6. Responses
- Status codes below 400 become success schemas; 400+ become error schemas.
- Empty responses become
HttpApiSchema.Empty(status)or an equivalent convenience helper. application/json,application/x-www-form-urlencoded,text/plain,application/octet-stream,application/*+json, andtext/*responses must be mapped to representableHttpApiSchemaencodings. Unsupported media types should be dropped with a warning. Multipart responses are unsupported and should be warned about if encountered.- If a successful
text/event-streamresponse is present, skip the entire operation and emitsse-operation-skipped. - If response headers are present, ignore them and emit
response-headers-ignoredwhile keeping the operation. Emit one warning per affected response object. - If a
defaultresponse is present, remap it with warning: use500when any explicit success response exists, otherwise use200. After remapping, classify it as success or error using the remapped numeric code.
7. Security
Additional security rules:
- Preserve bearer format metadata with
HttpApiSecurity.annotate(OpenApi.Format, bearerFormat)when present. - Unsupported security scheme types (such as OAuth2, OpenID Connect, or mutual TLS) must be dropped with a warning; the warning code can use a generic unsupported-feature style extension if the final implementation chooses to broaden the warning enum.
security: []clears inherited security.- A security requirement object equal to
{}means no auth required and must not generate middleware. - For arrays mixing OR-compatible entries and AND entries, keep the OR-compatible entries and downgrade each AND entry independently with warnings rather than downgrading the whole operation.
- Security warning payloads should include the affected scheme name when available.
Security scheme declarations:
| OpenAPI scheme | HttpApi output |
|---|---|
| HTTP bearer | HttpApiSecurity.bearer |
| HTTP basic | HttpApiSecurity.basic |
| apiKey header/query/cookie | HttpApiSecurity.apiKey({ key, in }) |
Rules:
- If a scheme has a description, preserve it with
HttpApiSecurity.annotate(OpenApi.Description, ...). - Resolve effective security per operation after inheritance / override.
- For OR requirement sets made of single-scheme requirement objects, generate one placeholder security middleware class per distinct effective security spec, with a
securityobject containing the referenced schemes, and reuse that middleware across endpoints that share the same spec. - For AND requirements (multiple schemes in one requirement object), generate one plain
HttpApiMiddleware.Serviceplaceholder per distinct requirement spec, without asecurityobject, and emitsecurity-and-downgraded. - Do not generate any middleware implementation layer.
8. Naming rules
- Reuse the current schema naming strategy for generated supporting schema declarations, but emit them as
Schema.Classdeclarations (struct-like) or runtime schema +typeof ...Typealiases (non-struct) inhttpapiformat. - Sanitize helper declaration names to valid TS identifiers.
- Preserve original OpenAPI names inside runtime values where possible, such as group identifiers, original operation IDs, and security scheme keys.
- On collisions after sanitization, append deterministic suffixes using
Name2,Name3, and so on, and emitnaming-collision. - The
--namevalue must be a valid exported TypeScript class identifier; invalid values should fail fast rather than being silently rewritten.
Internal design
- Keep one
OpenApiGenerator.generateentry point but convert it into a format dispatcher. - Replace the current HttpClient-specific inline parse assumptions with a richer parsed model that carries tags, request bodies by content type, responses by status/content type, default responses, metadata, cookies, and effective security.
- Add a dedicated
HttpApiTransformer.tsrenderer rather than extendingOpenApiTransformer.tsinto a mixed-responsibility file. The renderer must emit the root API asexport class <Name> extends HttpApi.make("<Name>") {}rather thanexport const <Name> = .... 3a. Extend schema rendering sohttpapiformat can emitSchema.Classdeclarations for struct-like schemas and runtime-schema declarations +typeof ...Typealiases for non-struct schemas, instead of relying onSchema.Opaquewrappers. - Route all lossy decisions through one warning helper that forwards structured warnings through
options.onWarning. Warning emission must be stable and ordered by source traversal. - Keep the existing HttpClient renderer behavior stable on top of the richer parsed model.
- Order generated output deterministically: imports, schema exports, security constants, middleware declarations, helper declarations, group/api assembly.
- Prefer a round-trip invariant where representable features from the source OpenAPI document survive through generated HttpApi and back through
OpenApi.fromApias closely as possible.
Testing requirements
Extend packages/tools/openapi-generator/test/OpenApiGenerator.test.ts to cover:
format: "httpclient"regression coverageformat: "httpclient-type-only"regression coverage- basic
httpapigeneration for tagged operations - top-level fallback group generation for untagged operations
- endpoint annotations
- request body encodings: json, multipart, form-urlencoded, text, binary
- response encodings: json, text, binary, empty responses
- optional request body approximation
- warning emission for default remapping, cookies, extra tags, SSE skip, response headers, no-body request-body skip, AND security downgrade, and naming collisions
- security declaration and placeholder middleware generation
Add CLI-focused coverage proving:
--format httpclientselects runtime client generation--format httpclient-type-onlyselects type-only generation--format httpapiselects HttpApi generation- legacy
--type-onlyis rejected - warnings are written to stderr-equivalent output only
Required validation:
pnpm lint-fixpnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts- any new targeted CLI test file
pnpm check:tsgopnpm docgen
Expected file changes
| File | Purpose |
|---|---|
packages/tools/openapi-generator/src/OpenApiGenerator.ts |
replace typeOnly with format, coordinate parsing, warnings, and renderer dispatch |
packages/tools/openapi-generator/src/OpenApiTransformer.ts |
keep HttpClient generation working with the new format API |
packages/tools/openapi-generator/src/HttpApiTransformer.ts |
new HttpApi renderer |
packages/tools/openapi-generator/src/main.ts |
replace --type-only with --format and print warnings to stderr |
packages/tools/openapi-generator/test/OpenApiGenerator.test.ts |
add HttpApi and warning coverage |
packages/tools/openapi-generator/test/* |
optional CLI-focused tests |
.changeset/*.md |
changeset for @effect/openapi-generator |
Implementation plan
Task 1 — Migrate the API and CLI to format for existing HttpClient modes
Scope:
- replace
typeOnlywithformatinOpenApiGenerateOptions - add the
OpenApiGeneratorFormatunion, but keep runtime support limited tohttpclientandhttpclient-type-onlyin this task - update the existing HttpClient code paths to dispatch from
format - replace the CLI
--type-onlyflag with--formatwhile keepinghttpclientas the default - update all downstream callers, including
packages/tools/ai-codegen, to use the new API - update existing tests to use the new API
Why this task is atomic: it preserves the two existing outputs, introduces no partial HttpApi behavior, keeps all existing callers type-safe, and establishes the public contract needed by later tasks.
Validation: pnpm lint-fix, pnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts, pnpm check:tsgo, pnpm docgen.
Task 2 — Introduce warnings and a richer parsed model
Scope:
- add
OpenApiGeneratorWarningandonWarningplumbing - extract or expand parsing into a renderer-agnostic model that can carry tags, content types, default responses, metadata, cookies, and effective security
- keep current HttpClient output unchanged on top of that richer model
- add regression tests proving current HttpClient output remains stable
Why this task is atomic: it de-risks the feature without exposing incomplete HttpApi output and can ship independently with stable HttpClient behavior.
Validation: pnpm lint-fix, pnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts, pnpm check:tsgo, pnpm docgen.
Task 3 — Add baseline HttpApi rendering for representable operations and schema declarations
Scope:
- add
HttpApiTransformer.ts - add schema emission for
httpapiformat usingSchema.Classfor struct-like schemas and runtime-schema declarations for non-struct schemas - generate runtime schemas plus the exported root HttpApi class
- generate groups from first-tag ownership with top-level fallback
- generate endpoint annotations, parameters, supported request/response encodings, empty responses, optional request-body approximation, deterministic naming / collision handling, struct-class / runtime-schema bindings, and the
export class <Name> extends HttpApi.make(...) {}root declaration - add tests for the supported happy path
Why this task is atomic: it lands a usable httpapi mode for representable inputs without mixing in all lossy edge cases at the same time.
Validation: pnpm lint-fix, pnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts, pnpm check:tsgo, pnpm docgen.
Task 4 — Add security placeholders and lossy-feature handling
Scope:
- generate
HttpApiSecuritydeclarations - normalize effective security per operation
- generate OR security placeholder middleware and AND downgrade placeholders
- implement the approved warning-producing behaviors for cookies, extra tags, SSE skip, response headers, default remapping, and no-body request-body skipping
- add tests for all warning cases
Why this task is atomic: these behaviors are tightly coupled and should land together so the final warning and compatibility story is coherent and validation-stable.
Validation: pnpm lint-fix, pnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts, pnpm check:tsgo, pnpm docgen.
Task 5 — Finish CLI coverage, docs, and release bookkeeping
Scope:
- add CLI-focused tests for
--formatrouting and warning surfacing - update any package docs or examples that still refer to
--type-only - update package description / help text to reflect HttpClient + HttpApi generation instead of client-only wording
- add the required changeset for
@effect/openapi-generatorand choose the release type consistent with the public API migration - run full final validation
Why this task is atomic: it completes rollout and release readiness without blocking core generator work.
Validation: pnpm lint-fix, pnpm test packages/tools/openapi-generator/test/OpenApiGenerator.test.ts, targeted CLI test file(s), pnpm check:tsgo, pnpm docgen.
Notes carried into implementation
HttpApihas no endpoint-level cookie parameter model, so ordinary cookie params must be dropped.httpapiformat should preferSchema.Classfor struct-like schemas and runtime-schema declarations for non-struct schemas, without usingSchema.Opaque.- Global OpenAPI security should be normalized into per-operation attachments instead of using API-level middleware directly.
Task 1 implementation notes
OpenApiGenerateOptionsnow usesformat: "httpclient" | "httpclient-type-only"and no longer acceptstypeOnly.- CLI flag
--type-onlyhas been removed in favor of--formatwith defaulthttpclient. - OpenAPI generator CLI help text now uses output-neutral wording for
--specand--name. packages/tools/ai-codegenstill exposestypeOnlyin its own config schema for now, but now maps that value intoformatwhen callingOpenApiGenerator.generate.- There is no dedicated openapi-generator CLI test file yet; Task 5 should add explicit CLI coverage for format flag behavior.
Follow-up tasks
- Add dedicated openapi-generator CLI tests that exercise
--formatrouting (including default behavior). - Evaluate migrating
packages/tools/ai-codegenprovider config fromtypeOnlyto a format enum once downstream config compatibility strategy is defined.
Task 2 implementation notes
- Added
OpenApiGeneratorWarning/OpenApiGeneratorWarningCodeto the generator public API and introducedonWarninginOpenApiGenerateOptions. - Parsing now produces a richer renderer-agnostic
ParsedOpenApimodel containing API metadata, tag metadata, and per-operation metadata. - Per-operation parsed data now includes:
- declared tags
- normalized per-location parameter collections (including cookies)
- request body content types
- response content types plus explicit
defaultResponse - effective per-operation security after inheritance/override
- Added a centralized warning emission helper and routed parser warnings through it.
- Current warning coverage in Task 2 is intentionally limited to already-lossy HttpClient behavior (
cookie-parameter-droppedanddefault-response-remapped) while preserving generated source output. OpenApiTransformernow renders from the richer parsed model while preserving existing HttpClient and HttpClient type-only output text.- Added regression tests verifying runtime and type-only outputs remain byte-stable when using the new
onWarningoption shape. - Corrected parsed request-body metadata so
requiredreflects OpenAPI semantics (trueonly when explicitly set), keeping HttpClient output unchanged.
Additional follow-up tasks
- Add focused regression coverage for
$ref-heavy parameter/request-body scenarios to guard byte-for-byte HttpClient compatibility during future parser refactors. - Decide whether to include
pathItem.parametersin the parsed intermediate model before wiring HttpApi rendering, and document any intentional compatibility constraints.
Task 3 implementation notes
- Added a dedicated
HttpApiTransformer.tsand wiredformat: "httpapi"dispatch inOpenApiGenerator.generate. - Added
JsonSchemaGenerator.generateHttpApifor HttpApi schema declarations:- non-recursive schemas render as
Schema.Classwhen struct-like and as runtime-schema declarations withtypeof ...Typealiases otherwise - recursive definitions currently fall back to the existing
type + conststyle to avoid invalid self-references in class heritage expressions
- non-recursive schemas render as
- Extended the parsed operation model with HttpApi-oriented data:
- per-location parameter schemas (
path,query,headers) - representable request-body media schema mappings
- representable response media schema mappings plus empty-response markers
- metadata for
licenseandservers
- per-location parameter schemas (
- Added deterministic schema name collision handling (with
Name2,Name3, ... suffixes) via a reserved-name set that includes component schema names and generated operation schema names. - Implemented baseline HttpApi rendering behavior:
- first-tag group ownership and fallback
defaulttop-level group for untagged operations - fallback group now remains top-level even when tagged
"default"operations are encountered first in traversal order - endpoint OpenAPI annotations (
Identifier,Summary,Description,Deprecated,ExternalDocs) - representable request/response mappings for json, multipart, form-urlencoded, text, binary, and empty responses
- optional request-body approximation via
HttpApiSchema.NoContentpayload alternative - root API class declaration
export class <Name> extends HttpApi.make("<Name>") {}with composed exported valueexport const <Name>Api = <Name>...
- first-tag group ownership and fallback
- Added focused HttpApi happy-path tests in
packages/tools/openapi-generator/test/OpenApiGenerator.test.tscovering:- tagged group generation
- fallback top-level group generation
- endpoint annotations
- representable parameter mappings
- request/response encoding mappings
- optional request-body approximation
- struct-class / runtime-schema declaration presence
Additional follow-up tasks
OpenAPISpecRequestBodytyping currently modelsrequiredas mandatory/truein this repository's OpenAPI type definitions; test fixtures use a local cast for optional request-body scenarios.- Baseline HttpApi response mapping originally ignored non-numeric response status keys; Task 4 now remaps
defaultresponses to explicit status codes (200/500) with warnings.
Task 4 implementation notes
- Added supported OpenAPI security-scheme parsing into the shared parsed model (
basic,bearer,apiKey) and surfaced these as generatedHttpApiSecuritydeclarations inhttpapioutput. httpapioutput now emits placeholderHttpApiMiddleware.Serviceclasses for distinct security specs rather than duplicating them per operation:- OR-compatible single-scheme requirements become one reusable middleware per distinct effective security spec, with a
securityobject. - AND requirements are downgraded to reusable plain placeholder middleware classes and emit
security-and-downgradedwarnings. security: []and requirement entries containing{}now result in no generated security middleware for that operation.
- OR-compatible single-scheme requirements become one reusable middleware per distinct effective security spec, with a
- Implemented the Task 4 lossy warning behaviors for
httpapigeneration:cookie-parameter-droppedadditional-tags-dropped(only inhttpapimode, where extra tags are dropped for group ownership)sse-operation-skippedresponse-headers-ignoreddefault-response-remapped(default ->200when no explicit success exists, otherwise500)no-body-method-request-body-skipped
- Implemented
optional-request-body-approximatedwarning emission whenhttpapigeneration approximates optional request bodies withHttpApiSchema.NoContent. - Added focused
OpenApiGenerator.test.tscoverage for security declaration/middleware generation, inherited vs cleared security behavior, security AND downgrade warnings, and all Task 4 lossy-warning/skip behaviors.
Additional follow-up tasks
- Unsupported security-scheme types are currently ignored (not yet surfaced through a dedicated warning code); decide whether to introduce a new warning code in Task 5 or later.
Task 5 implementation notes
- Added dedicated CLI-focused coverage in
packages/tools/openapi-generator/test/OpenApiGeneratorCli.test.tsfor:--formatrouting forhttpclient,httpclient-type-only, andhttpapi- default format behavior (
--formatomitted =>httpclient) - rejection of legacy
--type-only - warning surfacing on stderr only while generated source remains on stdout
- Added focused CLI fixtures:
test/fixtures/cli-basic-spec.jsontest/fixtures/cli-warning-spec.json
- Discovery: the CLI handler in
src/main.tswas not wiringonWarning, so generator warnings were silently dropped. Task 5 now collects generator warnings and prints them to stderr viaConsole.errorwith stableWARNING [code] ...formatting. - Review hardening: CLI tests now also assert command exit status and explicit warning formatting on stderr, reducing the chance of false positives when command execution behavior changes.
- Added process-level CLI integration coverage by spawning
node packages/tools/openapi-generator/src/bin.tsas a real child process and asserting stream separation for warning-producing input:- exit status is successful (
0) - generated source is present only on stdout
- formatted warning lines are present only on stderr
- exit status is successful (
- Release bookkeeping: confirmed existing
@effect/openapi-generatorchangeset coverage remainsmajorand updated.changeset/green-chips-wash.mdto document the complete public migration from--type-onlyto--formatplus newhttpapioutput support. - Release-facing docs/metadata audit updates:
- updated
packages/tools/openapi-generator/package.jsondescription to describe HttpClient + HttpApi generation - updated CLI
--formatflag help text to explicitly documenthttpclient,httpclient-type-only, andhttpapiwith defaulthttpclient - added CLI
--helpcoverage asserting all format values and default text are surfaced in user-facing help output - re-audited repository user-facing docs/examples and found no remaining legacy
--type-onlyusage outside implementation-spec history notes
- updated
Remaining Task 5 scope
- None.
Implementation plan status
- ✅ Task 1 — Migrate the API and CLI to
formatfor existing HttpClient modes - ✅ Task 2 — Introduce warnings and a richer parsed model
- ✅ Task 3 — Add baseline HttpApi rendering for representable operations and schema declarations
EFF-759 amendment — remove Schema.Opaque from HttpApi generation
httpapigeneration must not emitSchema.Opaquein generated output.- For non-struct schemas, emit:
export const Name = <runtime schema>export type Name = typeof Name.Type
- Existing struct-like schemas should continue to use
Schema.Classdeclarations. - ✅ Task 4 — Add security placeholders and lossy-feature handling
- ✅ Task 5 — Finish CLI coverage, docs, and release bookkeeping