swaggerwcf icon indicating copy to clipboard operation
swaggerwcf copied to clipboard

Interface Inherits others Interface

Open cacosta2018 opened this issue 6 years ago • 5 comments

Hello Abel, I wanted to consult you if there is a way to handle an interface that inherits other interfaces. Within my application I have this situation and when validating the json generated it tells me the following error Duplicate key post, this because the json duplicates the documentation of the methods that correspond to the inheritance of the interface, I attach the Json generated in line 233 You can see that there is a duplicity. I remain attentive to your comments. UnderWritingService.txt UnderWritingService.txt

cacosta2018 avatar Oct 02 '18 20:10 cacosta2018

Hide all the unwanted tags in the web.config.

xkzt0 avatar Oct 02 '18 20:10 xkzt0

Thanks @xkzt0 for your help but the problem persists. I need to be able to indicate within the schema of inheritance swagger. For what I checked inside the Schema class there is a property that is ParentSchema but how can I use that property since this class is internal. I need to do this since my project has interface inheritance and the json that generates swagger has errors that indicate that there is a duplicate key because the legacy methods document them more than once. Please any suggestions

cacosta2018 avatar Oct 03 '18 14:10 cacosta2018

@cacosta2018 do you add ServiceContract Attribute on both interfaces ? even implement class ?

justin0522 avatar Oct 04 '18 01:10 justin0522

Hi @justin0522 yes on both interface

cacosta2018 avatar Oct 04 '18 12:10 cacosta2018

@cacosta2018 maybe you should remove ServiceContract Attribute from interfaces, add it on implement class. Or merge two interfaces to one.

justin0522 avatar Oct 05 '18 01:10 justin0522