-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
base: master
Are you sure you want to change the base?
fix(cpp-qt-client): add asJsonObject method to OAIEnum class (#19307) #21211
Conversation
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. |
@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. |
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.
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!
988e125
to
543675d
Compare
…qt-enum-asjsonobject
@@ -15,6 +15,7 @@ use serde::{Deserialize, Serialize}; | |||
#[serde(untagged)] | |||
pub enum DuplicateOneOf { | |||
Order(Box<models::Order>), | |||
Order(Box<models::Order>), |
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.
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?
Add asJsonObject method to OAIEnum class for cpp-qt-client
Adds the missing method to enum moustache file
@etherealjoy @MartinDelille