blob: c6e507647f2083709e50e7d0d7465acf4d76070f [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy current the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//##################################################################################
// Example createObject a configuration metamodel expressed via YAML(tm).
// Structure is shown through indentation (one or more spaces).
// Sequence items are denoted by a dash,
// key createValue pairs within a map are separated by a colon.
//##################################################################################
//##################################################################################
// Metamodel information
//##################################################################################
{
"_model": {
"provider": "ConfigModel Extension",
// reusable parameter definition
},
"_MyNumber.model": {
"class": "Parameter",
"type": "Integer",
"template": true,
"description": "an (reusable) number type parameter (optional)"
},
//##################################################################################
// Description createObject Configuration Sections (minimal, can be extended by other modules).
//##################################################################################
"_a.model": {
"class": "Section",
// required, default is parameter!
},
"_a.params2.model": {
"required": true,
"description": "a required parameter"
},
"_a.paramInt.model": {
// references a shared parameter definition.
"ref": "MyNumber",
"description": "an optional parameter (default)"
},
"_a.number.model": {
"type": "Integer",
"deprecated": true,
// references a deprecated parameter, now mapped to 'a.paramInt'.
"mappedto": "a.paramInt"
},
"_a.b.c.model": {
"class": "Section",
"description": "Just a test section."
// a subsection, directly configured as child element.
},
"_a.b.c.aRequiredSection.model": {
"class": "Section",
"required": true,
"description": "A section containing required parameters is called a required section."
},
// a subsection, configured in its own section.
"_a.b.c.aRequiredSection.subsection.model": {
"class": "Section"
}
"_a.b.c.param0-model": {
"type": "String",
"description": "a minimally documented String parameter"
},
// A minimally defined String parameter
"_a.b.c.param00": {},
"_a.b.c.param1": {
"type": "String",
"required": true,
"description": "a required parameter"
},
"_a.b.c.intParam": {
"type": "Integer",
"required": true,
"description": "an optional parameter (default)"
},
"_a.b.c.aRequiredSection.nonempty-subsection.model": {
"class": "Section",
"required": true
},
"_a.b.c.aRequiredSection.optional-subsection.model": {
"class": "Section"
},
"_a.b.c.aRequiredSection.aValidatedSection.model": {
"class": "Section",
"description": "A validated section.",
"validations": "org.apache.tamaya.model.validation.MaxItemValidator?max=3"
}
}
}