oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Make external ref internalization optional

Open kkroo opened this issue 2 years ago • 4 comments

This disables the call to InternalizeRefs by default in GenerateInlinedSpec.

Currently, internalizing external references results in broken validator due to https://github.com/getkin/kin-openapi/issues/618 and is unnecessary because of import-mapping configuration feature.

Not sure if the call to InternalizeRefs is an artifact, so added a flag to enable in output options but can remove it all together as well per the maintainers' discretion.

kkroo avatar Nov 07 '22 03:11 kkroo

How can I get this merged?

kkroo avatar Nov 21 '22 19:11 kkroo

Needs either the owner or one of the collaborators to review, approve and merge.

stevenh avatar Nov 25 '22 21:11 stevenh

Hey @kkroo this was added as part of https://github.com/deepmap/oapi-codegen/pull/771 due to cases where a non-import-mapped specification broke, i.e. one where we're $refing a schema (example) at which point no validation issues were seen.

I'll try and get a look at this soon, do you have an example spec where this is breaking?

jamietanna avatar Nov 27 '22 11:11 jamietanna

Hey @kkroo friendly nudge, as I've just seen this again, and I didn't get a reply last time. NP if it's not still a priority for you

jamietanna avatar May 03 '24 20:05 jamietanna