I'm working on an API spec in swagger that has an endpoint:
/authorizations
I would like to define an alternative spelling (authorisations) for this endpoint as well. Is this possible? Or do I need to define a separate route for each spelling?
/authorizations:
get:
description: Returns a list of authorizations
A possible workaround is to define another path that
$ref
s the original path, this way you end up with two copies of the same path.One limitation of this technique is that you cannot have
operationId
for these paths, because both paths will end up with the same ID, which is not allowed.If you need to have different
operationId
in paths, you'll need to define the 2nd path in the usual way (i.e. copy-paste the definition from the 1st path).