mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
chore(core): add custom-phrases api doc descriptions (#5022)
This commit is contained in:
parent
797bee5f01
commit
a49c3c33f7
1 changed files with 71 additions and 0 deletions
71
packages/core/src/routes/custom-phrases.openapi.json
Normal file
71
packages/core/src/routes/custom-phrases.openapi.json
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
{
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Custom phrases",
|
||||||
|
"description": "APIs for managing custom phrases that allow you to customize the phrases displayed when experiencing the sign-in flow."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"/api/custom-phrases": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get all custom phrases",
|
||||||
|
"description": "Get all custom phrases for all languages.",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A list of custom phrases."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/custom-phrases/{languageTag}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get custom phrases by language tag",
|
||||||
|
"description": "Get custom phrases for the specified language tag.",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Custom phrases for the specified language tag."
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Custom phrases not found for the specified language tag."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"summary": "Upsert custom phrases by language tag",
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"example": {
|
||||||
|
"phraseKey1": "new value1",
|
||||||
|
"phraseKey2": "new value2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "Custom phrases created/updated successfully."
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Invalid translation structure."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"summary": "Delete custom phrases by language tag",
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "Custom phrases deleted successfully."
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Custom phrases not found for the specified language tag."
|
||||||
|
},
|
||||||
|
"409": {
|
||||||
|
"description": "Cannot delete default language."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue