-
Notifications
You must be signed in to change notification settings - Fork 8
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
[OpenAPI] Trim operation name prefixes #20
Conversation
# 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
…-prefix # Conflicts: # core/src/main/java/com/sap/ai/sdk/core/Core.java # 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/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/test/java/com/sap/ai/sdk/core/client/ArtifactUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ConfigurationUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/DeploymentUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ExecutionUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ScenarioUnitTest.java
public AiModelList getModels() { | ||
return API.modelsGet("foundation-models", "default"); | ||
return API.get_0("foundation-models", "default"); | ||
} |
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.
(Major)
This is a problem.
Cause: Following operations resolve to the same method names + signature (String, String)
:
get:
tags:
- Scenario
summary: Get information about all models available in LLM global scenario
description: Retrieve information about all models available in LLM global scenario
operationId: models.get
get:
tags:
- Scenario
summary: Get scenario by id
description: Retrieve details for a scenario specified by scenarioId.
operationId: scenario.get
If it was fixed, we could use the logic just fine:
- operationId: models.get
+ operationId: scenario.get_models
I created a PR to address this inconsistency here
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.
The fix has been merged
# Conflicts: # core/pom.xml # core/src/main/java/com/sap/ai/sdk/core/Core.java # 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/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/test/java/com/sap/ai/sdk/core/client/ArtifactUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ConfigurationUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/DeploymentUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ExecutionUnitTest.java # core/src/test/java/com/sap/ai/sdk/core/client/ScenarioUnitTest.java # sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/DeploymentController.java
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.
@newtork please review my commits before merging
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.
LGTM, thanks for maintenance @CharlesDuboisSAP
Context
AI/ai-sdk-java-backlog#53.
I've noticed the internal OpenAPI generator has means to remove operation name prefixes. This way the method names in API classes can be defused.
Definition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated