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

OpenAI - Should not generate property if it is contained on a custom model base type #4629

Closed
JoshLove-msft opened this issue Oct 8, 2024 · 0 comments · Fixed by #4682
Closed
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@JoshLove-msft
Copy link
Contributor

When determining if we should generate a property or not, we need to consider the base models in addition to the current model.

@JoshLove-msft JoshLove-msft added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Oct 8, 2024
@jorgerangel-msft jorgerangel-msft self-assigned this Oct 8, 2024
@JoshLove-msft JoshLove-msft changed the title Should not generate property if it is contained on a custom model base type OpenAI - Should not generate property if it is contained on a custom model base type Oct 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 11, 2024
This PR address the following bugs:
- If a model contains a spec property that was also added as a custom
model in it's base model, the derived model will not generate the
property.
- if a custom property is added to a base model and it includes the
`CodeGenSerialization` attribute, that property is included in
serialization ctor for the derived model.

fixes: #4629
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants