Skip to content
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

ServiceContract Attribute #191

Open
Srikanth-Gutha opened this issue Apr 8, 2019 · 0 comments
Open

ServiceContract Attribute #191

Srikanth-Gutha opened this issue Apr 8, 2019 · 0 comments

Comments

@Srikanth-Gutha
Copy link

Srikanth-Gutha commented Apr 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant