Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Command: `dev-proxy-toolkit.config-new` - Create new configuration file
- Command: `dev-proxy-toolkit.restart` - Restart Dev Proxy
- Snippets: `devproxy-plugin-typespec-generator` - TypeSpecGeneratorPlugin instance
- Snippets: `devproxy-plugin-typespec-generator-config` - TypeSpecGeneratorPlugin config section

### Changed:

Expand All @@ -39,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added:

- Snippets: `devproxy-rewrite` - Dev Proxy rewrite
- Snippets: `devproxy-plugin-rewrite` - Dev Proxy rewrite
- Snippets: `devproxy-plugin-rewrite-file` - RewritePlugin rewrites file
- Snippets: `devproxy-plugin-rewrite-file-schema` - RewritePlugin rewrites file schema
- Diagnostics: Show warning if config contains a summary plugin without a reporter
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ Shown when the active document is a Dev Proxy configuration file
| `devproxy-plugin-rewrite-file` | RewritePlugin rewrites file |
| `devproxy-plugin-rewrite-file-schema` | RewritePlugin rewrites file schema |
| `devproxy-plugin-rewrite-config` | RewritePlugin config section |
| `devproxy-plugin-typespec-generator` | TypeSpecGeneratorPlugin instance |
| `devproxy-plugin-typespec-generator-config` | TypeSpecGeneratorPlugin config section |
| `devproxy-plugin-url-discovery` | UrlDiscoveryPlugin instance |
| `devproxy-reporter-json` | JsonReporter instance |
| `devproxy-reporter-markdown` | MarkdownReporter instance |
Expand Down
11 changes: 11 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ export const pluginSnippets: PluginSnippets = {
required: true,
}
},
TypeSpecGeneratorPlugin: {
instance: 'devproxy-plugin-typespec-generator',
config: {
name: 'devproxy-plugin-typespec-generator-config',
required: false,
}
},
UrlDiscoveryPlugin: {
instance: 'devproxy-plugin-url-discovery',
},
Expand Down Expand Up @@ -332,6 +339,10 @@ export const pluginDocs: PluginDocs = {
name: 'Rewrite Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/rewriteplugin',
},
TypeSpecGeneratorPlugin: {
name: 'TypeSpec Generator Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/typespecgeneratorplugin',
},
UrlDiscoveryPlugin: {
name: 'UrlDiscovery Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/urldiscoveryplugin',
Expand Down
35 changes: 28 additions & 7 deletions src/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
],
"description": "Dev Proxy response header"
},
"Rewrite":{
"Rewrite": {
"prefix": "devproxy-rewrite",
"body": [
"{",
Expand Down Expand Up @@ -462,7 +462,7 @@
"\t\t\"https://graph.microsoft.us/beta/*\",",
"\t\t\"https://dod-graph.microsoft.us/beta/*\",",
"\t\t\"https://microsoftgraph.chinacloudapi.cn/beta/*\"",
"\t]",
"\t]",
"}"
],
"description": "GraphBetaSupportGuidancePlugin instance"
Expand Down Expand Up @@ -947,7 +947,7 @@
],
"description": "RewritePlugin instance"
},
"RewritePluginFile":{
"RewritePluginFile": {
"prefix": "devproxy-plugin-rewrite-file",
"body": [
"{",
Expand All @@ -959,14 +959,14 @@
],
"description": "RewritePlugin rewrites file"
},
"RewritePluginFileSchema":{
"RewritePluginFileSchema": {
"prefix": "devproxy-plugin-rewrite-file-schema",
"body": [
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.27.0/rewriteplugin.rewritesfile.schema.json\","
],
"description": "RewritePlugin rewrites file schema"
},
"RewritePluginConfig":{
"RewritePluginConfig": {
"prefix": "devproxy-plugin-rewrite-config",
"body": [
"\"rewritePlugin\": {",
Expand All @@ -975,8 +975,29 @@
"}"
],
"description": "RewritePlugin config section"
},
"UrlDiscoveryPlugin": {
},
"TypeSpecGeneratorPlugin": {
"prefix": "devproxy-plugin-typespec-generator",
"body": [
"{",
"\t\"name\": \"TypeSpecGeneratorPlugin\",",
"\t\"enabled\": true,",
"\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\"",
"}"
],
"description": "TypeSpecGeneratorPlugin instance"
},
"TypeSpecGeneratorPluginConfig": {
"prefix": "devproxy-plugin-typespec-generator-config",
"body": [
"\"typeSpecGeneratorPlugin\": {",
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.27.0/typespecgeneratorplugin.schema.json\",",
"\t\"ignoreResponseTypes\": false",
"}"
],
"description": "TypeSpecGeneratorPlugin config section"
},
"UrlDiscoveryPlugin": {
"prefix": "devproxy-plugin-url-discovery",
"body": [
"{",
Expand Down