NswagStudio: C#-Client causes the error messages that some functions aren't available in the context

149 Views Asked by At

I use NswagStudio to generate a C#-Client by the swagger.json. If I generate the C#-Client I will get always the error messages that the functions UpdateJsonSerializerSettings() and CreateHttpRequestMessageAsync() aren't available in this context.

I checked the generated client-file and didn't find these functions. This is obviously the reason.

My question is how I can generate these both functions with NswagStudio too like all the other functions?

enter image description here

1

There are 1 best solutions below

0
On

After read the nwsagstudio source code, I found I have changed the nwsagstudio definition file and set "generateUpdateJsonSerializerSettingsMethod": true

This resolved my issue.