Fix OpenAPI review issues
Merged
ME
5mo ago+13+13+01234567890123456789-14-14-01234567890123456789
Summary
Fixes all valid findings from inline code review:
- Relative server URL — Replace
https://example.com/api/v1andhttp://localhost/api/v1with/api/v1so generated clients point at the hosting app - OAS 3.1 nullable —
nullable: trueis removed in OpenAPI 3.1; fixOptionField.default→type: ['string','null']andConversion.result_file→anyOf: [$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 testpasses (620 tests) -
composer lintpasses -
npm run buildpasses - No
nullablekeyword 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/v1so generated clients target the hosting app. - Replace OAS 3.0
nullablewith OAS 3.1 unions:OptionField.default→type: ['string','null']Conversion.result_file→anyOf: [File, null]
- Make curl examples dynamic via
{{ url('/api/v1/...') }}instead of hardcodedhttps://example.com. - Pin the ReDoc CDN from
/latest/to/2.x/to avoid breaking changes on major releases.
- Use relative server URL