Skip to content

[Golang] Optional parameters are not optional. #4269

@antihax

Description

@antihax
Description

Currently optional parameters generate code with no option to exclude them, making the parameters required.

Swagger-codegen version

master HEAD

Suggestions
  1. Use interface{} for optional parameters, except string, with run-time type checking.
  2. Use pointers (dangerous due to race conditions: i.e. go func in for loop).
  3. Use a map to pass parameters (similar to the Perl version).

I am leaning towards implementing 1 unless there are other suggestions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions