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

Add the Optional helper class implementation #3535

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

ShivangiReja
Copy link
Contributor

Fixes: #3508

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jun 6, 2024
Comment on lines +44 to +46
public static bool IsDefined(System.Text.Json.JsonElement value)
{
return value.ValueKind != System.Text.Json.JsonValueKind.Undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorgerangel-msft I believe you have added post processing to prevent inline namespaces. Do you happen to know why it's generating like this? Is there anything I'm missing?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure, I noticed this too hence why I opened #3367 to investigate. We already added the Reduce functionality from Roslyn, so I'm guessing there is an issue with the metadata reference resolver event handler I added.

Copy link
Member

@ArcturusZhang ArcturusZhang Jun 7, 2024

Choose a reason for hiding this comment

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

Yeah we have this issue because Roslyn now does not know about anything in System.Text.Json dll. It should be resolved if we add more dlls into roslyn's scope

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@ShivangiReja ShivangiReja added this pull request to the merge queue Jun 6, 2024
Merged via the queue into microsoft:main with commit bb9bafc Jun 6, 2024
21 checks passed
@ShivangiReja ShivangiReja deleted the Shreja_AddOptionalType branch June 6, 2024 16:53
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 this pull request may close these issues.

Generate Optional type
5 participants