Skip to content

Improve readability of plugin properties #147

@garrytrinder

Description

@garrytrinder

The order of the properties in the plugin object don't follow a common pattern. This makes it difficult to follow when skimming.

Current schema

In the below example, the GraphSelectGuidancePlugin and MockResponsePlugin plugins have properties ordered differently.

The current schema:

{
  "plugins": [
    {
      "pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
      "name": "GraphSelectGuidancePlugin",
      "urlsToWatch": [
        "https://graph.microsoft.com/v1.0/*",
        "https://graph.microsoft.com/beta/*",
        "https://graph.microsoft.us/v1.0/*",
        "https://graph.microsoft.us/beta/*",
        "https://dod-graph.microsoft.us/v1.0/*",
        "https://dod-graph.microsoft.us/beta/*",
        "https://microsoftgraph.chinacloudapi.cn/v1.0/*",
        "https://microsoftgraph.chinacloudapi.cn/beta/*"
      ]
    },
    {
      "configSection": "mocksPlugin",
      "pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
      "name": "MockResponsePlugin",
      "disabled": false
    }
  ]
}

Suggested schema

I would like to suggest a common order to help with skimming the file.

The suggested order:

  • name
  • disabled
  • pluginPath
  • configSection
  • urlsToWatch

The suggested schema:

{
  "plugins": [
    {
	  "name": "GraphSelectGuidancePlugin",
	  "disabled": false,
      "pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
      "urlsToWatch": [
        "https://graph.microsoft.com/v1.0/*",
        "https://graph.microsoft.com/beta/*",
        "https://graph.microsoft.us/v1.0/*",
        "https://graph.microsoft.us/beta/*",
        "https://dod-graph.microsoft.us/v1.0/*",
        "https://dod-graph.microsoft.us/beta/*",
        "https://microsoftgraph.chinacloudapi.cn/v1.0/*",
        "https://microsoftgraph.chinacloudapi.cn/beta/*"
      ],
    },
    {
	  "name": "MockResponsePlugin",
	  "disabled": false,
	  "pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
      "configSection": "mocksPlugin",
    }
  ]
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions