fix: [OpenAPI] Introduce openapi-core-apache module #1083
Conversation
|
What consequence does this additional module for the sake of spring optionality have ? Surely, the import namespace will be affected. Apart from that the bigger concern is new duplicated classes.
|
CharlesDuboisSAP
left a comment
There was a problem hiding this comment.
There are still changes in openapi-core and openapi-generator compared to before your first Apache PR. Ideally there are no changes
| */ | ||
|
|
||
| package com.sap.cloud.sdk.services.openapi.apache; | ||
| package com.sap.cloud.sdk.services.openapi.apache.apiclient; |
There was a problem hiding this comment.
(Question/Major)
This is a breaking change for users that may have depended on the new classes, right?
Is this an accepted risk?
There was a problem hiding this comment.
My assumption is that risk is very low since the newly released classes were never advertised, therefore this shouldn't be a problem.
I can also remove the apiclient package and extract the classes within to the outer package com.sap.cloud.sdk.services.openapi. I original intention was to we keep the same module structure as in openapi-core.
This will not entirely solve the issue because classes in core package eg: OpenApiResponse, OpenApiRequestException will still be affected.
Do you have a different take?
There was a problem hiding this comment.
Could the exception be renamed to not be a breaking change anymore?
There was a problem hiding this comment.
Regarding "breaking changes", I agree to Roshin's low-risk estimation.
I was thinking about the class names-/renames for OpenApiResponse and OpenApiRequestException: If both were kept with the same FQN / namespace like the legacy RestTemplate flavored classes, then the migration effot for users would be very low. Unfortunately if both class-pairs had same FQN, no user could ever use the two openapi-core
artifacts as dependencies in one project. I think the later limitation is relatively heavy. Therefore...
I would keep your current approach with dedicated namespace for Apache flavor. This will offer highest level of compatibility at the cost low migration effort for users deliberately wanting to go from RestTemplate to Apache flavor.

Context
SAP/cloud-sdk-java-backlog##464
Fix scope:
openapi-api-apache-sampleDefinition of Done
Error handling created / updated & covered by the tests above