Skip to content

Fix OpenAPI review issues#292

Merged
menvil merged 1 commit into
developfrom
fix/openapi-review-fixes
Jun 3, 2026
Merged

Fix OpenAPI review issues#292
menvil merged 1 commit into
developfrom
fix/openapi-review-fixes

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all valid findings from inline code review:

  • Relative server URL — Replace https://example.com/api/v1 and http://localhost/api/v1 with /api/v1 so generated clients point at the hosting app
  • OAS 3.1 nullablenullable: true is removed in OpenAPI 3.1; fix OptionField.defaulttype: ['string','null'] and Conversion.result_fileanyOf: [$ref File, type null]
  • Dynamic curl URLs — Replace hardcoded https://example.com/api/v1/... with {{ url('/api/v1/...') }} across all 6 curl examples
  • Pinned Redoc CDN — Change /latest/ to /2.x/ to avoid silent breakage on major version releases

Skipped nitpick: @throws docblock on openApiSpec() — test helpers intentionally let exceptions bubble; no documentation value.

Test plan

  • composer test passes (620 tests)
  • composer lint passes
  • npm run build passes
  • No nullable keyword remains in openapi.yaml

🤖 Generated with Claude Code


Summary by cubic

Aligns the OpenAPI spec and docs with OAS 3.1 and the current host. Fixes client generation issues and prevents breakage in example commands and docs rendering.

  • Bug Fixes
    • Use relative server URL /api/v1 so generated clients target the hosting app.
    • Replace OAS 3.0 nullable with OAS 3.1 unions:
      • OptionField.defaulttype: ['string','null']
      • Conversion.result_fileanyOf: [File, null]
    • Make curl examples dynamic via {{ url('/api/v1/...') }} instead of hardcoded https://example.com.
    • Pin the ReDoc CDN from /latest/ to /2.x/ to avoid breaking changes on major releases.

Written for commit 60efa04. Summary will update on new commits.

Review in cubic

…ic curl URLs, pin Redoc CDN

- Replace absolute server URLs with relative /api/v1
- Fix OptionField.default: nullable:true → type: ['string','null'] (OAS 3.1)
- Fix Conversion.result_file: nullable:true + $ref → anyOf (OAS 3.1)
- Replace hardcoded https://example.com curl URLs with url() helper
- Pin Redoc CDN from /latest/ to /2.x/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit 100920d into develop Jun 3, 2026
@menvil menvil deleted the fix/openapi-review-fixes branch June 3, 2026 18:58
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e73d1b7f-603f-4425-8d6f-a4461c20686a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/openapi-review-fixes

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 and usage tips.

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