FINERACT-1598: Remove unsupported recurringDepositFrequency fields from API docs #5381
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.
Description
Implements FINERACT-1598: This PR fixes an inconsistency between the API documentation and backend validation for Recurring Deposit Product creation.
The fields
recurringDepositFrequencyandrecurringDepositFrequencyTypeIdare documented as supported request parameters inRecurringDepositProductsApiResourceandRecurringDepositProductsApiResourceSwagger. But supplying these parameters results in validation errors.This occurs because:
DepositsApiConstantsclass which defines the valid JSON keys used for request parameter validation. The keys that we pass in the request JSON are compared against the set of valid keys from this class to check them for presence of any unsupported fields. Since these fields are not present as valid keys, we get validation errors.RecurringDepositProduct), assembler (DepositProductAssembler), or any supported parameters used to construct a Recurring Deposit Product.As a result these parameters are not used in building a
RecurringDepositProductand should not be documented as supported.Changes
Remove both unsupported fields from:
@Operationdocumentation inRecurringDepositProductsApiResource.RecurringDepositProductsApiResourceSwagger.This aligns the API docs with the actual backend behavior.
Further Scope
The field
chartsis documented under Optional Fields in the OpenAPI@Operationdocumentation for the same POST body inRecurringDepositProductsApiResource. However, it is required for successful creation of a Recurring Deposit Product, and its absence results in a runtime validation error.This may need a separate discussion.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.