From 90a9118a7547649f7d78ef2b2b3fcce71d2aab67 Mon Sep 17 00:00:00 2001 From: dhis2-commit-signing-bot Date: Thu, 21 May 2026 09:33:19 +0000 Subject: [PATCH] Sync from api-contracts PR https://github.com/dhis2/dhis2-api-contracts/pull/85 --- .../category/README.md | 2 +- .../category/contract.json | 12 +- .../category/json-schema.json | 150 ++++++++---------- 3 files changed, 77 insertions(+), 87 deletions(-) diff --git a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/README.md b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/README.md index 86f39f6e7bc9..32f943779495 100644 --- a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/README.md +++ b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/README.md @@ -1,3 +1,3 @@ # GET category usage -used to populate edit category form \ No newline at end of file +used to populate edit category form diff --git a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/contract.json b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/contract.json index 90e8b65c80bb..303bdf058e9f 100644 --- a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/contract.json +++ b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/contract.json @@ -1,7 +1,7 @@ { - "name": "category", - "httpMethod": "GET", - "requestUrl": "/categories/{id}", - "responseStatus": 200, - "jsonSchema": "contracts/metadata-management-app/category/json-schema.json" -} \ No newline at end of file + "name": "category", + "httpMethod": "GET", + "requestUrl": "/categories/{id}", + "responseStatus": 200, + "jsonSchema": "contracts/metadata-management-app/category/json-schema.json" +} diff --git a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/json-schema.json b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/json-schema.json index 9db0e2284d38..80b48d047a38 100644 --- a/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/json-schema.json +++ b/dhis-2/dhis-test-web-api/src/test/resources/contracts/metadata-management-app/category/json-schema.json @@ -1,86 +1,76 @@ { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "attributeValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { + "type": "object", + "properties": { + "id": { "type": "string" - }, - "attribute": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "additionalProperties": true - } }, - "required": [ - "value", - "attribute" - ], - "additionalProperties": true - } - }, - "dataDimensionType": { - "type": "string", - "enum": [ - "DISAGGREGATION", - "ATTRIBUTE" - ] - }, - "shortName": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dataDimension": { - "type": "boolean" - }, - "categoryOptions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "name": { "type": "string" - }, - "displayName": { + }, + "displayName": { "type": "string" - } }, - "required": [ - "id" - ], - "additionalProperties": true - } - } - }, - "required": [ - "id", - "name", - "attributeValues", - "dataDimensionType", - "shortName", - "dataDimension", - "categoryOptions" - ], - "additionalProperties": true -} \ No newline at end of file + "attributeValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "attribute": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": true + } + }, + "required": ["value", "attribute"], + "additionalProperties": true + } + }, + "dataDimensionType": { + "type": "string", + "enum": ["DISAGGREGATION", "ATTRIBUTE"] + }, + "shortName": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dataDimension": { + "type": "boolean" + }, + "categoryOptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "displayName": { + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": true + } + } + }, + "required": [ + "id", + "name", + "attributeValues", + "dataDimensionType", + "shortName", + "dataDimension", + "categoryOptions" + ], + "additionalProperties": true +}