oapi-codegen
oapi-codegen copied to clipboard
Support params to be pointer to avoid copying large parameters
When parameters are used, such as headers, oapi-codegen generates such server that ..RequestObject structure would include Params structure directly, however when params are big, this would cause not efficient copying when calling strict server handler. The suggestion here is to allow to use pointer from request object to params here: https://github.com/oapi-codegen/oapi-codegen/blob/bdc4edce7476be0791dc670d695fd78378e0e9b6/pkg/codegen/templates/strict/strict-interface.tmpl#L7-L9 The reason for this pointer wouldn't be "this might not be present", but rather "this might not be efficient to copy every time request object is copied"