SkywardApps / popcorn

Popcorn is a .Net Middleware for your RESTful API that allows your consumers to request exactly as much or as little as they need, with no effort from you.
https://skywardapps.github.io/popcorn/
MIT License
59 stars 19 forks source link

ExpandResultAttribute should optionally allow a parameter to disable expansion when applied #32

Closed undiwahn closed 5 years ago

undiwahn commented 6 years ago

Right now you can:

There's no way to expand all endpoints automatically, but opt out of specific endpoints.

Desired Behavior

There should be a property on the ExpandResultAttribute class called bool ShouldExpand. This must be settable via a constructor, so that all of:

work. This means that the property will need to be checked in OnActionExecuted. If ShouldExpand is false, then the inspect should not run either.