Reputation: 11
I have a scenario where I have two different tags with same method name. But it's throwing a syntax error in Swagger Editor saying "duplicated mapping key".
What is the correct way to write this in OpenAPI?
/get_property:
post:
tags:
- Car
/get_property:
post:
tags:
- Bike
Upvotes: 1
Views: 756
Reputation: 97717
tags
can be a list of tags, not just a single tag. You should use a single operation and put all applicable tags in the tags
list:
paths:
/get_property:
post:
tags:
- Car
- Bike
Upvotes: 1