Powerful IDE for API-first design, documentation and development.

Start my Free Trial

Yes, several of the RAPID-ML GenTargets support output naming parameters in the .GEN configuration file.  


You can specify filenames by adding properties to the parameters object in the .GEN file, following the naming pattern genTemplateFileName_<outputItemName>. The <outputItemName> is specific to the GenTemplate you're working with:


Diagram GenTemplate

Supported Filename Properties:

  • genTemplateFileName_HTML
  • genTemplateFileName_JSON


Documentation GenTemplate

Supported Filename Properties:

  • genTemplateFileName_HTML


Swagger GenTemplates

Including:

  • Swagger (RAPID-XChange Contract)
  • Swagger (RAPID-XChange Interop)


Supported Filename Properties:

  • genTemplateFileName_JSON
  • genTemplateFileName_YAML
  • genTemplateFileName_JSON


JSON Schema GenTemplate

Supported Filename Properties:

  • genTemplateFileName_JSON


GenTemplates
Supported Filename Properties
Diagram
genTemplateFileName_HTML
genTemplateFileName_JSON
Documentation
genTemplateFileName_HTML
Swagger
Swagger (RAPID-XChange Contract)
Swagger (RAPID-XChange Interop)
genTemplateFileName_JSON
genTemplateFileName_YAML
JSON Schema
genTemplateFileName_JSON


You can specify a static filename as the value, or you can use MVEL expressions to dynamically create filenames based on specific model properties.  Here are some useful MVEL expressions you can use in your models:


MVEL Expression
Comments
${zenModel.name}
Name of the top-level rapidModel element in the source.
${zenModel.namespace}
The namespace in which the zenModel element is defined, as specified using the namespace keyword.
${zenModel.namespace == null ? '' :
   zenModel.namespace+'-'}${zenModel.name}_doc.html

A conditional expression that includes a namepace prefix, followed by a hyphen, but only if a namespace is defined in the source RAPID-ML model.
${zenModel.resourceAPIs[0].name}
Name of the first resourceAPI defined in the zenModel.
${zenModel.dataModels[0].name}
Name of the first dataModel defined in the zenModel.


Examples

The following screenshots show some examples of custom file naming, using MVEL expressions: