Title: Create webapi action filter for filtering IQueryables by csantero · Pull Request #16 · JSONAPIdotNET/JSONAPI.NET · GitHub
Open Graph Title: Create webapi action filter for filtering IQueryables by csantero · Pull Request #16 · JSONAPIdotNET/JSONAPI.NET
X Title: Create webapi action filter for filtering IQueryables by csantero · Pull Request #16 · JSONAPIdotNET/JSONAPI.NET
Description: This adds a new action filter called JsonApiQueryableActionFilterAttribute that can be inserted into the WebAPI pipeline. It detects if the object content is an IQueryable<>. If it is, the filter performs exact-match filtering according to the json-api spec. Filtering is supported for the following types: String Boolean SByte Byte Int16 UInt16 Int32 UInt32 Int64 UInt64 Single Double Decimal DateTime DateTimeOffset Enum as well as their nullable counterparts. There is not yet support for linked IDs. A few notes on the behavior: If multiple filter parameters are passed, they will be ANDed together. So GET /people?firstName=John&lastName=Doe will yield all people whose first name is John AND last name is Doe. If multiple values are passed for the same field, like GET /people?firstName=John&firstName=Bill, the behavior is undefined. If a parameter is passed for a property that does not exist, it will be ignored. If a parameter is passed for a property of a type that is unsupported, it will be ignored. I went back on forth on whether this should remove all results or leave the query unchanged. I went with the latter approach, but I don't have a strong opinion on it. Eventually we could provide an extensibility point to let the user specify their own filtering mechanism for unsupported types. An empty string for a nullable type is interpreted as null. An empty string for a non-nullable type is interpreted as an invalid filter and will return no results. In the same vein as the previous point, we could instead choose to just ignore the filter.
Open Graph Description: This adds a new action filter called JsonApiQueryableActionFilterAttribute that can be inserted into the WebAPI pipeline. It detects if the object content is an IQueryable<>. If it is, the fi...
X Description: This adds a new action filter called JsonApiQueryableActionFilterAttribute that can be inserted into the WebAPI pipeline. It detects if the object content is an IQueryable<>. If it is...
Opengraph URL: https://github.com/JSONAPIdotNET/JSONAPI.NET/pull/16
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:35fdbb59-c3da-4888-1ff3-f70fd833c6cf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ACA4:2AE5C2:CDB80D:1297FF4:6A54A958 |
| html-safe-nonce | e40706f9b9b2526850e5fd5c69f8ef53f0935625335d5581be79088ff7df70b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0E0OjJBRTVDMjpDREI4MEQ6MTI5N0ZGNDo2QTU0QTk1OCIsInZpc2l0b3JfaWQiOiI1NjE5NDM1MDQ4OTM4MDIzMjU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2aaa0552d2de5a70e7e6678a9ebed3fb70f57d438b2cb9381c093bd1658ab812 |
| hovercard-subject-tag | pull_request:27733756 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/JSONAPIdotNET/JSONAPI.NET/pull/16/files |
| twitter:image | https://avatars.githubusercontent.com/u/828286?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/828286?s=400&v=4 |
| og:image:alt | This adds a new action filter called JsonApiQueryableActionFilterAttribute that can be inserted into the WebAPI pipeline. It detects if the object content is an IQueryable<>. If it is, the fi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/JSONAPIdotNET/JSONAPI.NET git https://github.com/JSONAPIdotNET/JSONAPI.NET.git |
| octolytics-dimension-user_id | 16112275 |
| octolytics-dimension-user_login | JSONAPIdotNET |
| octolytics-dimension-repository_id | 27474358 |
| octolytics-dimension-repository_nwo | JSONAPIdotNET/JSONAPI.NET |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27474358 |
| octolytics-dimension-repository_network_root_nwo | JSONAPIdotNET/JSONAPI.NET |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width