JSON schema
In this tutorial you will learn to add a JSON schema to get autocompletion support when working with VS Code.
A JSON schema reference enables VS Code IntelliSense to provide autocomplete, validation and documentation for security.manager NEXT policy files. This helps prevent syntax errors and ensures policy structure compliance.
This tutorial was tested for ArcGIS Enterprise 11.5 in December, 2025.
Prerequisites
Check the preconditions for this tutorial:
-
VS Code is installed on your local machine.
-
You have a GitHub account.
-
You have administrative privileges to security.manager NEXT.
-
You have a GitHub repository as described in Set up a GitHub Repository.
Add schema reference
To use VS Code IntelliSense, add a reference to the JSON schema to the policy file.
-
Open the policy file
SampleWorldCities.jsonin the services folder. -
Add the JSON Schema reference at the top of the file for IntelliSense support:
{ "$schema": "https://raw.githubusercontent.com/conterra/policies-json/1.7.0/schema/policies.schema.json", "fallbackPolicies": [{ "layers": [ "0" ],
Verify configuration
Now you can test the IntelliSense functionality.
-
Position your cursor in the JSON file.
-
Try typing new restriction or policy elements and observe the autocomplete suggestions.
-
Press Ctrl+Space to trigger IntelliSense help and see available options.
-
The JSON Schema provides validation and IntelliSense support for policy structure.
If IntelliSense does not work, check if the link is correct and the validation is not disabled in VS Code .
Commit and push changes
Commit and push your changes to GitHub.
-
In VS Code, go to the Source Control view by pressing Ctrl+Shift+G.
-
Review the changed files:
policies/services/SampleWorldCities.json. -
Enter a commit message Add schema reference to SampleWorldCities policy.
-
Click Commit to stage and commit changes.
-
Click Sync Changes or use Ctrl+Shift+P and select Git: Push to push to GitHub.
Verify the repository updates in the web browser.
-
Go to your GitHub repository in the web browser.
-
Navigate to the
policies/services/folder. -
Verify that
SampleWorldCities.jsonis present and includes the schema reference.
Summary
In this tutorial, you learned how to add a JSON schema to activate VS Code IntelliSense.
Follow GitHub Actions to learn how to define a GitHub Action to automatically synchronize the policies.