oapi-codegen
oapi-codegen copied to clipboard
feature: Add support for path aliases
This PR intends to add support for path aliases using references as such
/test/alias/{name}:
$ref: "#/paths//test/{name}"
/test/{name}:
get:
tags:
- test
summary: Get test
operationId: getTestByName
It assumes that the operationId
can only be repeated if you have a reference.
Fixes #223
I just noticed that since I replaced a slice with a map for lookup, the order of the functions in the generated code actually changes. This is undesirable and I will address that.
Hi, @deepmap-marcinr is there something missing from this PR to help make it land? We are using @rodcloutier's fork with this feature for transitioning some paths to a v1 prefix and this patch helps remove duplication for two endpoints varying only by path. I am available for helping if need be.