Justin
Justin
@samomin46 thanks for your reply.
they are all Primitive Type, will be skipped.
ok, when use WebMessageBodyStyle.Wrapped & RequestFormat = WebMessageFormat.Xml, be carefull about the namespace of the datacontract
check Step 5 and Step 6 then visit http://localhost/RegistrationService/api-docs/swagger.json if you get json string, go to visit http://localhost/RegistrationService/api-docs/index.html
i create a project with your code, https://github.com/justin0522/swaggerwcf190 it works for me
i created a pull request to your project
1. add SwaggerWcfSecurity attribute on OperationContract methods 2. call SwaggerWcfEndpoint.Configure(info, securityDefinitions) before serviceHost.Open() about the [Security Scheme Object](https://swagger.io/specification/v2/#securitySchemeObject)
can you tell me the binding type and security mode of your endpoint ? > WebHttpBinding webHttpBinding = new WebHttpBinding(); webHttpBinding.Security.Mode = WebHttpSecurityMode.Transport; webHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
here is my advice: there are two methods in ServiceContract **ISwaggerWcfEndpoint**, remove the second (StaticContent), host the index.html by yourself, keep the first which provider the swagger.json content.