Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Conversation

@marcelltoth
Copy link

Fixes stoplightio/elements#275

This PR keeps the old RestSharp based generator (and does NOT update it to be async, etc), but adds a HttpClient based asynchronous one, and makes that the default.

The work is basically Atvaark's fork, with some slight modifications.

Copy link

@XVincentX XVincentX left a comment

Choose a reason for hiding this comment

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

I think there's a specific JSON Content instead of the generic StringContent (my reminiscences of C# aren't actually that good although I worked on it for a while) but I understand that this is a more generic solution.

@XVincentX XVincentX merged commit 031d5d9 into master Mar 4, 2020
@marcelltoth
Copy link
Author

I think there's a specific JSON Content instead of the generic StringContent (my reminiscences of C# aren't actually that good although I worked on it for a while) but I understand that this is a more generic solution.

That's Java, don't confuse them, it hurts their feelings. 😞 C# is "Java done right" anyway. 😎

Speaking more seriously, if there was such at type - and proposals are up there for .NET 5 - we could very well implement them. That will require mapping the input javascript object to nested anonymous classes in c#, but I think it's worth it.

@marcelltoth marcelltoth deleted the cs-httpclient branch March 5, 2020 14:09
@XVincentX
Copy link

Yo dude, f# for life. I'm not interested in anything more from the .NET world. I'm sure you'll understand why.

@marcelltoth
Copy link
Author

Yo dude, f# for life. I'm not interested in anything more from the .NET world. I'm sure you'll understand why.

I would've bet on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix C# code generation

4 participants