Skip to content

Feature/add v3 api namespace only - #75

Merged
jstapelkamp merged 3 commits into
masterfrom
feature/add-v3-api-namespace-only
Jun 16, 2026
Merged

jstapelkamp merged 3 commits into
masterfrom
feature/add-v3-api-namespace-only

Conversation

@jstapelkamp

Copy link
Copy Markdown
Contributor

No description provided.

Enable v3 generation and update the generator to handle the OpenAPI 3.1
constructs the v3 spec introduced: void 200 responses (now emit void
methods), union type arrays such as ["integer","string"] (normalized via
primaryType), and array responses with inline scalar items (now typed as
array<array-key, int>). Only the new V30 namespace is added; the existing
V10-V20 namespaces are left untouched.
Filter generate.php to the v3 major version so make generate only emits
the V30 namespace and leaves v1/v2 untouched. Upgrade the toolchain to
PHP 8.3 (Dockerfile, CI workflows, composer require) and move the test
dependencies to orchestra/testbench ^10 / phpunit ^11.5 / symfony 7,
which resolves cleanly without any security advisory overrides. The
remaining src changes are php-cs-fixer reformatting from the v3 ruleset.
The v3 spec declares some 200 responses as a plain string schema rather
than the JSON envelope used by v1/v1.1. The generator emitted those
methods returning buildResponse(), which json_decodes with
JSON_THROW_ON_ERROR and threw a JsonException on the raw, non-JSON body.

Add buildStringResponse() to the Request base class to return the raw
body, and route string return types to it in the generator. Regenerated
v3: getNotice (Company, User), createBuyOrderDelivery and processPickbons
now return the raw string. v1/v2 are unaffected.
@jstapelkamp
jstapelkamp merged commit f5660c7 into master Jun 16, 2026
1 check passed
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