You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a service class which is WCF REST. This class inherits from System.Data.Services.DataServices ( Assembly Name - Micrisoft.Data.Services) as folllows
I am inherting WcfRestClassExample from DataServices because it provides neccessary Web API implemenation for WebApiClassExample.
After configuring SwaggerWcf, I've realized WebGet1 and WebGet2 methods are not picked up by Swagger UI because WcfRestClassExample wasn't adroned with [ServiceContract]. If I decorate WcfRestClassExample with [ServiceContract] then WebGet1 and WebGet2 are shown in Swagger UI. But my service broke because the "[ServiceContract]" attribute is defined in multiple classes (WcfRestClassExample and System.Data.Services.IRequestHandler). System.Data.Services.DataServices inherits from System.Data.Services.IRequestHandler and IRequestHandler is decorated with [ServiceContract].
Is there a way to get WcfRestExample web get methods in Swagger UI without decorating it with ServiceContract attribute?
Thank you in advance!
Srikanth
The text was updated successfully, but these errors were encountered:
Hi Abel,
I have a service class which is WCF REST. This class inherits from System.Data.Services.DataServices ( Assembly Name - Micrisoft.Data.Services) as folllows
WcfRestClassExample : System.Data.Services.DataServices < WebApiClassExample >
{
WebGet1()
WebGet2()
}
I am inherting WcfRestClassExample from DataServices because it provides neccessary Web API implemenation for WebApiClassExample.
After configuring SwaggerWcf, I've realized WebGet1 and WebGet2 methods are not picked up by Swagger UI because WcfRestClassExample wasn't adroned with [ServiceContract]. If I decorate WcfRestClassExample with [ServiceContract] then WebGet1 and WebGet2 are shown in Swagger UI. But my service broke because the "[ServiceContract]" attribute is defined in multiple classes (WcfRestClassExample and System.Data.Services.IRequestHandler). System.Data.Services.DataServices inherits from System.Data.Services.IRequestHandler and IRequestHandler is decorated with [ServiceContract].
Is there a way to get WcfRestExample web get methods in Swagger UI without decorating it with ServiceContract attribute?
Thank you in advance!
Srikanth
The text was updated successfully, but these errors were encountered: