pricing - schema validation nullable
MODIFY
src/assets/server/rest/v1/schemas/pricing/pricing-create.json
src/assets/server/rest/v1/schemas/pricing/pricing-create.json
},
"staticRestrictions": {
"type": "object",
+ "nullable": true,
"properties": {
"validFrom": {
"type": "string",
},
"restrictions": {
"type": "object",
+ "nullable": true,
"properties": {
"minEnergyKWh": {
"type": "number",

MODIFY
src/assets/server/rest/v1/schemas/pricing/pricing-update.json
src/assets/server/rest/v1/schemas/pricing/pricing-update.json
},
"staticRestrictions": {
"type": "object",
+ "nullable": true,
"properties": {
"validFrom": {
"type": "string",
},
"restrictions": {
"type": "object",
+ "nullable": true,
"properties": {
"minEnergyKWh": {
"type": "number",

MODIFY
test/api/BillingTest.ts
test/api/BillingTest.ts
@@ -656,10 +656,6 @@ class TestData {
dimensions
};
- if (!tariff.restrictions) {
- delete tariff.restrictions;
- }
-
let response = await this.adminUserService.pricingApi.createPricingDefinition(tariff);
assert(response?.data?.status === 'Success', 'The operation should succeed');
assert(response?.data?.id, 'The ID should not be null');

pricing - schema validation nullable