Skip to content

When a form field is nullable: error binding string parameter: can not bind to destination of type: map #129

Description

@Southclaws

It seems the reflection in BindForm does not support nullable.Nullable - which is generated when you set nullable: true in the spec. I'm not sure if this is unique to form media type or if it applies to JSON too.

Structure generated by oapi-codegen with nullable[T] types:

Image

Form values:

Image

It seems this is because BindStringToObjectWithOptions does not contain "map" but nullable's underlying type is map

I'm not sure if you want to tackle there here or within the nullable package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions