-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
Hi there
When using a parameter level Schema override e.g.:
public function __invoke(
#[Schema(
definition: [
'description' => 'This parameter has some complex definition which warrants manually entering the schema.',
],
)]
string $test,
}The output schema for the property will look like this:
[
'type' => ['string'],
'definition' => [
'description => '...',
],
]I think the culprit is here, where it should just return $this->definition, instead of ['definition' => $this->definition]:
server/src/Attributes/Schema.php
Lines 132 to 138 in 9d2e7e4
| public function toArray(): array | |
| { | |
| if ($this->definition !== null) { | |
| return [ | |
| 'definition' => $this->definition, | |
| ]; | |
| } |
Metadata
Metadata
Assignees
Labels
No labels