Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
{
"name": "Style guides"
},
{
"name": "Supported Languages"
},
{
"name": "Tags"
},
Expand Down Expand Up @@ -2278,6 +2281,19 @@
"includes_locale_information": false
}
},
"languages": {
"type": "object",
"title": "languages",
"description": "Map of all languages supported by Phrase Strings, keyed by their language/locale code. Each value is the human-readable display name for that code.",
"additionalProperties": {
"type": "string"
},
"example": {
"de": "German",
"en": "English",
"fr": "French"
}
},
"project": {
"type": "object",
"title": "project",
Expand Down Expand Up @@ -6249,6 +6265,57 @@
"x-cli-version": "2.5"
}
},
"/languages": {
"get": {
"summary": "List supported languages",
"description": "Returns all languages/locale codes that Phrase Strings recognizes, mapped to their\nhuman-readable display name. This endpoint does not require authentication.\n",
"operationId": "languages/list",
"tags": [
"Supported Languages"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/languages"
},
"examples": {
"default": {
"value": {
"de": "German",
"en": "English",
"fr": "French"
}
}
}
}
},
"headers": {
"X-Rate-Limit-Limit": {
"$ref": "#/components/headers/X-Rate-Limit-Limit"
},
"X-Rate-Limit-Remaining": {
"$ref": "#/components/headers/X-Rate-Limit-Remaining"
},
"X-Rate-Limit-Reset": {
"$ref": "#/components/headers/X-Rate-Limit-Reset"
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
},
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/languages\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
}
]
}
},
"/projects/{project_id}/documents": {
"get": {
"summary": "List documents",
Expand Down
1 change: 1 addition & 0 deletions main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ tags:
- name: Screenshots
- name: Spaces
- name: Style guides
- name: Supported Languages
- name: Tags
- name: Teams
- name: Translations
Expand Down
3 changes: 3 additions & 0 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"/formats":
get:
"$ref": "./paths/formats/index.yaml"
"/languages":
get:
"$ref": "./paths/languages/index.yaml"
"/projects/{project_id}/documents":
get:
"$ref": "./paths/documents/index.yaml"
Expand Down
35 changes: 35 additions & 0 deletions paths/languages/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
summary: List supported languages
description: |
Returns all languages/locale codes that Phrase Strings recognizes, mapped to their
human-readable display name. This endpoint does not require authentication.
operationId: languages/list
tags:
- Supported Languages
responses:
'200':
description: OK
content:
application/json:
schema:
"$ref": "../../schemas/language.yaml#/languages"
examples:
default:
value:
de: German
en: English
fr: French
headers:
X-Rate-Limit-Limit:
"$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
X-Rate-Limit-Remaining:
"$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
X-Rate-Limit-Reset:
"$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
'400':
"$ref": "../../responses.yaml#/400"
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/languages" \
-u USERNAME_OR_ACCESS_TOKEN
2 changes: 2 additions & 0 deletions schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ schemas:
"$ref": schemas/upload.yaml#/upload
format:
"$ref": schemas/format.yaml#/format
languages:
"$ref": schemas/language.yaml#/languages
project:
"$ref": schemas/project.yaml#/project
project_details:
Expand Down
14 changes: 14 additions & 0 deletions schemas/language.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
languages:
type: object
title: languages
description: >-
Map of all languages supported by Phrase Strings, keyed by their
language/locale code. Each value is the human-readable display name
for that code.
additionalProperties:
type: string
example:
de: German
en: English
fr: French
Loading