Skip to content

Fix validation crash on parameters with example field#10

Open
paoloantinori wants to merge 1 commit into
mainfrom
fix/validation-null-safety
Open

Fix validation crash on parameters with example field#10
paoloantinori wants to merge 1 commit into
mainfrom
fix/validation-null-safety

Conversation

@paoloantinori
Copy link
Copy Markdown

Summary

  • Wraps Library.validate() in try-catch to handle upstream null-safety bugs in @apitomy/data-models where OasParameterExamplesMutualExclusivityRule and OasInvalidSecurityRequirementNameRule throw on valid documents
  • Adds Playwright E2E test infrastructure with Firefox and Chrome browser coverage
  • Includes test fixtures for the specific crash scenarios

Test plan

  • Fresh npm install && npm run build compiles without errors
  • Load an OpenAPI doc with parameter example (no examples) — editor should not crash
  • Load an OpenAPI 2.0 doc with security definitions — no console errors
  • Run npm run test:e2e — all tests pass on Chromium and Firefox

Closes #7

🤖 Generated with Claude Code

Wrap Library.validate() in try-catch to handle upstream null-safety
bugs in @apitomy/data-models where OasParameterExamplesMutualExclusivityRule
and OasInvalidSecurityRequirementNameRule throw on valid documents.

Also adds Playwright E2E test infrastructure with Firefox and Chrome
coverage for validation null-safety scenarios.

Closes #7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Cannot convert undefined or null to object

1 participant