Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][GO] only import reflect when using it #19967

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 24, 2024

  1. fix(go): only import reflect when using it

    The api.mustache template only uses the reflect package if there is a
    query parameter which `isCollectionFormatMulti`. The import for the
    reflect package is however added if _any_ parameter is
    `isCollectionFormatMulti`.
    
    If the parameter which `isCollectionFormatMulti` e.g. is in the body
    instead of the query, this leads to the import being part of the
    generated code but not used and the code does not compile.
    
    This updates reworks the import handling for the `reflect` package so
    that it is only added if there is a query parameter which
    `isCollectionFormatMulti`.
    perhallgren committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    1824463 View commit details
    Browse the repository at this point in the history