这是indexloc提供的服务,不要输入任何密码
Skip to content

documenting array[T] instead of array[object] #871

@repelliuss

Description

@repelliuss
type userArrayResponse struct {
	Body struct {
		Users []sql.User `json:"users"`
	}
}

In the generated OpenAPI docs, UserArrayResponseBody schema shows an array[object] text which I would like it to say array[User]. Documented JSON is correct for User. I've looked for some time but was not able to get this, like trying to implement SchemeProvider etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions