Skip to content

Commit c35de02

Browse files
Adding multi-url-support spec (#70)
1 parent 46d601a commit c35de02

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

specs/multi-url-support.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Support for any URLs via the Microsoft Graph Developer Proxy
2+
3+
Some applications are using an hybrid approach when it comes to consuming APIs. Some APIs are available on Microsoft Graph while some are not. To enable developers to fully test their scenarios with the Microsoft Graph Developer Proxy, the proxy should support acting as a reverse proxy for more than just one URL at a time, and include URLs that are outside of the Microsoft Graph. This can also be used by internal teams to test their APIs on internal endpoints.
4+
5+
## History
6+
7+
| Version | Date | Comments | Author |
8+
| ------- | -------- | ----- | --- |
9+
| 1.0 | 2022-12-09 | Initial specifications | @sebastienlevert |
10+
11+
12+
## Configuration file
13+
14+
Reusing the `appSettings.json` configuration file should be possible for developers who want to support scenarios outside of Microsoft Graph. This file should have default values for all supported Microsoft Graph clouds and SharePoint URLs.
15+
16+
This configuration can also be extended by "any" URLs to support 1P endpoints, vanity URLs, custom services, etc.
17+
18+
```json
19+
{
20+
"hostsToWatch": [
21+
"graph.microsoft.com",
22+
"graph.microsoft.us",
23+
"dod-graph.microsoft.us",
24+
"microsoftgraph.chinacloudapi.cn",
25+
"*.sharepoint.*",
26+
"*.sharepoint-df.*"
27+
"customService.azurewebsites.net"
28+
]
29+
}
30+
```
31+
32+
## Remove the `--cloud` option on the Proxy
33+
34+
This new capability renders the `--cloud` option obsolete on the Proxy. We should remove the capability and its associated documentation.
35+
36+
## Mocking responses
37+
38+
Responses can be mocked and should be updated to include the absolute URL for the response to be returned.
39+
40+
```json
41+
{
42+
"responses": [
43+
{
44+
"url": "https://graph.microsoft.com/v1.0/me",
45+
"responseBody": {
46+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
47+
"businessPhones": [
48+
"+1 412 555 0109"
49+
],
50+
"displayName": "Megan Bowen",
51+
"givenName": "Megan",
52+
"jobTitle": "Auditor",
53+
"mail": "[email protected]",
54+
"mobilePhone": null,
55+
"officeLocation": "12/1110",
56+
"preferredLanguage": "en-US",
57+
"surname": "Bowen",
58+
"userPrincipalName": "[email protected]",
59+
"id": "48d31887-5fad-4d73-a9f5-3c356e68a038"
60+
}
61+
},
62+
]
63+
}
64+
```

0 commit comments

Comments
 (0)