4. 国际化内容及文本管理
4.1. 新增国际化内容
Type: POST
Author: xezzon
Content-Type: application/json
Description: 新增国际化内容
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
namespace |
string |
No comments found. |
false |
- |
messageKey |
string |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: application/json" -i 'http://127.0.0.1/i18n' --data '{
"namespace": "",
"messageKey": ""
}'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
id |
string |
No comments found. |
- |
Response-example:
{
"id": ""
}
4.2. 列举国际化内容命名空间
Type: GET
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 列举国际化内容命名空间
Request-example:
curl -X GET -i 'http://127.0.0.1/i18n'
Response-example:
[
"",
""
]
4.3. 分页查询国际化内容
Type: GET
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 分页查询国际化内容
Path-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
namespace |
string |
命名空间 |
true |
- |
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
top |
int32 |
No comments found. |
false |
- |
skip |
int32 |
No comments found. |
false |
- |
Request-example:
curl -X GET -i 'http://127.0.0.1/i18n/{namespace}?top=0&skip=0'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
totalPages |
int32 |
No comments found. |
- |
totalElements |
int64 |
No comments found. |
- |
pageable |
object |
No comments found. |
- |
└─pageSize |
int32 |
No comments found. |
- |
└─pageNumber |
int32 |
No comments found. |
- |
└─paged |
boolean |
No comments found. |
- |
└─unpaged |
boolean |
No comments found. |
- |
└─offset |
int64 |
No comments found. |
- |
└─sort |
object |
No comments found. |
- |
└─empty |
boolean |
No comments found. |
- |
└─orders |
array |
No comments found. |
- |
numberOfElements |
int32 |
No comments found. |
- |
first |
boolean |
No comments found. |
- |
last |
boolean |
No comments found. |
- |
size |
int32 |
No comments found. |
- |
content |
array |
No comments found. |
- |
└─id |
string |
No comments found. |
- |
└─namespace |
string |
命名空间 |
- |
└─messageKey |
string |
国际化内容 |
- |
number |
int32 |
No comments found. |
- |
sort |
object |
No comments found. |
- |
└─empty |
boolean |
No comments found. |
- |
└─orders |
array |
No comments found. |
- |
empty |
boolean |
No comments found. |
- |
Response-example:
{
"totalPages": 0,
"totalElements": 0,
"pageable": {
"pageSize": 0,
"pageNumber": 0,
"paged": true,
"unpaged": true,
"offset": 0,
"sort": {
"empty": true,
"orders": [
{
"object": "any object"
}
]
}
},
"numberOfElements": 0,
"first": true,
"last": true,
"size": 0,
"content": [
{
"id": "",
"namespace": "",
"messageKey": ""
}
],
"number": 0,
"sort": {
"empty": true,
"orders": [
{
"object": "any object"
}
]
},
"empty": true
}
4.4. 更新国际化内容
Type: PUT
Author: xezzon
Content-Type: application/json
Description: 更新国际化内容
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
string |
No comments found. |
false |
- |
namespace |
string |
命名空间 |
false |
- |
messageKey |
string |
国际化内容 |
false |
- |
Request-example:
curl -X PUT -H "Content-Type: application/json" -i 'http://127.0.0.1/i18n' --data '{
"id": "",
"namespace": "",
"messageKey": ""
}'
Response-example:
Return void.
4.5. 删除国际化内容
Type: DELETE
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 删除国际化内容
Path-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
string |
国际化内容ID |
true |
- |
Request-example:
curl -X DELETE -i 'http://127.0.0.1/i18n/{id}'
Response-example:
Return void.
4.6. 查询国际化文本
Type: GET
Author: xezzon
Content-Type: application/x-www-form-urlencoded
Description: 查询国际化文本
Path-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
namespace |
string |
命名空间 |
true |
- |
messageKey |
string |
国际化内容 |
true |
- |
Request-example:
curl -X GET -i 'http://127.0.0.1/i18n/{namespace}/{messageKey}'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
mapKey |
string |
A map key. |
- |
Response-example:
{
"mapKey1": "",
"mapKey2": ""
}