diff --git a/doc/compiled.json b/doc/compiled.json index 63f7f645..6743f89d 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -6178,70 +6178,6 @@ } ], "x-cli-version": "2.9" - } - }, - "/accounts/{account_id}/custom_metadata/labels/{id}": { - "get": { - "summary": "Get a single property", - "description": "Get details of a single custom property.", - "operationId": "custom_metadata_property/show", - "tags": [ - "Custom Metadata" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/account_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/custom_metadata_property" - } - } - }, - "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" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN" - }, - { - "lang": "CLI v2", - "source": "phrase custom_metadata_labels show \\\n--account_id \\\n--id \\\n--access_token " - } - ], - "x-cli-version": "2.9" }, "post": { "summary": "Create a property", @@ -6257,9 +6193,6 @@ { "$ref": "#/components/parameters/account_id" }, - { - "$ref": "#/components/parameters/id" - }, { "description": "name of the property", "example": [ @@ -6354,11 +6287,75 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase custom_metadata_properties create \\\n--account_id \\\n--id \\\n--data '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n--access_token " + "source": "phrase custom_metadata_properties create \\\n--account_id \\\n--data '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n--access_token " + } + ], + "x-cli-version": "2.9" + } + }, + "/accounts/{account_id}/custom_metadata/labels/{id}": { + "get": { + "summary": "Get a single property", + "description": "Get details of a single custom property.", + "operationId": "custom_metadata_property/show", + "tags": [ + "Custom Metadata" + ], + "parameters": [ + { + "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/account_id" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/custom_metadata_property" + } + } + }, + "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" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "429": { + "$ref": "#/components/responses/429" + } + }, + "x-code-samples": [ + { + "lang": "Curl", + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + }, + { + "lang": "CLI v2", + "source": "phrase custom_metadata_labels show \\\n--account_id \\\n--id \\\n--access_token " } ], "x-cli-version": "2.9" diff --git a/paths.yaml b/paths.yaml index b83f60ef..5d7c9dbc 100644 --- a/paths.yaml +++ b/paths.yaml @@ -50,11 +50,11 @@ "/accounts/{account_id}/custom_metadata/labels": get: "$ref": "./paths/custom_metadata_properties/index.yaml" + post: + "$ref": "./paths/custom_metadata_properties/create.yaml" "/accounts/{account_id}/custom_metadata/labels/{id}": get: "$ref": "./paths/custom_metadata_properties/show.yaml" - post: - "$ref": "./paths/custom_metadata_properties/create.yaml" patch: "$ref": "./paths/custom_metadata_properties/update.yaml" delete: diff --git a/paths/custom_metadata_properties/create.yaml b/paths/custom_metadata_properties/create.yaml index 15b878c8..a4856e8a 100644 --- a/paths/custom_metadata_properties/create.yaml +++ b/paths/custom_metadata_properties/create.yaml @@ -7,7 +7,6 @@ tags: parameters: - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" - "$ref": "../../parameters.yaml#/account_id" -- "$ref": "../../parameters.yaml#/id" - description: name of the property example: - Fruit @@ -68,7 +67,7 @@ responses: x-code-samples: - lang: Curl source: |- - curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id" \ + curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels" \ -u USERNAME_OR_ACCESS_TOKEN \ -X POST \ -d '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \ @@ -77,7 +76,6 @@ x-code-samples: source: |- phrase custom_metadata_properties create \ --account_id \ - --id \ --data '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \ --access_token x-cli-version: '2.9'