go-apiops icon indicating copy to clipboard operation
go-apiops copied to clipboard

Support nullable fields

Open mheap opened this issue 7 months ago • 0 comments

From @AntoineJac:

when using a route with parameter the deck file openapi2kong cmd is forcing parameter to be present due to the regex  [^#?/]+ it should be [^#?/]* as the parameter could also be empty, depending of the parameter nullable field from the parameters sections. It is here: https://github.com/Kong/go-apiops/blob/aef76502a421e943b1d8ee9cf4384c92eccd17bb/openapi2kong/openapi2kong.go#L1080

It should be a quick addition, just need to map the regex captureGroup with path.parameters and read the nullable field. And use the [^#?/]* regex if nullable is true.

mheap avatar May 15 '25 09:05 mheap