Conversation
…erated aliases directly The JSON Schema importer already attaches finite and integer checks to numbers, so SchemaRepresentation.toCodeDocument now renders those nodes from Schema.Finite and drops a finite check that only repeats its defaults. The OpenAPI generator references the generated type aliases instead of typeof X.Type in client signatures. Closes Effect-TS#7646
🦋 Changeset detectedLatest commit: c373b0f The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
gcanti
reviewed
Sep 7, 2026
gcanti
left a comment
Contributor
There was a problem hiding this comment.
The schemaNumber false positive has been fixed upstream. For the rest, one option is to add comments only to generated files to disable LSP/oxlint, something like // @effect-diagnostics *:off and the oxlint equivalent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7646.
@effect/openapi-generatoroutput triggered two@effect/language-servicediagnostics that the generator can avoid by construction.effect:SchemaRepresentation.toCodeDocumentThe JSON Schema importer already attaches
effect/schema/isFinite(fortype: number) andeffect/schema/isInt(fortype: integer) checks to number nodes. The renderer now emits such nodes fromSchema.Finiteinstead ofSchema.Number, and drops anisFinitecheck when it carries nothing beyond the defaults ofSchema.isFinite()(a custom-annotated, aborted, or branded check is kept on top of theSchema.Finitebase). PlainSchema.Numberwithout those checks renders unchanged.Before / after for
{ "type": "number" }and{ "type": "integer" }:@effect/openapi-generator: client signaturesOperation signatures referenced
typeof X.Typefor success, error, and SSE schemas even though the generator emitsexport type X = ...for the same name in the same file. They now referenceXdirectly (typeof X.Encodedandtypeof X.DecodingServicesare unchanged, as no alias exists for those).Verification
pnpm vitest run packages/effect/test/schema/representation packages/tools/openapi-generator/test: 25 files, 807 tests passed (new cases cover unannotated, default-annotated, custom-annotatedisFinite,isInt, and plainNumber).pnpm lint, andpnpm checkin both packages: clean."downloads": Schema.Finite,"id": Schema.Finite.check(Schema.isInt()...)andWithOptionalResponse<GetAddon200, Config>, with noschemaNumberorunnecessaryTypeofTypediagnostics.Two changesets are included (
effectpatch,@effect/openapi-generatorpatch).