Generate Liberty configurations schema from the command line

To generate the schema for Liberty core and other installed products extensions in a single output file use

    wlp/bin/tools/ws-schemagen.jar
In version 22.0.0.5 and later, the schemaGen command is available to generate the schema for a Liberty installation in a single output file.

See the schemaGen command on the Open Liberty website.


Syntax

The command syntax is as follows:

    java [JVM options] -jar ws-schemagen.jar [options] outputFile


Options

The following options are available:

    --encoding=charset

    Where charset is the character set to use when we are creating the output file.

    --locale=language

    Where language specifies the language to use when we are creating the output file. This string consists of the ISO-639 two-letter lowercase language code, optionally followed by and underscores and the ISO-3166 uppercase two-letter country code.

    --schemaVersion=1.1

    If specified, then both explicitly named child elements and the xsd:any element are written to the output file.

    --outputVersion=2

    If specified, only the xsd:any element is used in the output file, so that unknown elements pass XSD validation at the expense of losing validation for known elements.


Usage examples

The following example generates the installed products' schema and stores in a file called schema.xsd:

    java -jar ws-schemagen.jar schema.xsd

The following example generates the installed products' schema and stores in a file called schema.xsd using the Brazilian Portuguese language:

    java -jar ws-schemagen.jar schema.xsd --locale=pt_BR

The following example displays help information:

    java -jar ws-schemagen.jar --help


Parent topic: Administer Liberty from the command line