parvez3019/go-swagger3

How to mark field as nullable?

Closed this issue · 2 comments

I would like to mark Name as nullable field. How can I achieve that?

type Task struct {
	ID        int            `json:"task_id" gorm:"index:idx_name,unique" required:"true"`
	Name      string         `json:"task_name"  required:"true"`
}

I've tried nullable: true, x-nullable: true without much success. Returned json doesn't return anything that would resemble nullability.

Hey @jrozbicki Unfortunately this hasn't been implemented yet.
Ref -

// Nullable

qequ commented

Clossing as adressed in #34