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

Simplify extensions merge in `mergeOpenapiSchemas`

Open Juneezee opened this issue 1 year ago • 2 comments

From the Go specification ^1:

"3. If the map is nil, the number of iterations is 0."

Therefore, we don't need the nil checks for merging the Extensions. Just like how we did for Properties:

https://github.com/deepmap/oapi-codegen/blob/66f9bb8d73111908bb20d30bae90e65eb49a6770/pkg/codegen/merge_schemas.go#L202-L210

Juneezee avatar Jan 12 '24 10:01 Juneezee

Thanks @Juneezee! Would you mind merging the latest changes into your branch, also so CI can pick it up? I'm not sure I'll be able to as you're on your master branch.

More info

jamietanna avatar May 05 '24 10:05 jamietanna

@jamietanna I just rebased the latest changes. Please take a look again. Thanks :smiley: !

Juneezee avatar May 05 '24 10:05 Juneezee