Skip to content

test: add unit tests for src/openapi.ts - #75

Open
doitrous wants to merge 1 commit into
mrmps:mainfrom
doitrous:test/openapi
Open

doitrous wants to merge 1 commit into
mrmps:mainfrom
doitrous:test/openapi

Conversation

@doitrous

Copy link
Copy Markdown

Adds test/openapi.test.ts validating the generated OpenAPI spec:

  • Declares OpenAPI 3.1
  • Has info with title, version, contact
  • Contains core paths (/, /v1/classify, /v1/health, /{labels}/{text})
  • Every path has at least one HTTP operation
  • ClassifyRequest, ClassifyResponse, DimensionResult, Error schemas exist
  • Security scheme is configured as bearer
  • ERROR_CODES contains the documented codes
  • LLMS_TXT starts correctly and mentions the API endpoint

12 tests, all pass under bun test.

🤖 Generated with Claude Code

Validate the generated OpenAPI spec structure: version, info, core paths,
operations on every path, ClassifyRequest/ClassifyResponse/DimensionResult/Error
schemas, security scheme. Also check ERROR_CODES and LLMS_TXT.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4533d4ab-247c-4829-8acd-42bf3845181e

📥 Commits

Reviewing files that changed from the base of the PR and between 5c241af and e593f33.

📒 Files selected for processing (1)
  • test/openapi.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant