Users can upload schemas from their local file system as a Governance Archive (see Creating a Governance Archive) or import from a given URL.
First schemas will be validated before storing to the registry. During the schema import process, the original schema will be put into the location where all the schemas are stored and if there are any other inner schema imports in the given schema, those imports also put into the registry through the same schema import process.
Adding a schema
Follow the instructions below to add a new schema to the Governance Registry.
- Sign in. Enter your user name and password to log on to the Management Console.
- Click Main > Metadata > Add > Schema.
- Select whether to import the schema from a URL or upload it from a file.
- If importing from URL is selected, specify the URL of the schema and its name.
- If uploading from file was selected, you can upload a single schema file or a ZIP file (in .zip or .gar extension) containing set of schema files. See Creating a Governance Archive. Use the Browse button to upload a file.
- Click Add button.
WSO2 Governance Registry validates each schema file during the first addition. It will also validation any schema imports.
Additional validation rules can be defined using handlers. See Resource Content Validation Sample.
- All the added schemas can be viewed under List > Schemas.
Information such as Schema Name, Schema Namespace, Life Cycle status, Actions and Dependency tree are displayed about schemas.
- A schema can be selected by the name of the schema.
The visualize view provides a custom UI to that particular schema, which would displays information about the content of the schema.