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

[Bug]: Subclass conctructor generation contains unexpected String object field #5157

Open
4 tasks done
jpalvarezl opened this issue Nov 20, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working needs-area

Comments

@jpalvarezl
Copy link
Member

Describe the bug

I am working on generating a Java client library for the Azure OpenAI Realtime Audio service in this PR. The code generation is based of this TSP specification.

The issue injects a String object parameter to the constructor of the RealtimeResponseMessageItem, RealtimeResponseFunctionCallOutputItem classes which causes an error for the deserialization method.

Reproduction

By using the tsp-client sync and tsp-client generate commands, one can reproduce the issue currently with the repository in the present state of the PR linked in the description of the issue (Azure/azure-sdk-for-java#42707)

This results in the following constructors being generated for their respective classes:

@Generated
    private RealtimeResponseFunctionCallOutputItem(String object, String id, String callId, String output) {
        super(object, id);
        this.callId = callId;
        this.output = output;
    }

and

@Generated
    private RealtimeResponseFunctionCallItem(String object, String id, String name, String callId, String arguments,
        RealtimeItemStatus status) {
        super(object, id);
        this.name = name;
        this.callId = callId;
        this.arguments = arguments;
        this.status = status;
    }

Checklist

@jpalvarezl jpalvarezl added the bug Something isn't working label Nov 20, 2024
@jpalvarezl jpalvarezl changed the title [Bug]: [Bug]: Subclass conctructor generation contains unexpect String object field Nov 20, 2024
@jpalvarezl jpalvarezl changed the title [Bug]: Subclass conctructor generation contains unexpect String object field [Bug]: Subclass conctructor generation contains unexpected String object field Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

1 participant