- SBUILDER_EXTENSION =
<<-EOS.unindent
# Load and configure sbuilder plugin extensions
#
# SCHEMA
#
# extend:
# loaders:
# - gem: <gem-name>
# className: <class name>
# configuration:
# <configuration-value>
# objects:
# <named-object>
#
# WHERE <named-object> is a hash
#
# - objectName:
# configuration:
# <configuration-value>
#
#
# COMMENTS:
# - `objects` -property is optional
# - `objectName` must be unique
# - if 'className' is used, must also give 'gem'
#
# <class name>: name of interface loader in 'type' property in 'interfaces' array
# <gem-name>: gem name to require, require only if <class name> not defined
# <configuration-value>: a (hash) value passed to 'className'::configure' -method
# or `className.new#configure` method for objects
#
#
extend:
loaders:
# - className: Sbuilder::SnippetLoaderSimple
# configuration:
# src_dir: src/pet
EOS
- SBUILDER_SNIPPETS =
<<-EOS.unindent
# Load snippets to sbuilder code repository
#
# SCHEMA:
#
#
# snippets:
# - <snippet-loader>
# - <snippet-loader>
# - <snippet-loader>
#
# <snippet-loader>: an array element with the following mandatory properties
#
# className: name of the snippet loader object,
# className used in 'extend.loaders'
# objectName: name of the class of snippet loader object,
# references 'objectName' in 'extend.loaders.objects',
# must give either 'className' or 'objectName'
# snippets: array of snippet load definitions,
# content of the array varies for classNames
#
#
# Special metatypes:
# - service_implementation: defines a macro to call for the service
# - service_completion: defines a macro to call when service
# finishes. Intended use is check service status, and implementation
# transaction semantics.
#
# Example for className: Sbuilder::SnippetLoaderSimple
#
# className: Sbuilder::SnippetLoaderSimple
# configuration:
# metatypes:
# code: Example code
# snippets:
# - metatype: service_implementation
# appName: "/max2(post)"
# file: max2_post.tla
# - metatype: service_implementation
# appName: "/dummy(post)"
# file: dummy_post.tla
# - metatype: code
# appName: max2
# file: max2.tla
- SBUILDER_INVARIANTS =
<<-EOS.unindent
# Activate invariant operator defines in sBuilder code repository
#
# SCHEMA:
#
# invariants:
# - <invariant-name>: <invariant description>
#
#
# <invariant-name>: name of TlAplus operator defined in sBuilder code repository
# <invariant description>: documentantion text for the invariant
#
EOS
- SBUILDER_RESOLVERS =
<<-EOS.unindent
# Define how parameter names are mapped to domain
#
# SCHEMA:
#
# resolvers:
# - file: <file name in cnf-dir>
# url: <path or url>
#
# Give either 'file' or 'url'
# <file name in cnf-dir>: file name in cnf-directory
# <path or url>: path relative to cwd, or http url
#
#
#
EOS
- SBUILBER_INTERFACES =
<<-EOS.unindent
# Define how to load interfaces configuration
#
# SCHEMA:
#
# interfaces:
# -
# className: <class name>
# configuration: <configuration-value>
# objectName: <object name>
#
# file: <file name in cnf-dir>
# infrastructureServices: <is infrastructureService>
# interfaceServices: <is interfaceService>
# url: <path or url>
# cache: <cache file path>
#
# WHERE
#
# <class name>: name of the snippet loader object,
# className used in 'extend.loaders'
#
# <object name>: name of the class of api loader object,
# references 'objectName' in 'extend.loaders.objects',
#
#
# <configuration-value>: a (hash) value passed to 'className'::configure' -method
# or `className.new#configure` method for objects
#
#
# <is infrastructureService>: true generates the possibility for a
# service set return response using 'InfrastructureServiceResponse' operator, and
# the caller to access response status ( operator 'InfrastructureServiceGetStatus')
# and response data ( operator #InfrastructureServiceGetResponse'), optional, defaults false
#
# <is interfaceService>: true generates interface process for the interface, which
# environment can call (see 'step-extension', optional, defaults true
#
# <file name in cnf-dir> : file name in cnf-directory
# <path or url> : path relative to cwd, or http url,
# e.g https://cdn.rawgit.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore-expanded.yaml
# <cache file path> : path relative to cwd, where interface file is cached
#
# COMMENTS:
# - must give either 'className' or 'objectName'
# - when 'className' given 'configuration' allowed
# - must give either 'file' or 'url'
# - property 'cache' optional, useful when http access slow
# - infrastructureServices are modelled as procedures, which may modify state
# or return values used in 'normal' interfaces
#
EOS
- SBUILER_SETUPS =
<<-EOS.unindent
# Define environment setups
#
# SCHEMA:
# setups:
# - setupDirectory: <setupname>
# extensions:
# file: <file name in cnf-dir>
# url: <path or url>
# preferences:
# <hash-values>
# assumptions:
# <assume-op-names>
#
# <setupname> : name of setup = sub directory under <gen_dir>
# <file name in cnf-dir>: name extension configurion file in cnf-directory
# <path or url> : relative name or url of configurion file
# <hash-values> : optional properties overriding global generate preferences
# <assume-op-names> : array of operator names to put into ASSUME directives
#
# COMMENTS:
# - preferences property is optional
EOS
- SBUILDER_GENERATE =
<<-EOS.unindent
# Generate definitions
#
# SCHEMA:
# generate:
# - output: <path>
# inputs:
#
# - desc: <description text>
# modelData: none
# template: markdown-header.mustache
# input: <name-of-template>
#
# <path>: relative path under <gen-directory>
# <description text>: text avaiblable for template in {{META.desc}} property
# <name-of-template>: name of file to output into <path>
#
# COMMENTS:
# - can be used to render also model data using mustache template
# in this case
# modelData : <model-data>, where
# valid values for <model-data>: ['none', 'interfaces', 'steps',
# 'definitions','domains' ],
# see document <gen_dir>/<setup>/doc/data-model.md for content
# template: <mustache-template>, where
# <mustache-template> is a file <src_dir>
#
EOS
- SBUILDER_PREFERENCES =
<<-EOS.unindent
# Generate preferences
#
# preferences:
# <hash-values>
#
# <hash-values> key-value pairs passed to mustache templates in 'PREFERENCES' -property
#
# Default templates use following propeties
# debug-output: <true/false>, output call message in interface processes, default 'true'
#
EOS
<<-EOS.unindent
# Define extension for domains
#
# SCHEMA:
# - domain-extension:
# - domain: <domain-name>
# cardinality: <cardinality>
# values:
# - <str-value>
# type: <type-def>
# range: <range-def>
#
#
# <domain-name>: domain name resolved
# <cardinality>: integer value for domain, default 1
# <str-value>: fixed value for domain
# <type-def>: Int|BOOLEAN
# <rannge-def>: [low,high]
#
# COMMENTS:
# - give one of 'cardinality', 'values','type', 'range'
#
EOS
<<-EOS.unindent
# Modify setup preference
#
# SCHEMA:
# - preferences-extension:
# - preferences:
# <hash-values>
#
# <hash-values> : optional properties overriding preferences given in 'sbuilder.yaml'
#
#
# Example
# - preferences-extension:
# preferences:
# debug-output: true
#
EOS
<<-EOS.unindent
# Define name of extension point for interface
#
# SCHEMA:
# - interface-extension:
# - matcher: <string-or-regex>
# implementation: <name-implmentation>
#
# <string-or-regex>: string or regexp matching inteface
# example regex !ruby/regexp /customer?\(post\)/ matches
# customers(post) and customer(post)
# <name-of-implementation>: must define macro 'p_<name-of-implementation>'
EOS
<<-EOS.unindent
# Define environment steps
#
# SCHEMA:
# - step-extension:
# - interface: <interface-name>
# bindExact: true
# input:
# <input>
# inputs:
# - input:
# <input>
#
#
# <interface-name>: name of interface to call in step, e.g. customer(post)
# <input>: parameter bindings for interface. See 'sbuilder.rb example pet'
# and `sbuilder.rb example customer` for examples.
#
#
# COMMENTS:
# - give 'inputs' xor 'input' (first level hash)
# - 'bindExact' optional,
# - use 'bindExact': true when input range for interface
# becomes so big that TLA+ model checker slows down when
# evaluating the input domain range.
# - When 'bindExact': true all fields for 'input' property must
# be given value. Hint use '_default' property in <input>
# - Hint: use 'inputs' when 'bindExact': true use 'inputs' to
# allow non-determinism in process input .
#
EOS
<<-EOS.unindent
# Example of an YAML resolver
#
# Contains array of hashes
#
# - Name: <name of resolver>
# Matcher: <string/regexp to match a paramset name to resolve>
# Rules: <array of RULE-ELEMENTS>
#
# RULE-ELEMENT: MATCHER | INCLUDE-MAPPER
#
# INCLUDE-MAPPER: hash with Include attribute
# Include: <name of mapper>
#
# MATCHER: hash of with Matcher/Domain attributes
# Matcher: <string/regexpp to match paramenter id>
# use !ruby/regexp modifier for a value to make it
# to a regular expression. For exapmle
#
# Matcher: !ruby/regexp /.*/
#
# Domain: domain to assign to parameter
#
EOS