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

Swaggerwcf doesn't support ServiceContracts with the same methodsname. #197

Open
gtame opened this issue Jan 29, 2020 · 0 comments
Open

Comments

@gtame
Copy link

gtame commented Jan 29, 2020

The Servicecontract

`
[ServiceContract]
public interface IMessage
{

    [WebGet(UriTemplate = "/translations", BodyStyle = WebMessageBodyStyle.Bare)]
     string GetText(string classCode, long code);
    [WebGet(UriTemplate = "/translations", BodyStyle = WebMessageBodyStyle.Bare)]
    string GetText(string classCode, long code, string languageIso);

}
`

The service Implementation

`

   public class MessagesService : ESPBaseService, ESP.Contracts.Data.IMessage
  {
    [SwaggerWcfTag("Messages")]
    [SwaggerWcfPath("GetText", "Get messageText with current language")]
    string IMessage.GetText(string classCode, long code)
    {

        throw new NotImplementedException();
    }
    [SwaggerWcfTag("Messages")]
    [SwaggerWcfPath("GetText", "Get messageText with the current language in laguageIso")]
    string IMessage.GetText(string classCode, long code, string languageIso)
    {
        throw new NotImplementedException();
    }

}

`
The result:

swagger

The swagger.json have only one GetText section:

swagger json

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