From 96a7e093ff18c284ae71a980ddeda09bf6571076 Mon Sep 17 00:00:00 2001 From: Rohit <71192000+rohitsux@users.noreply.github.com> Date: Mon, 8 Jun 2026 00:37:52 +0530 Subject: [PATCH] fix(schemas): nest required inside items for usage object arrays Several array schemas declared `required` as a sibling of `items` instead of inside the item object. At the array level the `required` keyword has no effect, so the listed properties were not actually required in any generated client. Move `required` into the `items` object for the customer charge filter/grouped usage objects (including their projected variants) and the wallet recurring_transaction_rules array. Also drop the stale `groups` entry, which is not a defined property on the grouped usage objects. This clears 25 redocly `no-required-schema-properties-undefined` warnings (39 to 14) and makes the required fields enforce correctly in every generated SDK. --- openapi.yaml | 58 +++++++++---------- .../CustomerChargeFiltersUsageObject.yaml | 12 ++-- .../CustomerChargeGroupedUsageObject.yaml | 13 ++--- ...omerProjectedChargeFiltersUsageObject.yaml | 14 ++--- ...omerProjectedChargeGroupedUsageObject.yaml | 15 +++-- src/schemas/WalletUpdateInput.yaml | 4 +- 6 files changed, 56 insertions(+), 60 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index f907be69..5b04f159 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -16120,11 +16120,11 @@ components: recurring_transaction_rules: type: array description: List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. - required: - - trigger items: type: object description: Object that represents rule for wallet recurring transactions. + required: + - trigger properties: lago_id: type: string @@ -16539,14 +16539,14 @@ components: CustomerChargeFiltersUsageObject: type: array description: Array of filter object, representing multiple dimensions for a charge item. - required: - - values - - units - - total_aggregated_units - - events_count - - amount_cents items: type: object + required: + - values + - units + - total_aggregated_units + - events_count + - amount_cents properties: units: type: string @@ -16587,15 +16587,14 @@ components: CustomerChargeGroupedUsageObject: type: array description: Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. - required: - - amount_cents - - events_count - - units - - total_aggregated_units - - grouped_by - - groups items: type: object + required: + - amount_cents + - events_count + - units + - total_aggregated_units + - grouped_by properties: amount_cents: type: integer @@ -16792,15 +16791,15 @@ components: CustomerProjectedChargeFiltersUsageObject: type: array description: Array of filter object, representing multiple dimensions for a charge item. - required: - - values - - units - - projected_units - - events_count - - amount_cents - - projected_amount_cents items: type: object + required: + - values + - units + - projected_units + - events_count + - amount_cents + - projected_amount_cents properties: units: type: string @@ -16847,16 +16846,15 @@ components: CustomerProjectedChargeGroupedUsageObject: type: array description: Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. - required: - - amount_cents - - projected_amount_cents - - events_count - - units - - projected_units - - grouped_by - - groups items: type: object + required: + - amount_cents + - projected_amount_cents + - events_count + - units + - projected_units + - grouped_by properties: amount_cents: type: integer diff --git a/src/schemas/CustomerChargeFiltersUsageObject.yaml b/src/schemas/CustomerChargeFiltersUsageObject.yaml index 5ecb2823..87efe4a8 100644 --- a/src/schemas/CustomerChargeFiltersUsageObject.yaml +++ b/src/schemas/CustomerChargeFiltersUsageObject.yaml @@ -1,13 +1,13 @@ type: array description: Array of filter object, representing multiple dimensions for a charge item. -required: - - values - - units - - total_aggregated_units - - events_count - - amount_cents items: type: object + required: + - values + - units + - total_aggregated_units + - events_count + - amount_cents properties: units: type: string diff --git a/src/schemas/CustomerChargeGroupedUsageObject.yaml b/src/schemas/CustomerChargeGroupedUsageObject.yaml index bc6e45a4..c5b3cfdd 100644 --- a/src/schemas/CustomerChargeGroupedUsageObject.yaml +++ b/src/schemas/CustomerChargeGroupedUsageObject.yaml @@ -1,14 +1,13 @@ type: array description: Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. -required: - - amount_cents - - events_count - - units - - total_aggregated_units - - grouped_by - - groups items: type: object + required: + - amount_cents + - events_count + - units + - total_aggregated_units + - grouped_by properties: amount_cents: type: integer diff --git a/src/schemas/CustomerProjectedChargeFiltersUsageObject.yaml b/src/schemas/CustomerProjectedChargeFiltersUsageObject.yaml index 80d79779..14b7fce7 100644 --- a/src/schemas/CustomerProjectedChargeFiltersUsageObject.yaml +++ b/src/schemas/CustomerProjectedChargeFiltersUsageObject.yaml @@ -1,14 +1,14 @@ type: array description: Array of filter object, representing multiple dimensions for a charge item. -required: - - values - - units - - projected_units - - events_count - - amount_cents - - projected_amount_cents items: type: object + required: + - values + - units + - projected_units + - events_count + - amount_cents + - projected_amount_cents properties: units: type: string diff --git a/src/schemas/CustomerProjectedChargeGroupedUsageObject.yaml b/src/schemas/CustomerProjectedChargeGroupedUsageObject.yaml index 86c23295..65979a71 100644 --- a/src/schemas/CustomerProjectedChargeGroupedUsageObject.yaml +++ b/src/schemas/CustomerProjectedChargeGroupedUsageObject.yaml @@ -1,15 +1,14 @@ type: array description: Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. -required: - - amount_cents - - projected_amount_cents - - events_count - - units - - projected_units - - grouped_by - - groups items: type: object + required: + - amount_cents + - projected_amount_cents + - events_count + - units + - projected_units + - grouped_by properties: amount_cents: type: integer diff --git a/src/schemas/WalletUpdateInput.yaml b/src/schemas/WalletUpdateInput.yaml index aceab8db..5bd55013 100644 --- a/src/schemas/WalletUpdateInput.yaml +++ b/src/schemas/WalletUpdateInput.yaml @@ -39,11 +39,11 @@ properties: recurring_transaction_rules: type: array description: List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. - required: - - trigger items: type: object description: Object that represents rule for wallet recurring transactions. + required: + - trigger properties: lago_id: type: string