CallInterface 调用接口
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface CallInterface {
"concept": "CallInterface" | "CallAuthInterface", // 产品概念
"label": string, // 调用接口标题
"calleeNamespace": string, // calleeNamespace
"calleeName": string, // calleeName
"shortcut": boolean, // shortcut
"arguments": Array<Argument>, // 实际参数
}
class CallInterfaceTreeNode {
ConceptEnum concept; // 产品概念
String label; // 调用接口标题
String calleeNamespace; // calleeNamespace
String calleeName; // calleeName
boolean shortcut; // shortcut
List<ArgumentTreeNode> arguments; // 实际参数
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/CallInterface",
"definitions": {
"CallInterface": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"enum": [
"CallInterface",
"CallAuthInterface"
]
},
"label": {
"type": "string"
},
"calleeNamespace": {
"type": "string"
},
"calleeName": {
"type": "string"
},
"shortcut": {
"type": "boolean"
},
"arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/Argument"
}
}
},
"required": [
"concept",
"label",
"calleeNamespace",
"calleeName",
"shortcut",
"arguments"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "CallInterface",
"label": "调用接口",
"calleeNamespace": null,
"calleeName": null,
"shortcut": null,
"arguments": []
}
concept: CallInterface
label: 调用接口
calleeNamespace: null
calleeName: null
shortcut: null
arguments: []
ScopeOf
- JSON
- Embedded in TS
{}
app.interfaces.interface1({
query1: 'str1',
query2: variable1,
body: student,
});