-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
NsWag generated code for c# dose not match with response dto object #2552
Comments
@Rgl88, ABP wraps result with AjaxResponse. I think NSwag cannot understand this. Maybe you can use a class for NSwag to get only Result field of returned response. Have you checked on NSwag's repo if this is possible ? |
@ismcagdas as for response from Nswag owner, i can add attribute to controller methods, but in abp controllers generated dynamicly (Application Services as Controllers). Attribute for controller methods
|
You can add that attribute to application service classes (not interfaces) and it should work. Surely, you need to add a reference to swagger in that case, but there is no other way. |
It is very hard to add this attribute to all methods and for AsyncCrudAppService must all methods overrided,
|
Very simple solution:
|
This worked for me, but I used
instead of
as per this |
I use blow code for get token in winform:
The service class generated via Nswag.
but problem where blow method want deserialize json response to AuthenticateResultModel and it not work.
deserializer not work because response template do not match with AuthenticateResultModel
Response:
But AuthenticateResultModel:
I test with new model class and it work how configure Nswag or Abp to generate correct code?
The text was updated successfully, but these errors were encountered: