Skip to content

Conversation

@newtork
Copy link
Contributor

@newtork newtork commented Mar 4, 2025

Blocked Waiting for release of SAP Cloud SDK 5.18.0

Context

https://github.com/SAP/ai-sdk-java-backlog/issues/171

Generate OpenAI 2024-10-21 automatically

Depends on SAP/cloud-sdk-java#745

Feature scope:

  • Apply new generator from Cloud SDK working branch.
    • Exclude paths
    • Exclude properties
    • Remove unreferenced components

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@newtork newtork marked this pull request as draft March 18, 2025 12:19
@newtork newtork marked this pull request as ready for review April 17, 2025 08:54
@newtork newtork enabled auto-merge (squash) April 17, 2025 08:55
@newtork newtork added the please-review Request to review a pull-request label Apr 17, 2025
Comment on lines -161 to +173
public boolean equals(@Nullable final Object o) {
public boolean equals(@Nullable final java.lang.Object o) {
Copy link
Member

@Jonas-Isr Jonas-Isr Apr 17, 2025

Choose a reason for hiding this comment

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

(Question)
Why is this change necessary/happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. Our generator has always (i.e. 2+ years) generated java.lang.Object.

What happened?

My assumption is: When I originally pushed the model classes, I generated them once in Cloud SDK repo. Then I moved them to AI SDK. Very likely, IntelliJ did some reduction / unintentional improvement, to remove the redundant FQN for Object.

Why would we want java.lang.Object in the first place?

Because some schema components may be called "Object" in the spec, leading to "Object" being generated. It's not a reserved keyword in java. Therefore, safest approach is to reference everything with fully-qualified-name.

Copy link
Member

@Jonas-Isr Jonas-Isr left a comment

Choose a reason for hiding this comment

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

LGTM

@newtork newtork merged commit dad524c into main Apr 22, 2025
6 checks passed
@newtork newtork deleted the openai/generated-model branch April 22, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please-review Request to review a pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants