FINERACT-1598: Remove unsupported recurringDepositFrequency fields from API docs - #5381
Conversation
|
I checked the Liquibase Backward Compatibility failure in The error seems to occur during migration in This PR only updates OpenAPI or Swagger documentation and does not modify any database or Liquibase files. The failure seems to be unrelated to the changes in the PR. I also searched JIRA for related issues but could not find an existing ticket. I have initiated the self-serve process for my JIRA account which is pending activation. Please let me know if you'd like me to create a JIRA once access is available or if there is an existing issue I should reference. |
|
@Dhanno98 Can you please rebase this PR with latest |
|
@adamsaghy Yeah sure! |
942f9c6 to
26c1be2
Compare
|
After rebasing the PR, the
Form my analysis these failures seem unrelated to the PR changes and look like CI or infrastructure related issues. |
adamsaghy
left a comment
There was a problem hiding this comment.
Kindly review https://github.com/apache/fineract/pull/5385/changes and merge these together... i dont think from Kapil's PR we need the mapper, but it can be double checked!
|
Hi Adam, Yes you are correct, we don't need any new mappers. I also went through the Swagger changes. My PR intentionally limits the fix to the POST schema as the issue was caused by unsupported fields being documented in the POST request. I felt extra or legacy fields in the GET schema are generally non blocking and can be left untouched. Also, Kapil's PR removes a Based on this I think of keeping the solution limited to the POST OpenAPI changes already present in this PR, without introducing additional mappers that are not required or modifying the GET schema. Please let me know your thoughts and how would you like me to proceed. |
|
Hi @adamsaghy, Thanks! |
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.