Skip to content

v8.0.1

@jkatruska jkatruska tagged this 06 Oct 09:07
* fix(open-api): cast non-string scalar path parameters in generated getUri()

integer / number / boolean path parameters generate int / float / bool
typed endpoint properties, so the emitted rawurlencode($this->param)
threw 'rawurlencode(): Argument #1 ($string) must be of type string'
at runtime. Emit rawurlencode((string) $this->param) for those types,
consistently for OpenAPI 2 / 3 / 3.1 (OpenAPI 2 now passes its path
parameter types to the builder, so it also gains the array implode
handling).

* fix(open-api): render boolean path parameters as 1/0 instead of an empty segment

(string) false yields '', so the (string) cast added for non-string
scalar path parameters silently produced an empty path segment for
false booleans. Coerce booleans through (string) (int) — the same
"1"/"0" wire representation the runtime uses for query values
(BaseEndpoint::stringifyScalar()) — and cover it with a dedicated
OpenApi3 boolean-path-parameter fixture.

* comments cleanup
Assets 2
Loading