From 9c38b532b201c23eb7b5b451d90aab7ef6bb0bfd Mon Sep 17 00:00:00 2001 From: manuraf Date: Mon, 30 Oct 2023 12:18:13 +0100 Subject: [PATCH] Product avro schema --- .../onboarding-sdk-product/README.md | 113 ++++++++++++++++++ .../src/main/schema/Product_v1.avsc | 107 +++++++++++++++++ 2 files changed, 220 insertions(+) create mode 100644 onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc diff --git a/onboarding-sdk/onboarding-sdk-product/README.md b/onboarding-sdk/onboarding-sdk-product/README.md index 0119b9358..049f28831 100644 --- a/onboarding-sdk/onboarding-sdk-product/README.md +++ b/onboarding-sdk/onboarding-sdk-product/README.md @@ -21,6 +21,119 @@ dependencies { implementation 'it.pagopa.selfcare:onboarding-sdk-product:0.0.1' } ``` +## Product JSON Schema + +Product string which are used by ProductService must follow a specific schema: + +``` +{ + "type" : "record", + "name" : "Product", + "namespace" : "it.pagopa.selfcare.product.entity", + "fields" : [ { + "name" : "id", + "type" : [ "string" ] + }, { + "name" : "logo", + "type" : [ "string" ] + }, { + "name" : "depictImageUrl", + "type" : [ "string" ] + }, { + "name" : "title", + "type" : [ "string" ] + }, { + "name" : "logoBgColor", + "type" : [ "string" ] + }, { + "name" : "description", + "type" : [ "string" ] + }, { + "name" : "urlPublic", + "type" : [ "string" ] + }, { + "name" : "urlBO", + "type" : [ "string" ] + }, { + "name" : "createdAt", + "type" : [ "string" ] + }, { + "name" : "createdBy", + "type" : [ "string" ] + }, { + "name" : "modifiedAt", + "type" : [ "string" ] + }, { + "name" : "modifiedBy", + "type" : [ "string" ] + }, { + "name" : "roleManagementURL", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplateUpdatedAt", + "type" : [ "string" ] + }, { + "name" : "contractTemplatePath", + "type" : [ "string" ] + }, { + "name" : "contractTemplateVersion", + "type" : [ "string" ] + }, { + "name" : "institutionContractMappings", + "type" : [ "null", { + "type" : "map", + "values" : { + "type" : "record", + "name" : "ContractStorage", + "fields" : [ { + "name" : "contractTemplateUpdatedAt", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplatePath", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplateVersion", + "type" : [ "null", "string" ] + } ] + } + } ] + }, { + "name" : "enabled", + "type" : "boolean" + }, { + "name" : "delegable", + "type" : ["null","boolean"] + }, { + "name" : "status", + "type" : [ "string" ] + }, { + "name" : "parentId", + "type" : [ "null", "string" ] + }, { + "name" : "identityTokenAudience", + "type" : [ "string" ] + }, { + "name" : "backOfficeEnvironmentConfigurations", + "type" : [ "null", { + "type" : "map", + "values" : { + "type" : "record", + "name" : "BackOfficeConfigurations", + "fields" : [ { + "name" : "url", + "type" : [ "null", "string" ] + }, { + "name" : "identityTokenAudience", + "type" : [ "null", "string" ] + } ] + } + } ] + }, { + "name" : "parent", + "type" : [ "null", "Product" ] + } ] +} +``` ## Usage diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc b/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc new file mode 100644 index 000000000..8975cbc5b --- /dev/null +++ b/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc @@ -0,0 +1,107 @@ +{ + "type" : "record", + "name" : "Product", + "namespace" : "it.pagopa.selfcare.product.entity", + "fields" : [ { + "name" : "id", + "type" : [ "string" ] + }, { + "name" : "logo", + "type" : [ "string" ] + }, { + "name" : "depictImageUrl", + "type" : [ "string" ] + }, { + "name" : "title", + "type" : [ "string" ] + }, { + "name" : "logoBgColor", + "type" : [ "string" ] + }, { + "name" : "description", + "type" : [ "string" ] + }, { + "name" : "urlPublic", + "type" : [ "string" ] + }, { + "name" : "urlBO", + "type" : [ "string" ] + }, { + "name" : "createdAt", + "type" : [ "string" ] + }, { + "name" : "createdBy", + "type" : [ "string" ] + }, { + "name" : "modifiedAt", + "type" : [ "string" ] + }, { + "name" : "modifiedBy", + "type" : [ "string" ] + }, { + "name" : "roleManagementURL", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplateUpdatedAt", + "type" : [ "string" ] + }, { + "name" : "contractTemplatePath", + "type" : [ "string" ] + }, { + "name" : "contractTemplateVersion", + "type" : [ "string" ] + }, { + "name" : "institutionContractMappings", + "type" : [ "null", { + "type" : "map", + "values" : { + "type" : "record", + "name" : "ContractStorage", + "fields" : [ { + "name" : "contractTemplateUpdatedAt", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplatePath", + "type" : [ "null", "string" ] + }, { + "name" : "contractTemplateVersion", + "type" : [ "null", "string" ] + } ] + } + } ] + }, { + "name" : "enabled", + "type" : "boolean" + }, { + "name" : "delegable", + "type" : ["null","boolean"] + }, { + "name" : "status", + "type" : [ "string" ] + }, { + "name" : "parentId", + "type" : [ "null", "string" ] + }, { + "name" : "identityTokenAudience", + "type" : [ "string" ] + }, { + "name" : "backOfficeEnvironmentConfigurations", + "type" : [ "null", { + "type" : "map", + "values" : { + "type" : "record", + "name" : "BackOfficeConfigurations", + "fields" : [ { + "name" : "url", + "type" : [ "null", "string" ] + }, { + "name" : "identityTokenAudience", + "type" : [ "null", "string" ] + } ] + } + } ] + }, { + "name" : "parent", + "type" : [ "null", "Product" ] + } ] +} \ No newline at end of file