-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scaffold required resource snippet based on the resourceType & apiVer…
…sion (#2172)
- Loading branch information
Showing
26 changed files
with
701 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
88 changes: 88 additions & 0 deletions
88
src/Bicep.Core.Samples/Files/Completions/resourceObject.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
[ | ||
{ | ||
"label": "for", | ||
"kind": "snippet", | ||
"detail": "for", | ||
"documentation": { | ||
"kind": "markdown", | ||
"value": "```bicep\n[for item in list: {\n\t\n}]\n```" | ||
}, | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "1_for", | ||
"insertTextFormat": "snippet", | ||
"insertTextMode": "adjustIndentation", | ||
"textEdit": { | ||
"range": {}, | ||
"newText": "[for ${2:item} in ${1:list}: {\n\t$0\n}]" | ||
} | ||
}, | ||
{ | ||
"label": "for-filtered", | ||
"kind": "snippet", | ||
"detail": "for-filtered", | ||
"documentation": { | ||
"kind": "markdown", | ||
"value": "```bicep\n[for (item, index) in list: if (condition) {\n\t\n}]\n```" | ||
}, | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "1_for-filtered", | ||
"insertTextFormat": "snippet", | ||
"insertTextMode": "adjustIndentation", | ||
"textEdit": { | ||
"range": {}, | ||
"newText": "[for (${2:item}, ${3:index}) in ${1:list}: if (${4:condition}) {\n\t$0\n}]" | ||
} | ||
}, | ||
{ | ||
"label": "for-indexed", | ||
"kind": "snippet", | ||
"detail": "for-indexed", | ||
"documentation": { | ||
"kind": "markdown", | ||
"value": "```bicep\n[for (item, index) in list: {\n\t\n}]\n```" | ||
}, | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "1_for-indexed", | ||
"insertTextFormat": "snippet", | ||
"insertTextMode": "adjustIndentation", | ||
"textEdit": { | ||
"range": {}, | ||
"newText": "[for (${2:item}, ${3:index}) in ${1:list}: {\n\t$0\n}]" | ||
} | ||
}, | ||
{ | ||
"label": "if", | ||
"kind": "snippet", | ||
"detail": "if", | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "1_if", | ||
"insertTextFormat": "snippet", | ||
"insertTextMode": "adjustIndentation", | ||
"textEdit": { | ||
"range": {}, | ||
"newText": "if (${1:condition}) {\n\t$0\n}" | ||
} | ||
}, | ||
{ | ||
"label": "{}", | ||
"kind": "snippet", | ||
"detail": "{}", | ||
"documentation": { | ||
"kind": "markdown", | ||
"value": "```bicep\n{\n\t\n}\n```" | ||
}, | ||
"deprecated": false, | ||
"preselect": true, | ||
"sortText": "2_{}", | ||
"insertTextFormat": "snippet", | ||
"insertTextMode": "adjustIndentation", | ||
"textEdit": { | ||
"range": {}, | ||
"newText": "{\n\t$0\n}" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...LangServer.IntegrationTests/Completions/SnippetTemplates/res-automation-module/main.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// $1 = 'name' | ||
// $2 = automationAccountVariable | ||
// $3 = 'name' | ||
// $4 = 'https://test-content-url.nupkg' | ||
|
||
// Insert snippet here |
13 changes: 13 additions & 0 deletions
13
...r.IntegrationTests/Completions/SnippetTemplates/res-automation-module/main.combined.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
resource automationAccount 'Microsoft.Automation/automationAccounts@2015-10-31' = { | ||
name: 'name' | ||
} | ||
|
||
resource automationAccountVariable 'Microsoft.Automation/automationAccounts/modules@2015-10-31' = { | ||
parent: automationAccount | ||
name: 'name' | ||
properties: { | ||
contentLink: { | ||
uri: 'https://test-content-url.nupkg' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.