(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestSchemaBuild(t *testing.T) { |
| 12 | // TODO |
| 13 | doc := genOpenAPI3Template("test", "test") |
| 14 | variables := []*ai_api_dto.AiPromptVariable{ |
| 15 | { |
| 16 | Key: "query", |
| 17 | Description: "测试参数", |
| 18 | Require: true, |
| 19 | }, |
| 20 | } |
| 21 | doc.AddOperation("/test", http.MethodPost, genOperation("测试接口", "这是一个测试接口", variables)) |
| 22 | data, err := doc.MarshalJSON() |
| 23 | if err != nil { |
| 24 | t.Fatal(err) |
| 25 | } |
| 26 | fmt.Println(string(data)) |
| 27 | } |
nothing calls this directly
no test coverage detected