php-sdk/tests/Unit/Capability/Discovery
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel cfe5e8f570
[Capability] Apply a parameter's complete schema definition (#435)
* [Capability] Apply a parameter's complete schema definition

Schema(definition:) is documented as taking precedence over the individual
keywords, and generate() unwraps it that way at method level. At parameter
level it was merged as an ordinary key instead, in both the plain and the
variadic path, so the property reached clients carrying a literal
"definition" member - not JSON Schema, read by nothing, and everything
inside it lost.

Both paths now replace the schema with the definition. The variadic one
still forces type: array afterwards, since a variadic arrives as an array
however the definition describes it, and the signature default survives a
definition that states none - it is what the handler receives when the
argument is omitted, and default is an annotation rather than a constraint.

* Fix docblock description overwriting definition on variadic params

* Apply suggestion from @chr-hertel
2026-08-18 15:09:58 +02:00
..
Fixtures [Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks (#429) 2026-08-18 01:46:53 +02:00
CachedDiscovererTest.php fix: because the cached discoveryState does not use ->setDiscoveryState(), it is found that the discoveryState cannot be used (#120) 2025-10-26 23:25:09 +01:00
DiscovererToolTitleTest.php [Schema][Server] Add top-level title to Tool (#288) 2026-04-26 15:37:40 +02:00
DiscoveryStateTest.php [Server] Allow runtime-resolved element handlers (#294) 2026-05-29 07:16:12 +02:00
DiscoveryTest.php [Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks (#429) 2026-08-18 01:46:53 +02:00
DocBlockParserTest.php style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
DocBlockTestFixture.php feat: Add output schema support to MCP tools (#153) 2026-01-11 21:14:48 +01:00
HandlerResolverTest.php [Server] Allow pre-built instance handlers in element registration (#375) 2026-07-06 01:13:41 +02:00
SchemaGeneratorFixture.php [Capability] Apply a parameter's complete schema definition (#435) 2026-08-18 15:09:58 +02:00
SchemaGeneratorTest.php [Capability] Apply a parameter's complete schema definition (#435) 2026-08-18 15:09:58 +02:00
SchemaGeneratorUnionTest.php [Capability] Stop a union type losing a branch (#434) 2026-08-18 14:54:52 +02:00
SchemaValidatorTest.php style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
UnionFixture.php [Capability] Stop a union type losing a branch (#434) 2026-08-18 14:54:52 +02:00