You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of swagger-php: 4.7.10
Version of PHP: 8.2.7
Hello. I am uncertain as to whether this is a bug or a feature that is not present.
Desired Behaviour
I would like to reference top-level OA\RequestBody definitions from operation definitions using FQCNs (fully qualified class names). The OpenApi 3.0 spec (§ 4.7.10.1) as well as Swagger docs (§ Reusable Bodies) seem to indicate this as a possibility.
Inspecting the actual generated OpenAPI YAML, the value under paths.?.post.requestBody.$ref does not seem to be properly processed: instead of a #/components/requestBodies/... URI, the value remains the same as the initial FQCN.
While the spec allows using refs, this library does not (yet) have consistent support for translating FQCN to refs. This works in a few select places but no more, so flagging as enhancement.
Version of
swagger-php
:4.7.10
Version of PHP:
8.2.7
Hello. I am uncertain as to whether this is a bug or a feature that is not present.
Desired Behaviour
I would like to reference top-level
OA\RequestBody
definitions from operation definitions using FQCNs (fully qualified class names). The OpenApi 3.0 spec (§ 4.7.10.1) as well as Swagger docs (§ Reusable Bodies) seem to indicate this as a possibility.Attribute Declarations
Generated OpenAPI YAML
If I understand the OpenAPI spec correctly, the desired OpenAPI document to generate would have the following fragments:
Actual Behaviour
Inspecting the actual generated OpenAPI YAML, the value under
paths.?.post.requestBody.$ref
does not seem to be properly processed: instead of a#/components/requestBodies/...
URI, the value remains the same as the initial FQCN.Seemingly pertinent parts of codebase
While I am not totally familiar with the
swagger-php
codebase, I noticed that the following methods seem responsible for the current behaviour:\OpenApi\Processors\AugmentRefs::resolveFQCNRefs
\OpenApi\Analysis::getSchemaForSource
The text was updated successfully, but these errors were encountered: