Skip to content

Commit

Permalink
Product avro schema
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Oct 30, 2023
1 parent 3db0db2 commit 9c38b53
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 0 deletions.
113 changes: 113 additions & 0 deletions onboarding-sdk/onboarding-sdk-product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
107 changes: 107 additions & 0 deletions onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc
Original file line number Diff line number Diff line change
@@ -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" ]
} ]
}

0 comments on commit 9c38b53

Please sign in to comment.