Skip to content

Swashbuckle support #286

Closed
Closed
@bugproof

Description

@bugproof

Example:

public class Person : Identifiable
{
    public ICollection<PersonInfo> PersonInfos { get; set; }
}

What I want to use for input and output of my API:

public class Person
{
    public PersonInfo PersonInfo { get; set; }
}

Even though public ICollection<PersonInfo> PersonInfos { get; set; } is not marked with Attr my swagger spec generated from swashbuckle expects me to pass array of infos.

Example POST:
image

Ideally my model should look like:

public class Person : Identifiable
{
    public ICollection<PersonInfo> PersonInfos { get; set; }
    [Attr("info"), NotMapped]
    public PersonInfo PersonInfo { get; set; }
}

Will JADNC ignore this array anyway? Means it is only visible like that because of Swashbuckle and I can resolve this with custom filter for swashbuckle, or it's a fault of the library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions