Skip to content

fix(cpp-qt-client): add asJsonObject method to OAIEnum class (#19307) #21211

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ReallyVirtual
Copy link

Add asJsonObject method to OAIEnum class for cpp-qt-client

Adds the missing method to enum moustache file

@etherealjoy @MartinDelille

@MartinDelille
Copy link
Contributor

Can you explain the need for this new method ? Also, you would need to re-generate the example if you want the PR to be merge.

@ReallyVirtual
Copy link
Author

@MartinDelille This PR adds the missing asJsonObject method to the Enum class. When generating the schema for enums, the generated client code does not compile with my FastAPI schemas that use enums, as the client is expecting this method.

The issue is also reported by another person here: #19307

I've generated and pushed the examples.

Copy link
Contributor

@MartinDelille MartinDelille left a comment

Choose a reason for hiding this comment

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

Thank you for you for your edit and your explanation. I indeed don't use edit and had trouble using it one time in the past!

@ReallyVirtual ReallyVirtual force-pushed the fix-cpp-qt-enum-asjsonobject branch from 988e125 to 543675d Compare May 8, 2025 08:41
@@ -15,6 +15,7 @@ use serde::{Deserialize, Serialize};
#[serde(untagged)]
pub enum DuplicateOneOf {
Order(Box<models::Order>),
Order(Box<models::Order>),
Copy link
Member

Choose a reason for hiding this comment

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

not sure why there are changes to rust samples

can you please file a new PR based on the latest master to see if these changes to rust samples no longer appear?

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