You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+26-26
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,29 @@
3
3
# DTDL Editor for Visual Studio Code
4
4
5
5
## Overview
6
+
6
7
The [Digital Twin Definition Language](https://aka.ms/DTDL) (DTDL) is a language for describing models for Plug and Play devices, device digital twins, and logical digital twins. Broadly, modeling enables IoT solutions to provision, use, and configure digital twins of all kinds from multiple sources in a single solution. Using DTDL to describe any digital twin’s abilities enables the IoT platform and IoT solutions to leverage the semantics of each digital twin.
7
8
8
9
With the [DTDL extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-dtdl) , you can read and write documents using DTDL more efficiently taking full advantage of the following key features:
9
10
10
-
- Create interfaces from the command palette with predefined or customized templates.
11
+
- Create interfaces from the command palette with predefined or customized templates.
11
12
- Intellisense to help you with the language syntax (including auto-completion).
12
-
- Use predefined code snippets to develop DTDL efficiently.
13
+
- Use predefined code snippets to develop DTDL efficiently.
13
14
- Syntax validation.
14
15
15
16
## Get Started
16
17
17
18
### Create Interface
18
19
19
-
You could use the command palette to create interface from predefined or customized templates.
20
+
You could use the command palette to create interface from predefined or customized templates.
20
21
21
22
- In Visual Studio Code, select **View > Command Palette** to open the VS Code command palette.
22
-
- In the command palette, enter and run the command **DTDL: Create Interface**.
23
-
- Follow the instruction to assign the interface name.
23
+
- In the command palette, enter and run the command **DTDL: Create Interface**.
24
+
- Follow the instruction to assign the interface name.
24
25
- If there are multiple templates existing, choose a template you need. Otherwise, the extension will the basic template as default.
25
-
- A JSON file will be created in the current folder. The file name is based on the interface name you assigned.
26
-
- The @id is the path component of the [Digital Twin Model Identifier](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twin-model-identifier-dtmi) (DTMI). You should modify the @id following the DTMI rule to uniquely identify the device model.
27
-
- You could extend the interface with [DTDL v2](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md).
28
-
26
+
- A JSON file will be created in the current folder. The file name is based on the interface name you assigned.
27
+
- The @id is the path component of the [Digital Twin Model Identifier](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twin-model-identifier-dtmi) (DTMI). You should modify the @id following the DTMI rule to uniquely identify the device model.
28
+
- You could extend the interface with [DTDL v2](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md).
29
29
30
30
### Intellisense and Syntax validation
31
31
@@ -35,7 +35,7 @@ This extension could help you with the language syntax (including auto-completio
35
35
36
36
### Use Predefined Code Snippets
37
37
38
-
Besides the basic auto completion, this extension also provides some predefined code snippets to help you develop DTDL efficiently.
38
+
Besides the basic auto completion, this extension also provides some predefined code snippets to help you develop DTDL efficiently.
39
39
40
40
| Code Snippet | Description |
41
41
| --- | --- |
@@ -47,40 +47,40 @@ Besides the basic auto completion, this extension also provides some predefined
47
47
48
48
#### Prepare your template file
49
49
50
-
You could use any DTDL file as a template to develop efficiently. Meanwhile, you could also use these predefined tags to make your template more flexible.
50
+
You could use any DTDL file as a template to develop efficiently. Meanwhile, you could also use these predefined tags to make your template more flexible.
51
51
52
52
-**{modelId}**: The extention will replace this tag with *dtmi:com:example:interface_name;1* when creating a new DTDL from a template. For example, if you assigned the interface name as "test", the result will be dtmi:com:example:test;1.
53
-
-**{modelName}**: The extension will replace this tag with the interface name when creating a new DTDL from a template.
53
+
-**{modelName}**: The extension will replace this tag with the interface name when creating a new DTDL from a template.
54
54
55
55
#### Import your template file
56
56
57
57
- Go to [[extension installation location](https://code.visualstudio.com/docs/editor/extension-gallery#_where-are-extensions-installed)]/vsciot-vscode.vscode-dtdl-[extension release version]/templates
58
-
- Store your template into this folder as a JSON file. Keep the file name short and meaningful, because the extension will use the file name as template name.
58
+
- Store your template into this folder as a JSON file. Keep the file name short and meaningful, because the extension will use the file name as template name.
59
59
60
60
### Create Your Own Code Snippets
61
61
62
62
If you would like to create customized code snippets for VS Code, you could follow [Snippets in Visual Studio Code](https://code.visualstudio.com/docs/editor/userdefinedsnippets)
63
63
64
-
### Contribute Your Templates and Code Snippets to the Community
64
+
### Contribute Your Templates and Code Snippets to the Community
65
65
66
66
You could also contribute your templates and code snippets to the [DTDL repository](https://github.com/microsoft/vscode-dtdl).
67
67
68
68
- Uploading the new templates to **templates** folder.
69
69
- Modifying and adding new code snippets to **snippets/snippets.json** file.
70
70
71
-
Once the pull request is approved, your templates and code snippets will be released with next release of DTDL extension.
71
+
Once the pull request is approved, your templates and code snippets will be released with next release of DTDL extension.
72
72
73
73
## Commands
74
74
75
75
| Command | Description |
76
76
| --- | --- |
77
77
|`DTDL: Create Interface...`| Create new interface from predefined or customized templates. |
78
78
79
-
## Trouble Shooting
79
+
## Trouble Shooting
80
80
81
-
### Error when creating the interface
81
+
### Error when creating the interface
82
82
83
-
As default, the extension will get the available templates from *[[extension installation location](https://code.visualstudio.com/docs/editor/extension-gallery#_where-are-extensions-installed)]/vsciot-vscode.vscode-dtdl-[extension release version]/templates*. But if you delete this folder or all templates files in this folder, you will have an error when creating the interface. In order to fix this issue, you could copy the templates from [DTDL repository](https://github.com/microsoft/vscode-dtdl) to your local templates folder manually.
83
+
As default, the extension will get the available templates from *[[extension installation location](https://code.visualstudio.com/docs/editor/extension-gallery#_where-are-extensions-installed)]/vsciot-vscode.vscode-dtdl-[extension release version]/templates*. But if you delete this folder or all templates files in this folder, you will have an error when creating the interface. In order to fix this issue, you could copy the templates from [DTDL repository](https://github.com/microsoft/vscode-dtdl) to your local templates folder manually.
84
84
85
85
## Contributing
86
86
@@ -126,13 +126,13 @@ You should receive a response within 24 hours. If for some reason you do not, pl
126
126
127
127
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
128
128
129
-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
130
-
* Full paths of source file(s) related to the manifestation of the issue
131
-
* The location of the affected source code (tag/branch/commit or direct URL)
132
-
* Any special configuration required to reproduce the issue
133
-
* Step-by-step instructions to reproduce the issue
134
-
* Proof-of-concept or exploit code (if possible)
135
-
* Impact of the issue, including how an attacker might exploit the issue
129
+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
130
+
- Full paths of source file(s) related to the manifestation of the issue
131
+
- The location of the affected source code (tag/branch/commit or direct URL)
132
+
- Any special configuration required to reproduce the issue
133
+
- Step-by-step instructions to reproduce the issue
134
+
- Proof-of-concept or exploit code (if possible)
135
+
- Impact of the issue, including how an attacker might exploit the issue
136
136
137
137
This information will help us triage your report more quickly.
138
138
@@ -144,4 +144,4 @@ We prefer all communications to be in English.
144
144
145
145
## Policy
146
146
147
-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
147
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
0 commit comments