Grooper Help - Version 25.0
25.0.0023 2,165
  • Overview
  • Help Status

Data Field Container - Generate Schema

Data Field Container Data Field Container - Container Command Grooper.Core

Generates a JSON schema representing the structure of this Data Field Container and its descendants.

Remarks

The Generate Schema command creates a standards-compliant JSON schema that describes the data model of the selected Data Field Container, such as a Data Model, Data Section, or Data Table. This schema can be used for documentation, integration, or validation in external systems, providing a precise, machine-readable definition of your data structure.

Purpose and Role

Use this command to export the structure of your data model for use in API contracts, system integration, or downstream validation. The generated schema reflects the current configuration, including all fields, sections, tables, and their properties, and is saved as a .json file in the Local Resources Folder of the associated Content Type.

How It Works

  1. Select the Data Field Container you wish to export.
  2. Configure options for including choice lists, descriptions, and type definitions.
  3. Execute the command to generate and save the schema file.
  4. Access the resulting file from the Local Resources Folder for use in external systems.

The schema is generated using advanced features such as:

  • Inclusion of field choice lists as JSON enum or oneOf definitions.
  • Embedding of field, section, and table descriptions for improved documentation.
  • Use of shared type definitions and references to reduce duplication and improve maintainability.
  • Support for custom mappings via JSON Data Mapping behaviors, allowing you to tailor the schema to specific integration requirements or to include only selected Data Elements.

Integration with JSON Data Mapping

If a JSON Data Mapping behavior is present on the Content Type, the generated schema will reflect the mapping's configuration. This allows you to:

  • Limit the schema to only the Data Elements included in the mapping.
  • Control how multiple Data Models are represented (e.g., combined, nested, etc.) using the mapping's merge mode.
  • Ensure the schema matches the structure of exported JSON Metadata for seamless integration.

Best Practices

  • Re-run the command after making structural changes to your data model to keep the exported schema up to date.
  • Use the 'Include Choices' and 'Include Descriptions' options to enhance schema clarity and support for UI generation.
  • Enable 'Use Type Definitions' for more modular and maintainable schemas, especially for large or complex models.
  • Leverage JSON Data Mapping to generate schemas that match the needs of your downstream systems.

Diagnostic Artifacts

The command logs diagnostic messages if:

  • The Content Type does not have a Local Resources Folder.
  • Errors occur during schema generation or file saving.
  • The schema cannot be generated due to configuration issues.

These diagnostics assist in troubleshooting and ensure that the exported schema accurately reflects your configuration.

Related Concepts

Properties

NameTypeDescription

See Also

Notification