Configuring schema validation for IDz
Defining what will happen when zBuilder ‘builds’ a language source file is done through YAML configuration files. Many YAML file editors provide IntelliSense and Code Completion if you configure a schema, so DBB provides the schema file that validates these YAML configurations to developers to allow them to validate their configurations inside of their editor. This way they can quickly understand, correct, and build out new YAML configurations without having to run zBuilder.
In this tutorial, you configure IDz with the DBB schemas so that it can provide IntelliSense and Code Completion for YAML Build and Application Configuration files.
Prerequisites
Ensure you have installed IBM Developer for z/OS (IDz).
Estimated time
This tutorial takes about 10 minutes to complete.
Steps
2. Create DBB Configuration Content-Types
Now you need to create a content-type and file associations to detect if a file you opened is a zBuilder configuration.
In the preferences window you navigated to in Step 1, open General > Content Types
.
Open Text > Wild Web Developer supported web dev file
.
Select the YAML
content-type.
While the YAML
content-type is selected, press the Add Child...
button and insert the name DBB Application Configuration
.
Next to File associations:
, press the Add...
button.
Add file patterns to match the names of the application configuration files you expect to edit. At the end of this tutorial if the path of the opened file matches at least one of these file patterns, the editor will begin validating it using the Application Configuration Schema. Here are some suggestions for file patterns:
dbb-app.yaml
MortgageApplication/**.yaml
Here are some suggested file patterns for Build Configurations:
dbb-build.yaml
Languages.yaml
Cobol.yaml
Assembler.yaml
BMS.yaml
CobolTestcase.yaml
Db2Binds.yaml
LinkEdit.yaml
PLI.yaml
Repeat this step for the DBB Build Configuration
as well.
This child content-type is referenced in the next step when you configure the schema.
3. Create a Schema Association
Now you need to create a schema association that will link files matched by the content type you created in step 2 to their respective schemas so they will be validated against them.
Back in the preferences window you navigated to in Step 1, open General > Schema associations
.
[]
Press the Add
button to add a new association.
Click the Content Type:
drop-down list and select the DBB Application Configuration
content type.
In schema location, enter https://raw.githubusercontent.com/IBM/dbb/refs/heads/main/Schema/applicationConfigurationSchema.json
and press OK. This links to the IBM Public GitHub repository that hosts the schema. Using a file path
to reference a locally downloaded schema does not work at this time due to a bug in Wild Web Developer. If you want to use DBB schema in your IDZ, your machine must be able to access to this URL.
- The Build Configuration Schema can be found at
https://raw.githubusercontent.com/IBM/dbb/refs/heads/main/Schema/buildConfigurationSchema.json
.
Repeat this step for the DBB Build Configuration
as well.
Summary
You should now see the schema validation take effect inside your configuration files.
[]
You can also use the autocomplete by pressing CTRL
+ Space
to display options for your current index context.
[]
Next Steps
Use your IDE schema configuration by configuring language compiler scripts for your zBuilder installation.