-
Notifications
You must be signed in to change notification settings - Fork 19
chore: [OpenAPI] Reduce Spring dependency #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # datamodel/openapi/openapi-api-sample/pom.xml # datamodel/openapi/openapi-api-sample/src/test/java/com/sap/cloud/sdk/datamodel/openapi/sample/api/OneOfDeserializationTest.java
* @return The response body in chosen type | ||
* @throws OpenApiRequestException | ||
* Thrown in case an exception occurs during invocation of the REST API | ||
*/ | ||
@SuppressWarnings( "unchecked" ) | ||
@Nullable | ||
public <T> T invokeAPI( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Comment)
Weaken API contract to allow non-Spring arguments:
Update in usage:
First step:
- Remove Spring requirement from public API.
- No breaking change with existing generated code.
- Code quality must still be improved though: Deprecation, Replacement, Delegation.
Next step:
- Improve code by offering an implementation for
invokeAPI
that does not require transitive Spring dependencies. While keeping legacy consumers unaffected on API contract.
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Comment)
For the users, this is already a significant improvement!
Context
https://github.com/SAP/cloud-sdk-java-backlog/issues/464
We want to reduce the Spring dependency.
Currently:
org.springframework:spring-core::compile
org.springframework:spring-web::compile
Expected (1):
org.springframework:spring-core::compile
org.springframework:spring-web::compile
Expected (2):
org.springframework:spring-core::compile
org.springframework:spring-web::compile
Feature scope:
Update mustache file to reduce Spring types from public API (70%)
openapi-core
API contract to allow for non-Spring typed argumentsHarden and improve
openapi-core
API contractoptional
-scoped dependencies.Update mustache file to use recommended API
Definition of Done
Error handling created / updated & covered by the tests aboveDocumentation updated