Closed
Description
SUMMARY
If it is possible to make some attributes unavailable by default and vice versa if specify explicitly in the request?
DETAILS
I am working with a data collection in mongodb that is complex and contains many nested data structure (inside its own collection).
I wonder if it is possible to define some [attr ?] attribute that make view of nested data structure unavailable by default, and vice versa if specify explicitly in the request somehow?
STEPS TO REPRODUCE
- Here is my resource class. Now all Refs1, Refs2, Refs3 publicly available. How can I define here to give me the behaviours I described? Is it possible?
public class Resource1 : Identifiable<string>
{
[Attr]
public string? id { get; set; }
[Attr]
public string? name { get; set; }
[Attr]
public List<Ref1>? Refs1 { get; set; }
[Attr]
public List<Ref2>? Refs2 { get; set; }
[Attr]
public List<Ref3>? Refs3 { get; set; }
}
VERSIONS USED
- JsonApiDotNetCore version: 4,2.0
- ASP.NET Core version: 6.0
- Entity Framework Core version:
- Database provider: mongodb