Forum Discussion

kayalps's avatar
kayalps
New Member
4 years ago

How to use a same method name with different tags?

Hi,
I have a scenario where I have two different tags with same method name. But its throwing compilation error in swagger editor saying that "duplicated mapping key".

/get_property:
 post:
   tags:
        - Car
/get_property:
 post:
   tags:
        - Bike

 
Could someone please help on how to make it possible in yaml?

Thanks

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Add both tags to the same operation, like so:

    /get_property:
      post:
        tags:
          - Car
          - Bike