Replies: 1 comment
-
|
Mocks are static, so if you want to implement filtering, you'd need different mocks for the different filters. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does graph proxy support odata filtering? and other operations like 'select'?
For example, if my front end app GET request:
Example with filter:
https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=startswith(operatingSystem,'macOS')
Example with filter and select:
https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=startswith(operatingSystem,'macOS')&$select=deviceName
My assumption is the mock would need to be structured to support the exact filtering?
Snippet of current mock:
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.2.0/mockresponseplugin.mocksfile.schema.json",
"mocks": [
{
"request": {
"url": "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices",
"exampleUrl": "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices",
"method": "GET"
},
"response": {
"statusCode": 200,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Content-Length",
"value": "5107"
}
],
"body": {
"value": [
{
"@odata.type": "#microsoft.graph.managedDevice",
"id": "",
"deviceName": "cp-469082",
"deviceType": "windowsRT",
"managementAgent": "mdm",
"managedDeviceOwnerType": "company",
"joinType": "hybridAzureADJoined",
"operatingSystem": "Windows",
"osVersion": "10.0.19045.8861",
"skuFamily": "Enterprise",
"manufacturer": "Asus",
"model": "Asus ZenBook `Duo",``
Beta Was this translation helpful? Give feedback.
All reactions