You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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?
The text was updated successfully, but these errors were encountered:
JADNC will not perform operations on any properties that do not have the Attr or relationship attributes. You may need to explicitly tell Swashbuckle that this property is not exposed via the API. However, looking at the screenshot you probably have more issues since the content-type and document don't look like json:api. I haven't spent much time trying to get this to work with Swashbuckle, but I know we have a few users who have solved this. As time opens up, I do intend providing better support out-of-the-box or at minimum a step-by-step guide to getting Swagger running.
bugproof
changed the title
Data transfer objects, mismatch between models
Swashbuckle support
Jun 5, 2018
Example:
What I want to use for input and output of my API:
Even though
public ICollection<PersonInfo> PersonInfos { get; set; }
is not marked withAttr
my swagger spec generated from swashbuckle expects me to pass array of infos.Example POST:

Ideally my model should look like:
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?
The text was updated successfully, but these errors were encountered: