Skip to content

Commit

Permalink
BUGFIX: The style deepObject together with a json payload confuses …
Browse files Browse the repository at this point in the history
…some generators and the swagger ui at times

This change removes the `schema` and `style` definitions in this case and specifies the payload via `content.application/json.$ref` which is at least sufficient for the swagger ui.
  • Loading branch information
mficzel committed Jun 26, 2024
1 parent cf289f5 commit 9c71521
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Classes/Domain/Path/OpenApiParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ public static function fromReflectionParameter(\ReflectionParameter $reflectionP
in: $parameterAttribute->in,
description: $parameterAttribute->description ?: $schemaAttribute->description,
required: !$reflectionParameter->isDefaultValueAvailable(),
schema: $parameterSchema->toReference(),
content: $parameterAttribute->style === ParameterStyle::STYLE_DEEP_OBJECT
? [
'application/json' => [
'schema' => $parameterSchema->toReference()
]
]
: null,
style: $parameterAttribute->style
);
}

Expand Down

0 comments on commit 9c71521

Please sign in to comment.