diff --git a/repo/rest-api/specs/global/responses.json b/repo/rest-api/specs/global/responses.json index 3d4d81c67d..62679d342a 100644 --- a/repo/rest-api/specs/global/responses.json +++ b/repo/rest-api/specs/global/responses.json @@ -56,25 +56,6 @@ } } }, - "SitelinkDeleted": { - "description": "The resource was deleted", - "headers": { - "Content-Language": { - "description": "Language code of the language in which response is provided", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "Sitelink deleted" - } - } - }, "ItemRedirected": { "description": "The specified Item was redirected", "content": { @@ -134,67 +115,6 @@ } } }, - "InvalidGetItemInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-query-parameter": { "$ref": "./examples.json#/InvalidQueryParameterExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidNewItemInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "statement-group-property-id-mismatch": { "$ref": "./examples.json#/StatementGroupPropertyIdMismatch" }, - "referenced-resource-not-found": { - "$ref": "./examples.json#/ReferencedResourceNotFoundExample" - }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "invalid-key": { "$ref": "./examples.json#/InvalidKeyExample" }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidPropertyInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-query-parameter": { "$ref": "./examples.json#/InvalidQueryParameterExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidEntityIdInput": { "description": "The request cannot be processed", "content": { @@ -230,59 +150,6 @@ } } }, - "InvalidRetrieveStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRetrieveItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "item-statement-id-mismatch": { "$ref": "./examples.json#/ItemStatementIdMismatchExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRetrievePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "property-statement-id-mismatch": { "$ref": "./examples.json#/PropertyStatementIdMismatchExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidNewStatementInput": { "description": "The request cannot be processed", "content": { @@ -304,180 +171,6 @@ } } }, - "InvalidReplaceStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "cannot-modify-read-only-value": { - "$ref": "./examples.json#/CannotModifyReadOnlyValue" - }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidReplaceItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "item-statement-id-mismatch": { "$ref": "./examples.json#/ItemStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "cannot-modify-read-only-value": { - "$ref": "./examples.json#/CannotModifyReadOnlyValue" - }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidReplacePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "property-statement-id-mismatch": { "$ref": "./examples.json#/PropertyStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "cannot-modify-read-only-value": { - "$ref": "./examples.json#/CannotModifyReadOnlyValue" - }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "item-statement-id-mismatch": { "$ref": "./examples.json#/ItemStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemovePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "property-statement-id-mismatch": { "$ref": "./examples.json#/PropertyStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidSetSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "referenced-resource-not-found": { "$ref": "./examples.json#/ReferencedResourceNotFoundExample" }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidSetLabelInput": { "description": "The request cannot be processed", "content": { @@ -579,23 +272,6 @@ } } }, - "InvalidGetSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidTermByLanguageInput": { "description": "The request cannot be processed", "content": { @@ -671,28 +347,6 @@ } } }, - "InvalidPatchedItemSitelinks": { - "description": "Applying the provided JSON Patch results in invalid sitelinks", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "patch-result-referenced-resource-not-found": { "$ref": "./examples.json#/PatchResultResourceNotFoundExample" }, - "patch-result-invalid-value": { "$ref": "./examples.json#/PatchResultInvalidValueExample" }, - "patch-result-missing-field": { "$ref": "./examples.json#/PatchResultMissingFieldExample" }, - "patch-result-invalid-key": { "$ref": "./examples.json#/PatchResultInvalidKeyExample" }, - "url-not-modifiable": { "$ref": "./examples.json#/SitelinkUrlNotModifiableExample" }, - "data-policy-violation": { "$ref": "./examples.json#/DataPolicyViolationExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidPatchedItem": { "description": "Applying the provided JSON Patch results in an invalid property", "content": { @@ -809,50 +463,6 @@ } } }, - "InvalidItemStatementPatch": { - "description": "The provided JSON Patch is invalid", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "item-statement-id-mismatch": { "$ref": "./examples.json#/ItemStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidPropertyStatementPatch": { - "description": "The provided JSON Patch is invalid", - "content": { - "application/json": { - "schema": { "$ref": "./response-parts.json#/Error" }, - "examples": { - "invalid-path-parameter": { "$ref": "./examples.json#/InvalidPathParameterExample" }, - "property-statement-id-mismatch": { "$ref": "./examples.json#/PropertyStatementIdMismatchExample" }, - "invalid-value": { "$ref": "./examples.json#/InvalidValueExample" }, - "missing-field": { "$ref": "./examples.json#/MissingFieldExample" }, - "value-too-long": { "$ref": "./examples.json#/ValueTooLongExample" }, - "resource-too-large": { "$ref": "./examples.json#/ResourceTooLargeExample" } - } - } - }, - "headers": { - "Content-Language": { - "schema": { "type": "string" }, - "description": "Language code of the language in which error message is provided" - } - } - }, "CannotApplyStatementPatch": { "description": "The provided JSON Patch cannot be applied", "content": { @@ -1445,217 +1055,6 @@ } } }, - "ItemStatementCreated": { - "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - }, - "Location": { - "schema": { - "type": "string" - }, - "description": "The URI of the newly created statement" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "./response-parts.json#/StatementResponse" - } - } - } - }, - "PropertyStatementCreated": { - "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - }, - "Location": { - "schema": { - "type": "string" - }, - "description": "The URI of the newly created statement" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "./response-parts.json#/StatementResponse" - }, - "example": { - "$ref": "./examples.json#/PropertyStatementResponseExample/value" - } - } - } - }, - "ItemStatements": { - "description": "The statements of an Item", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { "$ref": "./response-parts.json#/StatementResponse" } - } - }, - "example": { - "P370": [ - { - "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P370", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [ ], - "references": [ ] - } - ], - "P92": [ - { - "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P92", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [ ], - "references": [ ] - } - ] - } - } - } - }, - "PropertyStatements": { - "description": "The statements of a Property", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { "$ref": "./response-parts.json#/StatementResponse" } - } - }, - "example": { - "P370": [ - { - "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P370", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ], - "P92": [ - { - "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P92", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ] - } - } - } - }, "NotModified": { "description": "The specified resource has not been modified since last provided revision number or date", "headers": { diff --git a/repo/rest-api/specs/resources/items/list.json b/repo/rest-api/specs/resources/items/list.json index 16c315f892..4b625f9e73 100644 --- a/repo/rest-api/specs/resources/items/list.json +++ b/repo/rest-api/specs/resources/items/list.json @@ -9,7 +9,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Item" }, "responses": { "201": { "$ref": "../../global/responses.json#/Item" }, - "400": { "$ref": "../../global/responses.json#/InvalidNewItemInput" }, + "400": { "$ref": "./responses.json#/InvalidNewItemInput" }, "422": { "$ref": "../../global/responses.json#/DataPolicyViolation" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } } diff --git a/repo/rest-api/specs/resources/items/responses.json b/repo/rest-api/specs/resources/items/responses.json new file mode 100644 index 0000000000..41d7dbd951 --- /dev/null +++ b/repo/rest-api/specs/resources/items/responses.json @@ -0,0 +1,43 @@ +{ + "InvalidNewItemInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "statement-group-property-id-mismatch": { "$ref": "../../global/examples.json#/StatementGroupPropertyIdMismatch" }, + "referenced-resource-not-found": { "$ref": "../../global/examples.json#/ReferencedResourceNotFoundExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "invalid-key": { "$ref": "../../global/examples.json#/InvalidKeyExample" }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidGetItemInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-query-parameter": { "$ref": "../../global/examples.json#/InvalidQueryParameterExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + } +} diff --git a/repo/rest-api/specs/resources/items/single.json b/repo/rest-api/specs/resources/items/single.json index 0364541968..6bede16780 100644 --- a/repo/rest-api/specs/resources/items/single.json +++ b/repo/rest-api/specs/resources/items/single.json @@ -16,7 +16,7 @@ "200": { "$ref": "../../global/responses.json#/Item" }, "308": { "$ref": "../../global/responses.json#/Moved" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, - "400": { "$ref": "../../global/responses.json#/InvalidGetItemInput" }, + "400": { "$ref": "./responses.json#/InvalidGetItemInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/properties/responses.json b/repo/rest-api/specs/resources/properties/responses.json new file mode 100644 index 0000000000..5574bb11fc --- /dev/null +++ b/repo/rest-api/specs/resources/properties/responses.json @@ -0,0 +1,20 @@ +{ + "InvalidPropertyInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-query-parameter": { "$ref": "../../global/examples.json#/InvalidQueryParameterExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + } +} diff --git a/repo/rest-api/specs/resources/properties/single.json b/repo/rest-api/specs/resources/properties/single.json index e55c17399e..774fbb5497 100644 --- a/repo/rest-api/specs/resources/properties/single.json +++ b/repo/rest-api/specs/resources/properties/single.json @@ -14,7 +14,7 @@ ], "responses": { "200": { "$ref": "../../global/responses.json#/Property" }, - "400": { "$ref": "../../global/responses.json#/InvalidPropertyInput" }, + "400": { "$ref": "./responses.json#/InvalidPropertyInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } } diff --git a/repo/rest-api/specs/resources/sitelinks/list.json b/repo/rest-api/specs/resources/sitelinks/list.json index 2d65c313d6..a157be2269 100644 --- a/repo/rest-api/specs/resources/sitelinks/list.json +++ b/repo/rest-api/specs/resources/sitelinks/list.json @@ -38,7 +38,7 @@ "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, - "422": { "$ref": "../../global/responses.json#/InvalidPatchedItemSitelinks" }, + "422": { "$ref": "./responses.json#/InvalidPatchedItemSitelinks" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } } } diff --git a/repo/rest-api/specs/resources/sitelinks/responses.json b/repo/rest-api/specs/resources/sitelinks/responses.json new file mode 100644 index 0000000000..e022d81a23 --- /dev/null +++ b/repo/rest-api/specs/resources/sitelinks/responses.json @@ -0,0 +1,101 @@ +{ + "InvalidPatchedItemSitelinks": { + "description": "Applying the provided JSON Patch results in invalid sitelinks", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "patch-result-referenced-resource-not-found": { "$ref": "../../global/examples.json#/PatchResultResourceNotFoundExample" }, + "patch-result-invalid-value": { "$ref": "../../global/examples.json#/PatchResultInvalidValueExample" }, + "patch-result-missing-field": { "$ref": "../../global/examples.json#/PatchResultMissingFieldExample" }, + "patch-result-invalid-key": { "$ref": "../../global/examples.json#/PatchResultInvalidKeyExample" }, + "url-not-modifiable": { "$ref": "../../global/examples.json#/SitelinkUrlNotModifiableExample" }, + "data-policy-violation": { "$ref": "../../global/examples.json#/DataPolicyViolationExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "SitelinkDeleted": { + "description": "The resource was deleted", + "headers": { + "Content-Language": { + "description": "Language code of the language in which response is provided", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "Sitelink deleted" + } + } + }, + "InvalidRemoveSitelinkInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidSetSitelinkInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "referenced-resource-not-found": { "$ref": "../../global/examples.json#/ReferencedResourceNotFoundExample" }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidGetSitelinkInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + } +} diff --git a/repo/rest-api/specs/resources/sitelinks/single.json b/repo/rest-api/specs/resources/sitelinks/single.json index 5442f56762..8044622283 100644 --- a/repo/rest-api/specs/resources/sitelinks/single.json +++ b/repo/rest-api/specs/resources/sitelinks/single.json @@ -16,7 +16,7 @@ "200": { "$ref": "../../global/responses.json#/Sitelink" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "308": { "$ref": "../../global/responses.json#/Moved" }, - "400": { "$ref": "../../global/responses.json#/InvalidGetSitelinkInput" }, + "400": { "$ref": "./responses.json#/InvalidGetSitelinkInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -45,11 +45,11 @@ "$ref": "../../global/responses.json#/Sitelink", "description": "The newly added Sitelink" }, - "400": { "$ref": "../../global/responses.json#/InvalidSetSitelinkInput" }, + "400": { "$ref": "./responses.json#/InvalidSetSitelinkInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, - "422": { "$ref": "../../global/responses.json#/DataPolicyViolation"}, + "422": { "$ref": "../../global/responses.json#/DataPolicyViolation" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } } }, @@ -68,8 +68,8 @@ ], "requestBody": { "$ref": "../../global/requests.json#/Edit" }, "responses": { - "200": { "$ref": "../../global/responses.json#/SitelinkDeleted" }, - "400": { "$ref": "../../global/responses.json#/InvalidRemoveSitelinkInput" }, + "200": { "$ref": "./responses.json#/SitelinkDeleted" }, + "400": { "$ref": "./responses.json#/InvalidRemoveSitelinkInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/statements/list-for-item.json b/repo/rest-api/specs/resources/statements/list-for-item.json index 8f793d372d..4b4ddfe720 100644 --- a/repo/rest-api/specs/resources/statements/list-for-item.json +++ b/repo/rest-api/specs/resources/statements/list-for-item.json @@ -13,7 +13,7 @@ { "$ref": "../../global/parameters.json#/Authorization" } ], "responses": { - "200": { "$ref": "../../global/responses.json#/ItemStatements" }, + "200": { "$ref": "./responses.json#/ItemStatements" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "308": { "$ref": "../../global/responses.json#/Moved" }, "400": { "$ref": "../../global/responses.json#/InvalidRetrieveStatementsInput" }, @@ -34,7 +34,7 @@ ], "requestBody": { "$ref": "../../global/requests.json#/Statement" }, "responses": { - "201": { "$ref": "../../global/responses.json#/ItemStatementCreated" }, + "201": { "$ref": "./responses.json#/ItemStatementCreated" }, "400": { "$ref": "../../global/responses.json#/InvalidNewStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, diff --git a/repo/rest-api/specs/resources/statements/list-for-property.json b/repo/rest-api/specs/resources/statements/list-for-property.json index 21c48c23cc..00a511088d 100644 --- a/repo/rest-api/specs/resources/statements/list-for-property.json +++ b/repo/rest-api/specs/resources/statements/list-for-property.json @@ -13,7 +13,7 @@ { "$ref": "../../global/parameters.json#/Authorization" } ], "responses": { - "200": { "$ref": "../../global/responses.json#/PropertyStatements" }, + "200": { "$ref": "./responses.json#/PropertyStatements" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidRetrieveStatementsInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, @@ -33,7 +33,7 @@ ], "requestBody": { "$ref": "../../global/requests.json#/Statement" }, "responses": { - "201": { "$ref": "../../global/responses.json#/PropertyStatementCreated" }, + "201": { "$ref": "./responses.json#/PropertyStatementCreated" }, "400": { "$ref": "../../global/responses.json#/InvalidNewStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/statements/responses.json b/repo/rest-api/specs/resources/statements/responses.json new file mode 100644 index 0000000000..7ee0a03028 --- /dev/null +++ b/repo/rest-api/specs/resources/statements/responses.json @@ -0,0 +1,447 @@ +{ + "InvalidRetrieveStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidReplaceStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "cannot-modify-read-only-value": { + "$ref": "../../global/examples.json#/CannotModifyReadOnlyValue" + }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidRemoveStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "ItemStatementCreated": { + "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + }, + "Location": { + "schema": { + "type": "string" + }, + "description": "The URI of the newly created statement" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../global/response-parts.json#/StatementResponse" + } + } + } + }, + "ItemStatements": { + "description": "The statements of an Item", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { "$ref": "../../global/response-parts.json#/StatementResponse" } + } + }, + "example": { + "P370": [ + { + "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P370", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ], + "P92": [ + { + "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P92", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ] + } + } + } + }, + "InvalidRetrieveItemStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { + "$ref": "../../global/examples.json#/InvalidPathParameterExample" + }, + "item-statement-id-mismatch": { + "$ref": "../../global/examples.json#/ItemStatementIdMismatchExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidReplaceItemStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "item-statement-id-mismatch": { "$ref": "../../global/examples.json#/ItemStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "cannot-modify-read-only-value": { + "$ref": "../../global/examples.json#/CannotModifyReadOnlyValue" + }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidRemoveItemStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "item-statement-id-mismatch": { "$ref": "../../global/examples.json#/ItemStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidItemStatementPatch": { + "description": "The provided JSON Patch is invalid", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "item-statement-id-mismatch": { "$ref": "../../global/examples.json#/ItemStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "PropertyStatementCreated": { + "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + }, + "Location": { + "schema": { + "type": "string" + }, + "description": "The URI of the newly created statement" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../../global/response-parts.json#/StatementResponse" + }, + "example": { + "$ref": "../../global/examples.json#/PropertyStatementResponseExample/value" + } + } + } + }, + "PropertyStatements": { + "description": "The statements of a Property", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { "$ref": "../../global/response-parts.json#/StatementResponse" } + } + }, + "example": { + "P370": [ + { + "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P370", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ], + "P92": [ + { + "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P92", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ] + } + } + } + }, + "InvalidRetrievePropertyStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "property-statement-id-mismatch": { "$ref": "../../global/examples.json#/PropertyStatementIdMismatchExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidReplacePropertyStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "property-statement-id-mismatch": { "$ref": "../../global/examples.json#/PropertyStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "cannot-modify-read-only-value": { + "$ref": "../../global/examples.json#/CannotModifyReadOnlyValue" + }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidRemovePropertyStatementInput": { + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "property-statement-id-mismatch": { "$ref": "../../global/examples.json#/PropertyStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + }, + "InvalidPropertyStatementPatch": { + "description": "The provided JSON Patch is invalid", + "content": { + "application/json": { + "schema": { "$ref": "../../global/response-parts.json#/Error" }, + "examples": { + "invalid-path-parameter": { "$ref": "../../global/examples.json#/InvalidPathParameterExample" }, + "property-statement-id-mismatch": { "$ref": "../../global/examples.json#/PropertyStatementIdMismatchExample" }, + "invalid-value": { "$ref": "../../global/examples.json#/InvalidValueExample" }, + "missing-field": { "$ref": "../../global/examples.json#/MissingFieldExample" }, + "value-too-long": { "$ref": "../../global/examples.json#/ValueTooLongExample" }, + "resource-too-large": { "$ref": "../../global/examples.json#/ResourceTooLargeExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { "type": "string" }, + "description": "Language code of the language in which error message is provided" + } + } + } +} diff --git a/repo/rest-api/specs/resources/statements/single-for-item.json b/repo/rest-api/specs/resources/statements/single-for-item.json index c1d698769f..f3469e6383 100644 --- a/repo/rest-api/specs/resources/statements/single-for-item.json +++ b/repo/rest-api/specs/resources/statements/single-for-item.json @@ -1,9 +1,7 @@ { "get": { "operationId": "getItemStatement", - "tags": [ - "statements" - ], + "tags": [ "statements" ], "summary": "Retrieve a single Statement from an Item", "description": "This endpoint is also accessible through `/statements/{statement_id}`", "parameters": [ @@ -18,7 +16,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemStatement" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, - "400": { "$ref": "../../global/responses.json#/InvalidRetrieveItemStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRetrieveItemStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -39,7 +37,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Statement" }, "responses": { "200": { "$ref": "../../global/responses.json#/ItemStatement" }, - "400": { "$ref": "../../global/responses.json#/InvalidReplaceItemStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidReplaceItemStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -60,7 +58,7 @@ "requestBody": { "$ref": "../../global/requests.json#/StatementPatch" }, "responses": { "200": { "$ref": "../../global/responses.json#/ItemStatement" }, - "400": { "$ref": "../../global/responses.json#/InvalidItemStatementPatch" }, + "400": { "$ref": "./responses.json#/InvalidItemStatementPatch" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -83,7 +81,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Edit" }, "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, - "400": { "$ref": "../../global/responses.json#/InvalidRemoveItemStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRemoveItemStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/statements/single-for-property.json b/repo/rest-api/specs/resources/statements/single-for-property.json index d0c0ebc3d3..4d6d0eac37 100644 --- a/repo/rest-api/specs/resources/statements/single-for-property.json +++ b/repo/rest-api/specs/resources/statements/single-for-property.json @@ -1,9 +1,7 @@ { "get": { "operationId": "getPropertyStatement", - "tags": [ - "statements" - ], + "tags": [ "statements" ], "summary": "Retrieve a single Statement from a Property", "description": "This endpoint is also accessible through `/statements/{statement_id}`", "parameters": [ @@ -18,11 +16,10 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyStatement" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, - "400": { "$ref": "../../global/responses.json#/InvalidRetrievePropertyStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRetrievePropertyStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } - } }, "put": { @@ -40,7 +37,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Statement" }, "responses": { "200": { "$ref": "../../global/responses.json#/PropertyStatement" }, - "400": { "$ref": "../../global/responses.json#/InvalidReplacePropertyStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidReplacePropertyStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -61,7 +58,7 @@ "requestBody": { "$ref": "../../global/requests.json#/StatementPatch" }, "responses": { "200": { "$ref": "../../global/responses.json#/PropertyStatement" }, - "400": { "$ref": "../../global/responses.json#/InvalidPropertyStatementPatch" }, + "400": { "$ref": "./responses.json#/InvalidPropertyStatementPatch" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -84,7 +81,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Edit" }, "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, - "400": { "$ref": "../../global/responses.json#/InvalidRemovePropertyStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRemovePropertyStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/statements/single.json b/repo/rest-api/specs/resources/statements/single.json index d63a4dbb1f..765f04b4cd 100644 --- a/repo/rest-api/specs/resources/statements/single.json +++ b/repo/rest-api/specs/resources/statements/single.json @@ -1,9 +1,7 @@ { "get": { "operationId": "getStatement", - "tags": [ - "statements" - ], + "tags": [ "statements" ], "summary": "Retrieve a single Statement", "description": "This endpoint is also accessible through `/entities/items/{item_id}/statements/{statement_id}` and `/entities/properties/{property_id}/statements/{statement_id}`", "parameters": [ @@ -17,7 +15,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Statement" }, "304": { "$ref": "../../global/responses.json#/NotModified" }, - "400": { "$ref": "../../global/responses.json#/InvalidRetrieveStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRetrieveStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -37,7 +35,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Statement" }, "responses": { "200": { "$ref": "../../global/responses.json#/Statement" }, - "400": { "$ref": "../../global/responses.json#/InvalidReplaceStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidReplaceStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -79,7 +77,7 @@ "requestBody": { "$ref": "../../global/requests.json#/Edit" }, "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, - "400": { "$ref": "../../global/responses.json#/InvalidRemoveStatementInput" }, + "400": { "$ref": "./responses.json#/InvalidRemoveStatementInput" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/src/RouteHandlers/openapi.json b/repo/rest-api/src/RouteHandlers/openapi.json index 117357ba49..f161fb0a0e 100644 --- a/repo/rest-api/src/RouteHandlers/openapi.json +++ b/repo/rest-api/src/RouteHandlers/openapi.json @@ -91,7 +91,45 @@ "$ref": "#/components/responses/Item" }, "400": { - "$ref": "#/components/responses/InvalidNewItemInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "statement-group-property-id-mismatch": { + "$ref": "#/components/examples/StatementGroupPropertyIdMismatch" + }, + "referenced-resource-not-found": { + "$ref": "#/components/examples/ReferencedResourceNotFoundExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "invalid-key": { + "$ref": "#/components/examples/InvalidKeyExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "422": { "$ref": "#/components/responses/DataPolicyViolation" @@ -143,7 +181,30 @@ "$ref": "#/components/responses/Moved" }, "400": { - "$ref": "#/components/responses/InvalidGetItemInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-query-parameter": { + "$ref": "#/components/examples/InvalidQueryParameterExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -295,7 +356,42 @@ "$ref": "#/components/responses/PreconditionFailedError" }, "422": { - "$ref": "#/components/responses/InvalidPatchedItemSitelinks" + "description": "Applying the provided JSON Patch results in invalid sitelinks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "patch-result-referenced-resource-not-found": { + "$ref": "#/components/examples/PatchResultResourceNotFoundExample" + }, + "patch-result-invalid-value": { + "$ref": "#/components/examples/PatchResultInvalidValueExample" + }, + "patch-result-missing-field": { + "$ref": "#/components/examples/PatchResultMissingFieldExample" + }, + "patch-result-invalid-key": { + "$ref": "#/components/examples/PatchResultInvalidKeyExample" + }, + "url-not-modifiable": { + "$ref": "#/components/examples/SitelinkUrlNotModifiableExample" + }, + "data-policy-violation": { + "$ref": "#/components/examples/DataPolicyViolationExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "500": { "$ref": "#/components/responses/UnexpectedError" @@ -344,7 +440,27 @@ "$ref": "#/components/responses/Moved" }, "400": { - "$ref": "#/components/responses/InvalidGetSitelinkInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -399,7 +515,42 @@ "description": "The newly added Sitelink" }, "400": { - "$ref": "#/components/responses/InvalidSetSitelinkInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "referenced-resource-not-found": { + "$ref": "#/components/examples/ReferencedResourceNotFoundExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -452,10 +603,52 @@ }, "responses": { "200": { - "$ref": "#/components/responses/SitelinkDeleted" + "description": "The resource was deleted", + "headers": { + "Content-Language": { + "description": "Language code of the language in which response is provided", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "Sitelink deleted" + } + } }, "400": { - "$ref": "#/components/responses/InvalidRemoveSitelinkInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -507,7 +700,30 @@ "$ref": "#/components/responses/Property" }, "400": { - "$ref": "#/components/responses/InvalidPropertyInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-query-parameter": { + "$ref": "#/components/examples/InvalidQueryParameterExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -1129,7 +1345,74 @@ ], "responses": { "200": { - "$ref": "#/components/responses/ItemStatements" + "description": "The statements of an Item", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/responses/Statement/content/application~1json/schema" + } + } + }, + "example": { + "P370": [ + { + "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P370", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ], + "P92": [ + { + "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P92", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ] + } + } + } }, "304": { "$ref": "#/components/responses/NotModified" @@ -1176,7 +1459,40 @@ }, "responses": { "201": { - "$ref": "#/components/responses/ItemStatementCreated" + "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + }, + "Location": { + "schema": { + "type": "string" + }, + "description": "The URI of the newly created statement" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/Statement/content/application~1json/schema" + } + } + } }, "400": { "$ref": "#/components/responses/InvalidNewStatementInput" @@ -1235,7 +1551,30 @@ "$ref": "#/components/responses/NotModified" }, "400": { - "$ref": "#/components/responses/InvalidRetrieveItemStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "item-statement-id-mismatch": { + "$ref": "#/components/examples/ItemStatementIdMismatchExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -1280,7 +1619,45 @@ "$ref": "#/components/responses/ItemStatement" }, "400": { - "$ref": "#/components/responses/InvalidReplaceItemStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "item-statement-id-mismatch": { + "$ref": "#/components/examples/ItemStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "cannot-modify-read-only-value": { + "$ref": "#/components/examples/CannotModifyReadOnlyValue" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -1325,7 +1702,42 @@ "$ref": "#/components/responses/ItemStatement" }, "400": { - "$ref": "#/components/responses/InvalidItemStatementPatch" + "description": "The provided JSON Patch is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "item-statement-id-mismatch": { + "$ref": "#/components/examples/ItemStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -1376,7 +1788,36 @@ "$ref": "#/components/responses/StatementDeleted" }, "400": { - "$ref": "#/components/responses/InvalidRemoveItemStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "item-statement-id-mismatch": { + "$ref": "#/components/examples/ItemStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2373,14 +2814,81 @@ ], "responses": { "200": { - "$ref": "#/components/responses/PropertyStatements" - }, - "304": { - "$ref": "#/components/responses/NotModified" - }, - "400": { - "$ref": "#/components/responses/InvalidRetrieveStatementsInput" - }, + "description": "The statements of a Property", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/responses/Statement/content/application~1json/schema" + } + } + }, + "example": { + "P370": [ + { + "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P370", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ], + "P92": [ + { + "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", + "rank": "normal", + "property": { + "id": "P92", + "data_type": "string" + }, + "value": { + "content": "I am a goat", + "type": "value" + }, + "qualifiers": [], + "references": [] + } + ] + } + } + } + }, + "304": { + "$ref": "#/components/responses/NotModified" + }, + "400": { + "$ref": "#/components/responses/InvalidRetrieveStatementsInput" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2417,7 +2925,43 @@ }, "responses": { "201": { - "$ref": "#/components/responses/PropertyStatementCreated" + "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", + "headers": { + "Last-Modified": { + "schema": { + "type": "string" + }, + "description": "Last modified date" + }, + "ETag": { + "schema": { + "type": "string" + }, + "description": "Last entity revision number" + }, + "X-Authenticated-User": { + "schema": { + "type": "string" + }, + "description": "Optional username of the user making the request" + }, + "Location": { + "schema": { + "type": "string" + }, + "description": "The URI of the newly created statement" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/Statement/content/application~1json/schema" + }, + "example": { + "$ref": "#/components/examples/PropertyStatementResponseExample/value" + } + } + } }, "400": { "$ref": "#/components/responses/InvalidNewStatementInput" @@ -2473,7 +3017,30 @@ "$ref": "#/components/responses/NotModified" }, "400": { - "$ref": "#/components/responses/InvalidRetrievePropertyStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "property-statement-id-mismatch": { + "$ref": "#/components/examples/PropertyStatementIdMismatchExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2518,7 +3085,45 @@ "$ref": "#/components/responses/PropertyStatement" }, "400": { - "$ref": "#/components/responses/InvalidReplacePropertyStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "property-statement-id-mismatch": { + "$ref": "#/components/examples/PropertyStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "cannot-modify-read-only-value": { + "$ref": "#/components/examples/CannotModifyReadOnlyValue" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2563,7 +3168,42 @@ "$ref": "#/components/responses/PropertyStatement" }, "400": { - "$ref": "#/components/responses/InvalidPropertyStatementPatch" + "description": "The provided JSON Patch is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "property-statement-id-mismatch": { + "$ref": "#/components/examples/PropertyStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2614,7 +3254,36 @@ "$ref": "#/components/responses/StatementDeleted" }, "400": { - "$ref": "#/components/responses/InvalidRemovePropertyStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "property-statement-id-mismatch": { + "$ref": "#/components/examples/PropertyStatementIdMismatchExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2664,7 +3333,27 @@ "$ref": "#/components/responses/NotModified" }, "400": { - "$ref": "#/components/responses/InvalidRetrieveStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2706,7 +3395,42 @@ "$ref": "#/components/responses/Statement" }, "400": { - "$ref": "#/components/responses/InvalidReplaceStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "cannot-modify-read-only-value": { + "$ref": "#/components/examples/CannotModifyReadOnlyValue" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -2796,7 +3520,33 @@ "$ref": "#/components/responses/StatementDeleted" }, "400": { - "$ref": "#/components/responses/InvalidRemoveStatementInput" + "description": "The request cannot be processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } }, "404": { "$ref": "#/components/responses/ResourceNotFound" @@ -3738,25 +4488,6 @@ } } }, - "SitelinkDeleted": { - "description": "The resource was deleted", - "headers": { - "Content-Language": { - "description": "Language code of the language in which response is provided", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "Sitelink deleted" - } - } - }, "ItemRedirected": { "description": "The specified Item was redirected", "content": { @@ -3826,7 +4557,7 @@ } } }, - "InvalidGetItemInput": { + "InvalidEntityIdInput": { "description": "The request cannot be processed", "content": { "application/json": { @@ -3836,9 +4567,6 @@ "examples": { "invalid-path-parameter": { "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-query-parameter": { - "$ref": "#/components/examples/InvalidQueryParameterExample" } } } @@ -3852,7 +4580,7 @@ } } }, - "InvalidNewItemInput": { + "InvalidRetrieveStatementsInput": { "description": "The request cannot be processed", "content": { "application/json": { @@ -3860,26 +4588,11 @@ "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" }, "examples": { - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "statement-group-property-id-mismatch": { - "$ref": "#/components/examples/StatementGroupPropertyIdMismatch" - }, - "referenced-resource-not-found": { - "$ref": "#/components/examples/ReferencedResourceNotFoundExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "invalid-key": { - "$ref": "#/components/examples/InvalidKeyExample" + "invalid-path-parameter": { + "$ref": "#/components/examples/InvalidPathParameterExample" }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" + "invalid-query-parameter": { + "$ref": "#/components/examples/InvalidQueryParameterExample" } } } @@ -3893,7 +4606,7 @@ } } }, - "InvalidPropertyInput": { + "InvalidNewStatementInput": { "description": "The request cannot be processed", "content": { "application/json": { @@ -3904,8 +4617,17 @@ "invalid-path-parameter": { "$ref": "#/components/examples/InvalidPathParameterExample" }, - "invalid-query-parameter": { - "$ref": "#/components/examples/InvalidQueryParameterExample" + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" } } } @@ -3919,7 +4641,7 @@ } } }, - "InvalidEntityIdInput": { + "InvalidSetLabelInput": { "description": "The request cannot be processed", "content": { "application/json": { @@ -3929,6 +4651,18 @@ "examples": { "invalid-path-parameter": { "$ref": "#/components/examples/InvalidPathParameterExample" + }, + "value-too-long": { + "$ref": "#/components/examples/ValueTooLongExample" + }, + "invalid-value": { + "$ref": "#/components/examples/InvalidValueExample" + }, + "missing-field": { + "$ref": "#/components/examples/MissingFieldExample" + }, + "resource-too-large": { + "$ref": "#/components/examples/ResourceTooLargeExample" } } } @@ -3942,458 +4676,7 @@ } } }, - "InvalidRetrieveStatementsInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-query-parameter": { - "$ref": "#/components/examples/InvalidQueryParameterExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRetrieveStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRetrieveItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "item-statement-id-mismatch": { - "$ref": "#/components/examples/ItemStatementIdMismatchExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRetrievePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "property-statement-id-mismatch": { - "$ref": "#/components/examples/PropertyStatementIdMismatchExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidNewStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidReplaceStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "cannot-modify-read-only-value": { - "$ref": "#/components/examples/CannotModifyReadOnlyValue" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidReplaceItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "item-statement-id-mismatch": { - "$ref": "#/components/examples/ItemStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "cannot-modify-read-only-value": { - "$ref": "#/components/examples/CannotModifyReadOnlyValue" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidReplacePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "property-statement-id-mismatch": { - "$ref": "#/components/examples/PropertyStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "cannot-modify-read-only-value": { - "$ref": "#/components/examples/CannotModifyReadOnlyValue" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveItemStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "item-statement-id-mismatch": { - "$ref": "#/components/examples/ItemStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemovePropertyStatementInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "property-statement-id-mismatch": { - "$ref": "#/components/examples/PropertyStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidRemoveSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidSetSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "referenced-resource-not-found": { - "$ref": "#/components/examples/ReferencedResourceNotFoundExample" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidSetLabelInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidSetDescriptionInput": { + "InvalidSetDescriptionInput": { "description": "The request cannot be processed", "content": { "application/json": { @@ -4521,29 +4804,6 @@ } } }, - "InvalidGetSitelinkInput": { - "description": "The request cannot be processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, "InvalidTermByLanguageInput": { "description": "The request cannot be processed", "content": { @@ -4653,50 +4913,12 @@ "schema": { "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" }, - "examples": { - "patch-test-failed": { - "$ref": "#/components/examples/PatchTestFailedExample" - }, - "patch-target-not-found": { - "$ref": "#/components/examples/PatchTargetNotFoundExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidPatchedItemSitelinks": { - "description": "Applying the provided JSON Patch results in invalid sitelinks", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "patch-result-referenced-resource-not-found": { - "$ref": "#/components/examples/PatchResultResourceNotFoundExample" - }, - "patch-result-invalid-value": { - "$ref": "#/components/examples/PatchResultInvalidValueExample" - }, - "patch-result-missing-field": { - "$ref": "#/components/examples/PatchResultMissingFieldExample" - }, - "patch-result-invalid-key": { - "$ref": "#/components/examples/PatchResultInvalidKeyExample" - }, - "url-not-modifiable": { - "$ref": "#/components/examples/SitelinkUrlNotModifiableExample" + "examples": { + "patch-test-failed": { + "$ref": "#/components/examples/PatchTestFailedExample" }, - "data-policy-violation": { - "$ref": "#/components/examples/DataPolicyViolationExample" + "patch-target-not-found": { + "$ref": "#/components/examples/PatchTargetNotFoundExample" } } } @@ -4894,82 +5116,6 @@ } } }, - "InvalidItemStatementPatch": { - "description": "The provided JSON Patch is invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "item-statement-id-mismatch": { - "$ref": "#/components/examples/ItemStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, - "InvalidPropertyStatementPatch": { - "description": "The provided JSON Patch is invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" - }, - "examples": { - "invalid-path-parameter": { - "$ref": "#/components/examples/InvalidPathParameterExample" - }, - "property-statement-id-mismatch": { - "$ref": "#/components/examples/PropertyStatementIdMismatchExample" - }, - "invalid-value": { - "$ref": "#/components/examples/InvalidValueExample" - }, - "missing-field": { - "$ref": "#/components/examples/MissingFieldExample" - }, - "value-too-long": { - "$ref": "#/components/examples/ValueTooLongExample" - }, - "resource-too-large": { - "$ref": "#/components/examples/ResourceTooLargeExample" - } - } - } - }, - "headers": { - "Content-Language": { - "schema": { - "type": "string" - }, - "description": "Language code of the language in which error message is provided" - } - } - }, "CannotApplyStatementPatch": { "description": "The provided JSON Patch cannot be applied", "content": { @@ -5704,221 +5850,6 @@ } } }, - "ItemStatementCreated": { - "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - }, - "Location": { - "schema": { - "type": "string" - }, - "description": "The URI of the newly created statement" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/Statement/content/application~1json/schema" - } - } - } - }, - "PropertyStatementCreated": { - "description": "A single newly created Wikibase Statement. Please note that the value of the `ETag` header field refers to the entity's revision ID.", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - }, - "Location": { - "schema": { - "type": "string" - }, - "description": "The URI of the newly created statement" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/responses/Statement/content/application~1json/schema" - }, - "example": { - "$ref": "#/components/examples/PropertyStatementResponseExample/value" - } - } - } - }, - "ItemStatements": { - "description": "The statements of an Item", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/responses/Statement/content/application~1json/schema" - } - } - }, - "example": { - "P370": [ - { - "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P370", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ], - "P92": [ - { - "id": "Q11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P92", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ] - } - } - } - }, - "PropertyStatements": { - "description": "The statements of a Property", - "headers": { - "Last-Modified": { - "schema": { - "type": "string" - }, - "description": "Last modified date" - }, - "ETag": { - "schema": { - "type": "string" - }, - "description": "Last entity revision number" - }, - "X-Authenticated-User": { - "schema": { - "type": "string" - }, - "description": "Optional username of the user making the request" - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/responses/Statement/content/application~1json/schema" - } - } - }, - "example": { - "P370": [ - { - "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P370", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ], - "P92": [ - { - "id": "P11$6403c562-401a-2b26-85cc-8327801145e1", - "rank": "normal", - "property": { - "id": "P92", - "data_type": "string" - }, - "value": { - "content": "I am a goat", - "type": "value" - }, - "qualifiers": [], - "references": [] - } - ] - } - } - } - }, "NotModified": { "description": "The specified resource has not been modified since last provided revision number or date", "headers": {