Skip to content
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

chore: Update SAP Cloud SDK #4

Merged
merged 15 commits into from
Aug 14, 2024
Merged

chore: Update SAP Cloud SDK #4

merged 15 commits into from
Aug 14, 2024

Conversation

newtork
Copy link
Contributor

@newtork newtork commented Aug 8, 2024

  • Update SAP Cloud SDK dependency
    • Fix camelCasing for methods like addItem(Item)
    • Fix return type @Nonnull / @Nullable annotation
    • Fix JavaDoc and other formats
    • Migrate to builder pattern (separate PR)
  • Apply "operation id prefix" settings for OpenAPI Generator (separate PR)
By applying 3 additional properties we can customize operation name resolution. [REVERTED]
<additionalProperties>
  <removeOperationIdPrefix>true</removeOperationIdPrefix>
  <removeOperationIdPrefixDelimiter>\.</removeOperationIdPrefixDelimiter>
  <removeOperationIdPrefixCount>3</removeOperationIdPrefixCount>
</additionalProperties>
Investigation result on why the generated method names have changed. Why previous version of SAP Cloud SDK generator resulted in "all" for operation id "kubesubmit.v4.applications.get_all".

It turns out in underlying OpenAPI generator version 7.6.0 the default setting is the following:

<additionalProperties>
  <removeOperationIdPrefix>true</removeOperationIdPrefix>
  <removeOperationIdPrefixDelimiter>_</removeOperationIdPrefixDelimiter>
  <removeOperationIdPrefixCount>1</removeOperationIdPrefixCount>
</additionalProperties>
Here it can be seen in debugger

image

It turns out in underlying OpenAPI generator version 7.7.0 the default setting is the following:

<additionalProperties>
  <removeOperationIdPrefix>false</removeOperationIdPrefix>
  <removeOperationIdPrefixDelimiter>_</removeOperationIdPrefixDelimiter>
  <removeOperationIdPrefixCount>1</removeOperationIdPrefixCount>
</additionalProperties>

@newtork newtork self-assigned this Aug 13, 2024
@newtork newtork changed the title chore: Update SAP Cloud SDK Update SAP Cloud SDK + Fix generated method names Aug 13, 2024
# Conflicts:
#	core/src/main/java/com/sap/ai/sdk/core/client/ApplicationApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ArtifactApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ConfigurationApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/DeploymentApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/DockerRegistrySecretApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ExecutableApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ExecutionApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ExecutionScheduleApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/FileApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/KpiApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/MetaApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/MetricsApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ModelApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ObjectStoreSecretApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/RepositoryApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ResourceApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ResourceGroupApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ResourceQuotaApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ScenarioApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/SecretApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/ServiceApi.java
#	core/src/main/java/com/sap/ai/sdk/core/client/model/BckndDeploymentQuotaItem.java
#	core/src/main/java/com/sap/ai/sdk/core/client/model/BckndDeploymentResourceQuotaResponse.java
#	core/src/main/java/com/sap/ai/sdk/core/client/model/BckndDeploymentUsage.java
#	core/src/main/java/com/sap/ai/sdk/core/client/model/BckndUsageResourcePlanItem.java
#	e2e-test-app/src/main/java/com/sap/ai/sdk/app/controllers/ModelsController.java
@newtork newtork changed the title Update SAP Cloud SDK + Fix generated method names chore: Update SAP Cloud SDK Aug 13, 2024
Copy link
Contributor

@CharlesDuboisSAP CharlesDuboisSAP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also mention that this PR fixes addXXX methods to be camel case.
Otherwise LGTM

README.md Outdated Show resolved Hide resolved
@newtork newtork enabled auto-merge (squash) August 13, 2024 15:40
@newtork newtork merged commit 84b708f into main Aug 14, 2024
3 checks passed
@newtork newtork deleted the update/cloud-sdk branch August 14, 2024 06:12
@CharlesDuboisSAP CharlesDuboisSAP mentioned this pull request Aug 15, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants