spring-boot-nebula/api-gateway/src/main/resources/static/api/doc/api_data.js

225 lines
5.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

define({ "api": [
{
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"optional": false,
"field": "varname1",
"description": "<p>No type.</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "varname2",
"description": "<p>With type.</p>"
}
]
}
},
"type": "",
"url": "",
"version": "0.0.0",
"filename": "./doc/main.js",
"group": "D__workspace_shop_api_gateway_src_main_resources_static_api_doc_main_js",
"groupTitle": "D__workspace_shop_api_gateway_src_main_resources_static_api_doc_main_js",
"name": ""
},
{
"type": "post",
"url": "oauth/token",
"title": "获取accessToken",
"version": "1.0.0",
"name": "getAccessToken",
"group": "OAuth2",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "Authorization",
"description": "<p>认证头信息: 使用Basic认证平台方会提供给调用方用户名密码(client_id和client_secret),比如: 用户名为demoApp,密码为123456使用Base64加密伪代码为 base64(&quot;aaa:123&quot;),结果为 ZGVtb0FwcDoxMjM0NTY=</p>"
}
]
},
"examples": [
{
"title": "Head Example:",
"content": "Authorization: Basic ZGVtb0FwcDoxMjM0NTY=",
"type": "String"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"allowedValues": [
"\"password\""
],
"optional": false,
"field": "grant_type",
"description": "<p>授权类型: password</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "username",
"description": "<p>对应手机号</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>密码</p>"
}
]
},
"examples": [
{
"title": "Example: ",
"content": "grant_type=password\nusername=手机号\npassword=*****",
"type": "String"
}
]
},
"sampleRequest": [
{
"url": "http://127.0.0.1:9999/oauth/token"
}
],
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "access_token",
"description": "<p>Access Token</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "token_type",
"description": "<p>目前为bearer</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "expires_in",
"description": "<p>过期剩余时间:单位为秒</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "scope",
"description": "<p>调用方被授权的域</p>"
}
]
},
"examples": [
{
"title": "Success Example:",
"content": "{\n \"access_token\": \"1d44bad5-2b9e-46e5-bfbe-80a8988b99b7\",\n \"token_type\": \"bearer\",\n \"expires_in\": 793,\n \"scope\": \"write read\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "Unauthorized",
"description": "<p>认证失败返回http状态码401</p>"
}
]
}
},
"filename": "./oauth2-api.js",
"groupTitle": "OAuth2"
},
{
"type": "get",
"url": "v1/user/currentUser",
"title": "用户信息",
"version": "0.1.0",
"name": "register",
"group": "User",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "Authorization",
"description": "<p>认证头信息: Bearer {access_token}</p>"
}
]
},
"examples": [
{
"title": "Head Example:",
"content": "Authorization: Bearer 252fb402-286e-4d89-925b-158d15314183",
"type": "String"
}
]
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "success",
"description": "<p>正确错误</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "message",
"description": "<p>消息</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "data",
"description": "<p>true 成功 false 失败</p>"
}
]
},
"examples": [
{
"title": "Success Example:",
"content": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": {\"data\":true,\"message\":\"成功\",\"success\":true}\n}",
"type": "json"
}
]
},
"sampleRequest": [
{
"url": "http://127.0.0.1:9999/v1/user/currentUser"
}
],
"filename": "./main.js",
"groupTitle": "User"
}
] });