diff --git a/doc/compiled.json b/doc/compiled.json index e3f20dd4..2788f64d 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -720,6 +720,7 @@ "multi_select", "number", "single_select", + "string", "text" ] }, @@ -4214,6 +4215,16 @@ "type": "string" } }, + "data_type": { + "in": "query", + "name": "data_type", + "description": "Data Type of Custom Metadata Property", + "required": false, + "schema": { + "type": "string" + }, + "example": "boolean" + }, "query_account_id": { "in": "query", "name": "account_id", @@ -6053,7 +6064,7 @@ "x-cli-version": "2.5" } }, - "/accounts/{account_id}/custom_metadata/properties": { + "/accounts/{account_id}/custom_metadata/labels": { "get": { "summary": "List properties", "description": "List all custom metadata properties for an account.\n\nThis endpoint is only available to accounts with advanced plans or above.\n", @@ -6066,39 +6077,27 @@ "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/account_id" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/data_type" }, { - "description": "ids of projects that the properties belong to", + "description": "id of project that the properties belong to", "example": [ "abcd1234cdef1234abcd1234cdef1234" ], - "name": "project_ids", + "name": "project_id", "in": "query", "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "description": "Sort criteria. Can be one of: key_name, created_at, updated_at.", + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "description": "Sort criteria. Can be one of: name, data_type, created_at.", "example": "updated_at", "name": "sort", "in": "query", @@ -6157,11 +6156,11 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels?branch=my-feature-branch&page=1&per_page=10&project_ids=%5B1,2,3%5D&sort=created_at&order=desc\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels?data_type=boolean&project_id=1&page=1&per_page=10&sort=created_at&order=desc\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "phrase custom_metadata_properties list \\\n--account_id \\\n--branch my-feature-branch \\\n--page 1 \\\n--per_page 10 \\\n--project_ids [1,2,3] \\\n--sort created_at \\\n--order desc \\\n--access_token " + "source": "phrase custom_metadata_properties list \\\n--account_id \\\n--data_type boolean \\\n--project_id 1 \\\n--page 1 \\\n--per_page 10 \\\n--sort created_at \\\n--order desc \\\n--access_token " } ], "x-cli-version": "2.9" diff --git a/parameters.yaml b/parameters.yaml index 875c1426..56841ce6 100644 --- a/parameters.yaml +++ b/parameters.yaml @@ -31,6 +31,14 @@ account_id: required: true schema: type: string +data_type: + in: query + name: data_type + description: Data Type of Custom Metadata Property + required: false + schema: + type: string + example: boolean query_account_id: in: query name: account_id diff --git a/paths.yaml b/paths.yaml index de07f457..82b59fa2 100644 --- a/paths.yaml +++ b/paths.yaml @@ -47,7 +47,7 @@ "$ref": "./paths/styleguides/update.yaml" delete: "$ref": "./paths/styleguides/destroy.yaml" -"/accounts/{account_id}/custom_metadata/properties": +"/accounts/{account_id}/custom_metadata/labels": get: "$ref": "./paths/custom_metadata_properties/index.yaml" "/accounts/{account_id}/invitations": diff --git a/paths/custom_metadata_properties/index.yaml b/paths/custom_metadata_properties/index.yaml index 25be7c96..1041151e 100644 --- a/paths/custom_metadata_properties/index.yaml +++ b/paths/custom_metadata_properties/index.yaml @@ -9,25 +9,17 @@ tags: - Custom Metadata parameters: - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/account_id" -- "$ref": "../../parameters.yaml#/page" -- "$ref": "../../parameters.yaml#/per_page" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string -- description: ids of projects that the properties belong to +- "$ref": "../../parameters.yaml#/data_type" +- description: id of project that the properties belong to example: - abcd1234cdef1234abcd1234cdef1234 - name: project_ids + name: project_id in: query schema: - type: array - items: - type: string -- description: 'Sort criteria. Can be one of: key_name, created_at, updated_at.' + type: string +- "$ref": "../../parameters.yaml#/page" +- "$ref": "../../parameters.yaml#/per_page" +- description: 'Sort criteria. Can be one of: name, data_type, created_at.' example: updated_at name: sort in: query @@ -66,16 +58,16 @@ responses: x-code-samples: - lang: Curl source: |- - curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels?branch=my-feature-branch&page=1&per_page=10&project_ids=%5B1,2,3%5D&sort=created_at&order=desc" \ + curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels?data_type=boolean&project_id=1&page=1&per_page=10&sort=created_at&order=desc" \ -u USERNAME_OR_ACCESS_TOKEN - lang: CLI v2 source: |- phrase custom_metadata_properties list \ --account_id \ - --branch my-feature-branch \ + --data_type boolean \ + --project_id 1 \ --page 1 \ --per_page 10 \ - --project_ids [1,2,3] \ --sort created_at \ --order desc \ --access_token diff --git a/schemas/custom_metadata_property.yaml b/schemas/custom_metadata_property.yaml index 7e4ece4f..43fba90c 100644 --- a/schemas/custom_metadata_property.yaml +++ b/schemas/custom_metadata_property.yaml @@ -18,6 +18,7 @@ custom_metadata_property: - multi_select - number - single_select + - string - text user: "$ref": "./user_preview.yaml#/user_preview"