Skip to content

Commit

Permalink
add name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshchang committed Dec 1, 2023
1 parent 853d993 commit 30290c3
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 8 deletions.
46 changes: 43 additions & 3 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6195,15 +6195,55 @@
{
"$ref": "#/components/parameters/id"
},
{
"description": "name of the property",
"example": [
"Fruit"
],
"name": "name",
"in": "query",
"schema": {
"type": "string"
}
},
{
"description": "description of property",
"example": [
"A healthy snack for all ages"
],
"name": "description",
"in": "query",
"schema": {
"type": "string"
}
},
{
"description": "ids of projects that the property belongs to",
"example": [
"abcd1234cdef1234abcd1234cdef1234"
],
"name": "project_ids",
"in": "query",
"schema": {
"type": "array",
"items": {
"type": "string",
"example": "abcd1234cdef1234abcd1234cdef1234"
"type": "string"
}
}
},
{
"description": "value options of property (only applies to single or multi select properties)",
"example": [
"Apple",
"Banana",
"Coconut"
],
"name": "value_options",
"in": "query",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -6243,7 +6283,7 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id?project_ids=%5B1,2,3%5D\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
"source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id?name=Fruit&description=A healthy snack for all ages&project_ids=%5B1,2,3%5D\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
},
{
"lang": "CLI v2",
Expand Down
30 changes: 28 additions & 2 deletions paths/custom_metadata_properties/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,40 @@ parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/id"
- description: name of the property
example:
- Fruit
name: name
in: query
schema:
type: string
- description: description of property
example:
- A healthy snack for all ages
name: description
in: query
schema:
type: string
- description: ids of projects that the property belongs to
example:
- abcd1234cdef1234abcd1234cdef1234
name: project_ids
in: query
schema:
type: array
items:
type: string
example: abcd1234cdef1234abcd1234cdef1234
- description: value options of property (only applies to single or multi select properties)
example:
- Apple
- Banana
- Coconut
name: value_options
in: query
schema:
type: array
items:
type: string
responses:
'200':
description: OK
Expand All @@ -39,7 +65,7 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id?project_ids=%5B1,2,3%5D" \
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id?name=Fruit&description=A healthy snack for all ages&project_ids=%5B1,2,3%5D" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
Expand Down
6 changes: 3 additions & 3 deletions schemas/custom_metadata_property.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ custom_metadata_property:
created_at: '2015-01-28T09:52:53Z'
updated_at: '2015-01-28T09:52:53Z'
value_options:
- apple
- banana
- coconut
- apple
- banana
- coconut

0 comments on commit 30290c3

Please sign in to comment.