File tree Expand file tree Collapse file tree
packages/gateway-protocol/src/schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Value } from "typebox/value" ;
22import { describe , expect , it } from "vitest" ;
3- import { ConfigSchemaResponseSchema } from "./config.js" ;
3+ import { ConfigSchemaLookupResultSchema , ConfigSchemaResponseSchema } from "./config.js" ;
44
55const response = {
66 schema : { } ,
77 uiHints : {
88 "channels.sms.fromNumber" : {
9+ docsUrl : "https://docs.openclaw.ai/channels/sms" ,
910 presentation : "phone-number" ,
1011 } ,
1112 } ,
@@ -31,3 +32,16 @@ describe("ConfigSchemaResponseSchema", () => {
3132 ) . toBe ( false ) ;
3233 } ) ;
3334} ) ;
35+
36+ describe ( "ConfigSchemaLookupResultSchema" , ( ) => {
37+ it ( "accepts a documentation URL in the resolved hint" , ( ) => {
38+ expect (
39+ Value . Check ( ConfigSchemaLookupResultSchema , {
40+ path : "gateway" ,
41+ schema : { type : "object" } ,
42+ hint : { docsUrl : "https://docs.openclaw.ai/gateway" } ,
43+ children : [ ] ,
44+ } ) ,
45+ ) . toBe ( true ) ;
46+ } ) ;
47+ } ) ;
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export const UpdateRunParamsSchema = closedObject({
7777const ConfigUiHintSchema = closedObject ( {
7878 label : Type . Optional ( Type . String ( ) ) ,
7979 help : Type . Optional ( Type . String ( ) ) ,
80+ docsUrl : Type . Optional ( Type . String ( ) ) ,
8081 tags : Type . Optional ( Type . Array ( Type . String ( ) ) ) ,
8182 group : Type . Optional ( Type . String ( ) ) ,
8283 order : Type . Optional ( Type . Integer ( ) ) ,
You can’t perform that action at this time.
0 commit comments