Skip to content

Commit 66af21b

Browse files
authored
fix the firstMatchOnly and matchRoot schemas to be booleans (#235)
These are supposed to be just booleans, but represented as strings (who knows why...)
1 parent 141fbe1 commit 66af21b

File tree

1 file changed

+6
-4
lines changed
  • pkgs/dart_mcp_server/lib/src/mixins

1 file changed

+6
-4
lines changed

pkgs/dart_mcp_server/lib/src/mixins/dtd.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,19 +766,21 @@ base mixin DartToolingDaemonSupport
766766
'Value should be a nested finder for the descendent or ancestor',
767767
additionalProperties: true,
768768
),
769-
'matchRoot': Schema.object(
769+
// This is a boolean but uses the `true` and `false` strings.
770+
'matchRoot': Schema.enumeration(
770771
description:
771772
'Required by the Descendent and Ancestor finders. '
772773
'Whether the widget matching `of` will be considered for a '
773774
'match',
774-
additionalProperties: true,
775+
values: ['true', 'false'],
775776
),
776-
'firstMatchOnly': Schema.object(
777+
// This is a boolean but uses the `true` and `false` strings.
778+
'firstMatchOnly': Schema.enumeration(
777779
description:
778780
'Required by the Descendent and Ancestor finders. '
779781
'If true then only the first ancestor or descendent matching '
780782
'`matching` will be returned.',
781-
additionalProperties: true,
783+
values: ['true', 'false'],
782784
),
783785
'action': Schema.enumeration(
784786
description:

0 commit comments

Comments
 (0)