-
Notifications
You must be signed in to change notification settings - Fork 14
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.
To customize relation names you must add a property named CustomRelationNames 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"
},
{
"FromStructure": "CUSTOMERS",
"FromKey": "FAVORITE_ITEM",
"ToStructure": "ITEMS",
"ToKey": "ITEM_NUMBER",
"RelationName": "REL_CustomerFavoriteItem"
}
]
}
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.
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.
-
Tutorial 2: Building a Service from Scratch
- Creating a Basic Solution
- Enabling OData Support
- Configuring Self Hosting
- Entity Collection Endpoints
- API Documentation
- Single Entity Endpoints
- OData Query Support
- Alternate Key Endpoints
- Expanding Relations
- Postman Tests
- Supporting CRUD Operations
- Adding a Primary Key Factory
- Adding Create Endpoints
- Adding Upsert Endpoints
- Adding Patch Endpoints
- Adding Delete Endpoints
-
Harmony Core Code Generator
-
OData Aware Tools
-
Advanced Topics
- CLI Tool Customization
- Adapters
- API Versioning
- Authentication
- Authorization
- Collection Counts
- Customization File
- Custom Field Types
- Custom File Specs
- Custom Properties
- Customizing Generated Code
- Deploying to Linux
- Dynamic Call Protocol
- Environment Variables
- Field Security
- File I/O
- Improving AppSettings Processing
- Logging
- Optimistic Concurrency
- Multi-Tenancy
- Publishing in IIS
- Repeatable Unit Tests
- Stored Procedure Routing
- Suppressing OData Metadata
- Traditional Bridge
- Unit Testing
- EF Core Optimization
- Updating a Harmony Core Solution
- Updating to 3.1.90
- Creating a new Release
-
Background Information