File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed
src/Services/ToolService/Schema Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change 22
33namespace KLP \KlpMcpServer \Services \ToolService \Schema ;
44
5- enum PropertyType
5+ enum PropertyType: string
66{
7- case STRING ;
8- case INTEGER ;
9- case NUMBER ;
10- case OBJECT ;
11- case ARRAY ;
12- case BOOLEAN ;
7+ case STRING = ' string ' ;
8+ case INTEGER = ' integer ' ;
9+ case NUMBER = ' number ' ;
10+ case OBJECT = ' object ' ;
11+ case ARRAY = ' array ' ;
12+ case BOOLEAN = ' boolean ' ;
1313}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function asArray(): array
5656
5757 foreach ($ this ->properties as $ property ) {
5858 $ propertySchema = [
59- 'type ' => $ this -> getPropertyType ( $ property ) ,
59+ 'type ' => $ property -> getType ()-> value ,
6060 'description ' => $ property ->getDescription (),
6161 ];
6262
@@ -98,16 +98,4 @@ public function asArray(): array
9898 'required ' => $ required ,
9999 ];
100100 }
101-
102- private function getPropertyType (SchemaProperty $ property ): string
103- {
104- return match ($ property ->getType ()) {
105- PropertyType::STRING => 'string ' ,
106- PropertyType::INTEGER => 'integer ' ,
107- PropertyType::ARRAY => 'array ' ,
108- PropertyType::BOOLEAN => 'boolean ' ,
109- PropertyType::OBJECT => 'object ' ,
110- PropertyType::NUMBER => 'number ' ,
111- };
112- }
113101}
You can’t perform that action at this time.
0 commit comments