-
Notifications
You must be signed in to change notification settings - Fork 23
feat: [OpenAPI] Make Spring Optional with Apache HttpClient #1046
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
Conversation
f47b1db to
cde369f
Compare
...sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sodastore/api/OrdersApi.java
Show resolved
Hide resolved
| * @throws ApiException | ||
| * if fails to make API call | ||
| */ | ||
| public Order ordersPost( @javax.annotation.Nonnull Order order ) |
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.
(Question/Optional)
It may be worth our time to check for alternatives to javax.annotation.Nonnull null-indicator annotations.
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.
Surely Jspecify is an option. But I guess that would merit a larger refactoring throughout the sdk
...he-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sample/api/OrdersApi.java
Outdated
Show resolved
Hide resolved
...che-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sample/api/SodasApi.java
Outdated
Show resolved
Hide resolved
...che-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sample/api/SodasApi.java
Outdated
Show resolved
Hide resolved
...-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sodastore/api/SodasApi.java
Show resolved
Hide resolved
...e-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sodastore/model/Fanta.java
Show resolved
Hide resolved
...el/openapi/openapi-core/src/main/java/com/sap/cloud/sdk/services/openapi/apache/BaseApi.java
Outdated
Show resolved
Hide resolved
|
SAP employees are expected to use their SAP-email address for commits related to their work. Our compliance check has detected usage of an email other than a SAP one by a SAP employee. Please update your pull request accordingly. If you think this is wrong or need any assistance, please contact [email protected]. |
CharlesDuboisSAP
left a comment
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.
Could we see it in AI SDK?
...che-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sample/api/SodasApi.java
Outdated
Show resolved
Hide resolved
...-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/apache/sodastore/api/SodasApi.java
Show resolved
Hide resolved
.../openapi/openapi-core/src/main/java/com/sap/cloud/sdk/services/openapi/apache/ApiClient.java
Outdated
Show resolved
Hide resolved
.../openapi/openapi-core/src/main/java/com/sap/cloud/sdk/services/openapi/apache/ApiClient.java
Show resolved
Hide resolved
...model/openapi/openapi-core/src/main/java/com/sap/cloud/sdk/services/openapi/apache/Pair.java
Show resolved
Hide resolved
...main/resources/openapi-generator/mustache-templates/libraries/apache-httpclient/api.mustache
Outdated
Show resolved
Hide resolved
.../openapi/openapi-core/src/main/java/com/sap/cloud/sdk/services/openapi/apache/ApiClient.java
Outdated
Show resolved
Hide resolved
@CharlesDuboisSAP You can checkout branch |
…-generator/mustache-templates/libraries/apache-httpclient/api.mustache Co-authored-by: Charles Dubois <[email protected]>
…e' into feat/openapi/optional-spring-base
…/services/openapi/apache/ApiClient.java Co-authored-by: Charles Dubois <[email protected]>
CharlesDuboisSAP
left a comment
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.
Some of the comments are also valid for Spring RestTemplate so optional
...rces/openapi-generator/mustache-templates/libraries/apache-httpclient/operationBody.mustache
Show resolved
Hide resolved
...main/resources/openapi-generator/mustache-templates/libraries/apache-httpclient/api.mustache
Outdated
Show resolved
Hide resolved
...rces/openapi-generator/mustache-templates/libraries/apache-httpclient/operationBody.mustache
Outdated
Show resolved
Hide resolved
…#1062) Moving to single larger PR (sorry), because its getting difficult to sync changes across. Both PRs have been thoroughly review at this point.
Context
SAP/cloud-sdk-java-backlog#464.
There are two objectives to this PR
apache-httpclienttemplate based code generation. We will (soon) remove a large chunk of introduced files, reduce public API and even refactor code.To maintain backward compatibility Spring framework dependencies are marked optional but template files, or any public API are still maintained without any changes.
Feature scope:
com.sap.cloud.sdk.services.openapi.apachewithApiClient,BaseApiand other supporting classes addedopenapi-api-apache-samplemodule as e2e test with sample code generation with apache/ApiClientEdit: Merged features
Definition of Done
Error handling created / updated & covered by the tests aboveDocumentation updatedRelease notes updated