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
Post a Comment