Edit online

Contextual Menu Actions in the JSON Schema Design Mode

The contextual menu of the Design mode includes the following actions:

Go to Definition [Ctrl + Shift + Enter]
Navigates to the referenced schema component. This action is also available by clicking the arrow displayed in its bottom right corner.
Edit Properties

Allows you to edit the properties of the selected component in a in-place editor.

Properties that have set values are rendered in bold while unset properties are rendered with a gray foreground. You can edit any property (set or unset) by double-clicking or by pressing Ctrl + Enter (Command + Enter on macOS).

You can delete any property already set by pressing Delete. This operation does not mean the selected property is deleted from the table. It means the property is unset (rendered with gray foreground). The Edit and Remove actions are also available on the contextual menu in the table.

If the type property changes as a result of an editing/removal action, then the list of properties presented in the table is updated according to the new schema type.

Note: When filling in string values they should not be enclosed in quotation marks, these are added automatically.
Note: For array values simply fill in the items that will constitute the array, separated by commas.
Edit Annotations

Allows you to edit the annotations for the selected schema component in the Edit Annotations dialog box. Annotations are not required, but they are encouraged as a good practice and can make the schema “self-documenting”.

The title and description must be strings. A title is preferably short, whereas a description provides a more lengthy explanation about the data described by the schema. The default keyword specifies a default schema value that can be anything. The examples keyword is meant to provide an array of examples that validate against the schema. Its items must be separated by a comma.

Annotations that have set values are rendered in bold while unset annotations are rendered with a gray foreground. You can unset an annotation by using the Delete key or the Remove action that is available in the contextual menu of the table.

By default, annotations are rendered under the graphical representation of the component. To edit the annotations, use the Edit Annotations action from the contextual menu or simply double-click the annotations area (if any).

Edit Dependencies
Available for dependencies and dependentRequired components, this action allows you to add, rename, delete, and edit the values for dependencies.
Make Required
Marks the selected property as being required in the parent object. By default, the defined properties are not required in the JSON schema. You can set a list of required properties in the required keyword. By invoking the action, the name of the property is added in the parent object's required keyword.
Make Optional
Marks the selected property as being optional in the parent object. By default, the defined properties are optional in the JSON schema. You can set a list of required properties in the required keyword. By invoking the action, the name of the property is deleted from the parent object's required keyword.
Refactoring > Extract definition in another file
Extracts a definition to a new file. If the file does not already exist, the action will create a new file and a document preset will be used to match the current schema specification. If the file does exist, the action will find a corresponding group (or create one) to append the extracted definition. This action can also be used on a selection of multiple definitions.
Refactoring > Extract definition in current file
Extracts a definition as a global definition and references it. It can be used on a property to extract its definition (in case you want to reuse it) or on a local definition to extract it as global one. This action can also be used on a selection of multiple definitions. Note that this action is not available for global definitions.
Refactoring > Convert type to 'any' type
Converts the type for the selected property, definition, or conditional into an any type with the value true or false. You can set true value to represent a schema that matches anything, or false for a schema that matches nothing.
Refactoring > Convert 'any' type to standard type
Converts the any type for the selected property, definition, or conditional into a standard type.
Append child
Offers a list of valid components, depending on the context, and appends your selection as a child of the currently selected component. You can set a name for a named component after it has been added in the diagram.
Insert before
Offers a list of valid components, depending on the context, and inserts your selection before the selected component, as a sibling. You can set a name for a named component after it has been added in the diagram.
Insert after
Offers a list of valid components, depending on the context, and inserts your selection after the selected component, as a sibling. You can set a name for a named component after it has been added in the diagram.
Undo [Ctrl + Z (Command + Z on macOS)]
Reverses the last editing action.
Redo [Ctrl + Y (Command + Shift + Z on macOS, Ctrl + Shift + Z on Linux/Unix)]
Recreates the last editing action that was reversed by the Undo function.
Rename Component in
Opens a dialog box that allows you to rename the selected component by specifying the new component name and the files to be affected by the modification. If you click the Preview button, you can view the files to be affected by the action. These files are identified by searching the references of the selected component in the scope provided.
Cut [Ctrl + X (Command + X on macOS)]
Cuts the selected component(s).
Copy [Ctrl + C (Command + C on macOS)]
Copies the selected component(s) to the clipboard.
Paste [Ctrl + V (Command + V on macOS)]
Pastes the component(s) from the clipboard as children of the selected component.
Remove [Delete key]
Removes the selected component(s).
Move Up [Alt + UpArrow (Option + UpArrow on macOS)]
Moves a component up in its parent.
Move Down [Alt + DownArrow (Option + DownArrow on macOS)]
Moves a component down in its parent.
Search > Search References
Available on components that have a Definition type in the diagram, it searches all references of the selected definition in a scope determined by the schemas referenced in the file and the schemas declared in the validation scenarios associated with them. You can also use it on the Schema type component (the root of the schema diagram) to search for all references to the schema name.
Search > Search References in
Available on components that have a Definition type in the diagram, it is an extension of the Search References action, where the search for references is additionally done in the file(s) specified when defining a scope in the resulting dialog box. You can also use it on the Schema type component (the root of the schema diagram) to search for references to the schema name.
Search > Search Occurrences in File [Ctrl + Shift + U (Command + Shift + U on macOS)]
Available on all components that have a Definition type in the diagram, it searches all occurrences of the currently selected definition in the current file. You can also use it on the Schema type component (the root of the schema diagram) to search for all occurrences of the schema name in the current file.
Flatten Schema
Flattens the entire hierarchy of JSON schemas. For more details, see Flatten JSON Schema.
Expand All
Recursively expands all sub-components of the selected component.
Collapse All
Recursively collapses all sub-components of the selected component.
Print Selection
Prints the selected component diagram.
Save as Image
Saves the selected component diagram as image, in JPEG, BMP, SVG or PNG format.
Options
Opens the JSON Schema preferences page where you can control which properties to display for JSON Schema components in the JSON Schema Design mode.