I implemented all the logic as per the guidelines using the SwaggerWCF nuget package and works great!
So I just tried to add reference of the project (removed nuget first) because I want to add some custom code in the project to support my logic.
The reason why we need that is one part of the URL is coming from the web.config:

And we are using a single common class using partial to define all the interface contracts. But, for each contract, the Address is different as defined in the web.config.
Unfortunately, the same logic which works for nuget is no more working after adding a project as a reference, even though I am the same source code without any changes. It gives error: "Failed to parse JSON/YAML response".
Thanks in advance!