fix(schemas): nest required inside items for usage object arrays#536
Open
rohitsux wants to merge 1 commit into
Open
fix(schemas): nest required inside items for usage object arrays#536rohitsux wants to merge 1 commit into
rohitsux wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several array schemas declare
requiredas a sibling ofitemsrather than inside the item object:Because the
requiredkeyword only applies to object schemas, the listed properties were not actually enforced in any generated client (JS/Python/Ruby/Go).Changes
requiredinto theitemsobject for:CustomerChargeFiltersUsageObjectCustomerChargeGroupedUsageObjectCustomerProjectedChargeFiltersUsageObjectCustomerProjectedChargeGroupedUsageObjectWalletUpdateInput(therecurring_transaction_rulesarray)groupsentry from the two grouped usage objects — it is listed as required but is not a defined property (the schema usesgrouped_byandfilters).openapi.yaml.Verification
npm run buildsucceeds.redocly lintdrops from 39 to 14 warnings (clears 25no-required-schema-properties-undefined).spectral lintreports 0 errors.