Skip to content

test(openapi-codegen): add reproducible schema validation suite for tool parameter generation - #103

Open
yunusarda-sudo wants to merge 1 commit into
taskade:mainfrom
yunusarda-sudo:test/schema-validation-suite
Open

yunusarda-sudo wants to merge 1 commit into
taskade:mainfrom
yunusarda-sudo:test/schema-validation-suite

Conversation

@yunusarda-sudo

Copy link
Copy Markdown

Closes #102

Summary

This PR adds a dedicated, reproducible unit test suite in packages/openapi-codegen/src/schema.test.ts to validate tool input schema generation from OpenAPI specifications.

Changes Included

  • Added packages/openapi-codegen/src/schema.test.ts:
    • Validates parameter unification across path parameters ({workspaceId}, {taskId}), query strings, and requestBody JSON properties.
    • Validates constraint propagation into Zod schemas (e.g. z.enum, z.boolean().default(...), z.array(z.string()).optional()).
    • Validates runtime parameter routing keys (pathParamKeys and queryParamKeys).
  • Verified with ESLint / Prettier (yarn lint passes with 0 warnings).
  • Zero modifications to runtime codegen behavior or existing packages.

How to Run Tests Locally

# 1. Install dependencies
yarn install

# 2. Run the vitest test suite
yarn test

# Or run tests specifically for openapi-codegen:
npx vitest run packages/openapi-codegen

@changeset-bot

changeset-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a94386f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

test(openapi-codegen): add reproducible validation suite for generated tool input schemas

1 participant