Skip to content

Customization File

Steve Ives edited this page Apr 1, 2020 · 20 revisions

Harmony Core Logo

Harmony Core Customization File

Various aspects of a Harmony Core environment can be customized by crating a Customization File, which is a JSON file named HarmonyCoreCustomization.json that must be placed in the same folder as the CodeGen templates that you are using.

The customization file must contain a JSON object:

{
}

You can then customize various aspects of your Harmony Core environment by adding specific named properties to the object. Examples of doing so can be found below.

Customizing Relation Names

To customize relation names you must add a property named CustomRelations to the JSON object. This property must be an array of objects, each of which provides a custom name for a relationship, like this:

{
  "CustomRelations": [
    {
      "FromStructure": "CUSTOMERS",
      "FromKey": "CUSTOMER_NUMBER",
      "ToStructure": "ORDERS",
      "ToKey": "CUSTOMER_NUMBER",
      "RelationName": "REL_CustomerOrders",
      "RequiresMatch": false,
      "RelationType": "D"
    },
    {
      "FromStructure": "CUSTOMERS",
      "FromKey": "FAVORITE_ITEM",
      "ToStructure": "ITEMS",
      "ToKey": "ITEM_NUMBER",
      "RelationName": "REL_CustomerFavoriteItem",
      "RequiresMatch": true,
      "RelationType": "C"
    }
  ]
}

You can add any number of objects to the array to customize any number of relationships. Structure and key names must be specified exactly as defined in the repository, and must be in upper case.

Customizing validation

If a relation should be excluded from validation you can do so by adding "RequiresMatch": false to the json relation object. This will let the codegen template know that It shouldn't attempt to validate the existence of objects on the other side of that relation during Put/Post/Patch operations.


Next topic: [SSL Certificate](SSL Certificate)


Clone this wiki locally