My FNZ Studio Version

Extensions

Latest Update: 25.11.2024 | Margherita Taffarel,
Documentation
2022.2

The OpenApi Extension provides functionalities to import and export OpenAPI specification files.

1 Export

The Export functionality provides a Business Object exporter that can be used to generate the OpenAPI Specification of a given Web API.

Note the following:

  • Schema names are mapped from Data Class names. Package names are not exported.
  • If a Web API Business Object references Data Classes with the same name from different Packages, the export will fail.
  • Multiple inheritance in Data Classes should be avoided because auto-generated clients might not support multiple inheritance (e.g., Java clients).

2 Import

The OpenAPI Import can be used to automatically generate Business Objects such as Packages and Data Classes from a given OpenAPI Specification. The import functionality can be used through the OpenApi:GenerateDataClasses Script Function.

The OpenApi:GenerateDataClasses($packageId, $location) Scrip Function generates the data model from a given OpenAPI specification. It has the following parameters:

  • packageId — Package where the Data Classes will be generated. If the provided packageId does not exist, a new Package is created.
  • location — Location of the OpenAPI specification. It can be an absolute file path, a relative file path to the data-home, or a public URL. For relative paths, the {DATA_HOME} placeholder can be used as prefix e.g., {DATA_HOME}/work/tmp/simpleSpec.json.

Note the following:

  • If a schema name contains a dot (.), this is replaced with an empty string.
  • Schemas representing dates could be mapped to a Date or a String based on the extension property openapi.importer.map.date2string.
  • Mapping to the Money primitive type can be enabled by setting the extension property openapi.importer.map.money2primitive to true.

2.1 Data Class Generator

The Data Class Generator functionality allows creating and saving Business Objects such as Packages and Data Classes from a given OpenAPI Specification.

Note that the Data Class Generator does not support nested collections, nested maps, nor mixed solutions (e.g., a map of collections). In this case, the nested type would be Any.

Instead, the Data Class Generator does support:

  • Primitive types such as Integer, String, Boolean, Long, Float, Double, Date, Money
  • Indexed and Named Collections
  • Inheritance
  • Enumerations

Note that ClusterFile and LocalFile are not mapped as primitive types but, rather, as regular Data Classes.
Other types that do not correspond to any FNZ Studio Primitive Types or Data Classes are imported as type Any.
© 2026 Appway AG. All Rights Reserved