JSON Schema
The OAS Generator provides an JSON Schema to simplify the writing of the configuration file.
The JSON schema is available at the following URL:
The following sections will show you how to enable the JSON schema support in some IDEs.
IntelliJ IDEA
-
Open the Settings window and search for "JSON Schema Mappings".
-
Click the icon to add a custom JSON Schema Mapping
-
Select Version 7 and add the URL listed above.
-
Add mappings to the File path pattern, for example
oas-generator.yml
. You can add as many path mappings as you like.
VS Code
To use the JSON Schema within Visual Studio Code the YAML (Red Hat) extension must be installed.
Then the mapping of the schema URL to the file names must be added to the settings.json
:
settings.json
{
"yaml.schemas": {
"https://chhorz.github.io/oas-generator/schema/oas-generator.schema.json": ["oas-generator.yml"]
}
}