-
Notifications
You must be signed in to change notification settings - Fork 166
[Schema] Stop rejecting elicitation schemas the specification allows #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
63b1687
3546d94
c933262
5f853da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,15 +23,15 @@ | |
| final class MultiSelectEnumSchemaDefinition extends AbstractSchemaDefinition | ||
| { | ||
| /** | ||
| * @param string $title Human-readable title for the field | ||
| * @param ?string $title Optional human-readable title for the field | ||
| * @param string[] $enum Array of allowed string values | ||
| * @param string|null $description Optional description/help text | ||
| * @param string[]|null $default Optional default selected values (must be subset of enum) | ||
| * @param int|null $minItems Optional minimum number of selections | ||
| * @param int|null $maxItems Optional maximum number of selections | ||
| */ | ||
| public function __construct( | ||
| string $title, | ||
| ?string $title, | ||
| public readonly array $enum, | ||
|
Comment on lines
33
to
35
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 3546d94 — updated to |
||
| ?string $description = null, | ||
| public readonly ?array $default = null, | ||
|
|
@@ -73,7 +73,7 @@ public function __construct( | |
|
|
||
| /** | ||
| * @param array{ | ||
| * title: string, | ||
| * title?: string, | ||
| * items: array{type: string, enum: string[]}, | ||
| * description?: string, | ||
| * default?: string[], | ||
|
|
@@ -90,7 +90,7 @@ public static function fromArray(array $data): self | |
| } | ||
|
|
||
| return new self( | ||
| title: $data['title'], | ||
| title: $data['title'] ?? null, | ||
| enum: $data['items']['enum'], | ||
| description: $data['description'] ?? null, | ||
| default: $data['default'] ?? null, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,15 +23,15 @@ | |
| final class NumberSchemaDefinition extends AbstractSchemaDefinition | ||
| { | ||
| /** | ||
| * @param string $title Human-readable title for the field | ||
| * @param ?string $title Optional human-readable title for the field | ||
| * @param bool $integerOnly Whether to restrict to integer values only | ||
| * @param string|null $description Optional description/help text | ||
| * @param int|float|null $default Optional default value | ||
| * @param int|float|null $minimum Optional minimum value (inclusive) | ||
| * @param int|float|null $maximum Optional maximum value (inclusive) | ||
| */ | ||
| public function __construct( | ||
| string $title, | ||
| ?string $title = null, | ||
| public readonly bool $integerOnly = false, | ||
|
Comment on lines
33
to
35
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 3546d94 — updated to |
||
| ?string $description = null, | ||
| public readonly int|float|null $default = null, | ||
|
|
@@ -60,7 +60,7 @@ public function __construct( | |
| /** | ||
| * @param array{ | ||
| * type: string, | ||
| * title: string, | ||
| * title?: string, | ||
| * description?: string, | ||
| * default?: int|float, | ||
| * minimum?: int|float, | ||
|
|
@@ -75,7 +75,7 @@ public static function fromArray(array $data): self | |
| $integerOnly = 'integer' === $type; | ||
|
|
||
| return new self( | ||
| title: $data['title'], | ||
| title: $data['title'] ?? null, | ||
| integerOnly: $integerOnly, | ||
| description: $data['description'] ?? null, | ||
| default: $data['default'] ?? null, | ||
|
|
@@ -87,7 +87,7 @@ public static function fromArray(array $data): self | |
| /** | ||
| * @return array{ | ||
| * type: string, | ||
| * title: string, | ||
| * title?: string, | ||
| * description?: string, | ||
| * default?: int|float, | ||
| * minimum?: int|float, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.