1776654103
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
这些注解可以实现对对象的描述:
|
||||
|
||||
```java
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
||||
```
|
||||
|
||||
此时对象的 json 描述信息
|
||||
|
||||
```json
|
||||
{
|
||||
"type" : "object",
|
||||
"id" : "urn:jsonschema:cn:bugstack:ai:mcp:server:test:model:XxxRequest01",
|
||||
"properties" : {
|
||||
"city" : {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"description" : "城市名称,如果是中文汉字请先转换为汉语拼音,例如北京:beijing"
|
||||
},
|
||||
"company" : {
|
||||
"type" : "object",
|
||||
"id" : "urn:jsonschema:cn:bugstack:ai:mcp:server:test:model:XxxRequest01:Company",
|
||||
"required" : true,
|
||||
"description" : "公司信息,如果是中文汉字请先转换为汉语拼音,例如北京:jd/alibaba",
|
||||
"properties" : {
|
||||
"name" : {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"description" : "公司名称"
|
||||
},
|
||||
"type" : {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"description" : "公司类型"
|
||||
},
|
||||
"deep" : {
|
||||
"type" : "object",
|
||||
"id" : "urn:jsonschema:cn:bugstack:ai:mcp:server:test:model:XxxRequest01:Company:Deep",
|
||||
"required" : true,
|
||||
"description" : "测试",
|
||||
"properties" : {
|
||||
"x01" : {
|
||||
"type" : "string",
|
||||
"required" : true,
|
||||
"description" : "测试"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user