aspnetboilerplate - generating swagger client using swaggergen tool doesnt work with asp net boilerplate -


i tried generating c# code , api created asp net boilerplate, response not deserializing correctly.

upon investigation, seems json response wrapped using class called "ajaxresponse"; however, swagger.json doesnt include type in method response.

does know how build c# swagger client accounts wrapped result?

aspnet boilerplate wraps real result within ajaxresponse. class ajaxresponse generic type class. swaggergen tool fails produce right proxy classes because wrapping result occurs in runtime. signature of api, grabbed swagger raw result (not wrapped).

so solution disabling automatic wrapper solution-wide. add 2 lines preinitialize() method in web.core project. , problem solved.

configuration.modules.abpaspnetcore().defaultwrapresultattribute.wraponerror = false;

configuration.modules.abpaspnetcore().defaultwrapresultattribute.wraponsuccess = false;


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -