Skip to content

Disable Inclusion Parameter #130

Closed
Closed
@jaredcnance

Description

@jaredcnance

It is possible that an endpoint should not support the inclusion parameter. One example would be a resource endpoint that includes relationships by default. This should apply to all Query requests and so a attr on the controller seems reasonable:

[DisableQuery(QueryParams.Include)]
public class PeopleController : JsonApiController<Person>
{
    public PeopleController(
        IJsonApiContext jsonApiContext,
        IResourceService<Person> resourceService) 
        : base(jsonApiContext, resourceService)
    { }
}

Eventually, this attribute may extend to other query parameters as well.

[DisableQuery(QueryParams.Include | QueryParams.Filter)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions