Skip to content

Fix SchemaParameter.schema type in openapi-3-1 (OasSchema32 -> OasSchema31) - #137

Open
tarunagnihotri534 wants to merge 1 commit into
hyperjump-io:mainfrom
tarunagnihotri534:fix/openapi-3-1-schema-parameter-type
Open

tarunagnihotri534 wants to merge 1 commit into
hyperjump-io:mainfrom
tarunagnihotri534:fix/openapi-3-1-schema-parameter-type

Conversation

@tarunagnihotri534

@tarunagnihotri534 tarunagnihotri534 commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

Fixes a typing error in openapi-3-1/index.d.ts where SchemaParameter.schema was typed as OasSchema32 instead of OasSchema31.

Root Cause

SchemaParameter was copied over from openapi-3-2/index.d.ts in commit a52c3d0 ("OpenApi type improvements") and the schema type was never switched back to the 3.1 one. OasSchema32 isn't declared or imported in openapi-3-1/index.d.ts, so anyone type-checking declaration files with skipLibCheck: false hits this error when importing from @hyperjump/json-schema/openapi-3-1:

openapi-3-1/index.d.ts(230,11): error TS2552: Cannot find name 'OasSchema32'. Did you mean 'OasSchema31'?

It went unnoticed because the repo's tsconfig.json has skipLibCheck: true.

Changes

  • Changed SchemaParameter.schema from OasSchema32 to OasSchema31, matching MediaType.schema and Header.schema in the same file.

Verification

  • Compiling openapi-3-1/index.d.ts with --skipLibCheck false no longer reports the OasSchema32 error. The remaining errors from @hyperjump/browser are unrelated and out of scope here.
  • npm run check-types passes with 0 errors.
  • npm test passes (28 test files, 15,031 tests passed, 64 skipped).

Fixes #135

@jdesrosiers jdesrosiers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the tests. That's not necessary.

@tarunagnihotri534
tarunagnihotri534 force-pushed the fix/openapi-3-1-schema-parameter-type branch from c8c6bf4 to 5cfcf66 Compare October 22, 2026 16:08
@tarunagnihotri534

Copy link
Copy Markdown
Author

Thanks for the review @jdesrosiers! I've dropped the test file, so the PR is now just the one-line type fix (OasSchema32 → OasSchema31 in openapi-3-1/index.d.ts). I also updated the description to match. Please take another look when you get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Type error in openapi-3-1/index.d.ts: SchemaParameter.schema references undeclared OasSchema32

2 participants