San-43 commented on PR #5744:
URL: https://github.com/apache/fineract/pull/5744#issuecomment-4202246833
Hello @edk12564, I wasn't thinking about maintaining a separate predefined
spec. I was thinking more about a build-time step in the existing OpenAPI
generation flow.
To make the idea more concrete, I was imagining something in the existing
`:fineract-provider:resolve` flow, for example a `doLast `step that normalizes
the generated spec after Swagger writes it:
```groovy
doLast {
def result = new
ClassForNormalization().normalize(file("${buildDir}/resources/main/static/fineract.json"),
file("${buildDir}/resources/main/static/fineract.yaml"),
sourceSets.main.runtimeClasspath.files)
}
```
The idea would be to preserve explicit `operationIds`, generate
deterministic fallback IDs only for missing ones, and fail the build if the
final IDs are duplicated.
So I'm not suggesting replacing the manual `operationIds` you're adding
here. I agree those still have value, especially for endpoints where path +
method would be awkward or less meaningful, is just that from my perspective
manual hardening alone does not fully solve the maintainability problem,
because untouched or future endpoints can still fall back to unstable generated
names. If you think it makes sense, we could open a Jira ticket for that
follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]