fix(overlay): correctly resolve references after Overlay application#1825
Conversation
|
Interesting - would you mind adding an example of this to I've not hit this before, but would be good to see what we're missing |
|
@jamietanna Thank you for the swift review! I agree and removed config flag and enabled it by default. I also added an example to Apparently the issue only occurs if the spec is in a diffent directory then the one oapi-codegen is invoked from. Therefore I put the spec.yaml into the subdirectory |
|
@jamietanna Is the example sufficient or do you need more information? :) |
|
Thanks very much for this @jgraeger - this was a good catch, and I'm classing this as a bug, not a feature 😅 I've pushed a couple of tweaks - will wait for CI then merge Main tweaks:
|
|
Tried this fix on my side and it works well! Is there any ETA for this release @jamietanna? Thanks! |
When working with overlays, oapi-codegen doesn't support external references, even though they are supported for the same file without overlays.
This PR
adds a new settingconfigures the oapi loader such as the external references are resolved as for a normal file (against the filepath of the spec).resolve-refsto the OverlayOutput configuration. If enabled,