{ "title": "JSON Schema for Beef Entity code-generation (https://github.com/Avanade/Beef).", "$schema": "https://json-schema.org/draft-04/schema#", "definitions": { "CodeGeneration": { "type": "object", "title": "\u0027CodeGeneration\u0027 object (entity-driven)", "description": "The \u0060CodeGeneration\u0060 object defines global properties that are used to drive the underlying entity-driven code generation.", "properties": { "withResult": { "type": "boolean", "title": "Indicates whether to use \u0060CoreEx.Results\u0060 (aka Railway-oriented programming).", "description": "Defaults to \u0060true\u0060. This can be overridden within the \u0060Entity\u0060(s) and/or \u0060Operation\u0060(s)." }, "preprocessorDirectives": { "type": "boolean", "title": "Indicates whether to use preprocessor directives in the generated output." }, "refDataNamespace": { "type": "string", "title": "The namespace for the Reference Data entities (adds as a c# \u0060using\u0060 statement).", "description": "Defaults to \u0060Company\u0060 \u002B \u0060.\u0060 (literal) \u002B AppName \u002B \u0060.Business.Entities\u0060 (literal)." }, "refDataCommonNamespace": { "type": "string", "title": "The namespace for the Reference Data common entities (adds as a c# \u0060using\u0060 statement).", "description": "Defaults to \u0060Company\u0060 \u002B \u0060.\u0060 (literal) \u002B AppName \u002B \u0060.Common.Entities\u0060 (literal)." }, "refDataText": { "type": "boolean", "title": "Indicates whether a corresponding \u0060Text\u0060 property is added when generating a Reference Data \u0060Property\u0060 for an \u0060Entity\u0060.", "description": "This is used where serializing within the Web API \u0060Controller\u0060 and the \u0060ExecutionContext.IsRefDataTextSerializationEnabled\u0060 is set to \u0060true\u0060 (which is automatically set where the url contains \u0060$text=true\u0060). This can be further configured on the \u0060Entity\u0060 and for each \u0060Property\u0060." }, "refDataType": { "type": "string", "title": "The Reference Data identifier Type option.", "description": "Required to identify an entity as being Reference Data. Specifies the underlying .NET Type used for the Reference Data identifier. Results in all underlying entities becoming Reference Data.", "enum": [ "int", "long", "Guid", "string" ] }, "refDataWebApiRoute": { "type": "string", "title": "The \u0060RouteAtttribute\u0060 for the Reference Data Web API controller required for named pre-fetching. The \u0060WebApiRoutePrefix\u0060 will be prepended where specified." }, "refDataDataCtorParams": { "type": "array", "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated \u0060ReferenceDataData\u0060 constructor.", "description": "Each constructor parameter should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IConfiguration^Config\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. Where the \u0060Type\u0060 matches an already inferred value it will be ignored.", "items": { "type": "string" } }, "jsonSerializer": { "type": "string", "title": "The JSON Serializer to use for JSON property attribution.", "description": "Defaults to \u0060SystemText\u0060. This can be overridden within the \u0060Entity\u0060(s).", "enum": [ "SystemText", "Newtonsoft" ] }, "etagJsonName": { "type": "string", "title": "The default JSON name for the \u0060ETag\u0060 property.", "description": "Defaults to \u0060etag\u0060. Note that the \u0060JsonName\u0060 can be set individually per property where required.", "enum": [ "etag", "eTag", "_etag", "_eTag", "ETag", "ETAG" ] }, "usingNamespace1": { "type": "string", "title": "The additional Namespace using statement to be added to the generated \u0060Entity\u0060 code.", "description": "Typically used where referening a \u0060Type\u0060 from a Namespace that is not generated by default." }, "usingNamespace2": { "type": "string", "title": "The additional Namespace using statement to be added to the generated \u0060Entity\u0060 code.", "description": "Typically used where referening a \u0060Type\u0060 from a Namespace that is not generated by default." }, "usingNamespace3": { "type": "string", "title": "The additional Namespace using statement to be added to the generated \u0060Entity\u0060 code.", "description": "Typically used where referening a \u0060Type\u0060 from a Namespace that is not generated by default." }, "webApiAuthorize": { "type": "string", "title": "The authorize attribute value to be used for the corresponding entity Web API controller; generally either \u0060Authorize\u0060 or \u0060AllowAnonymous\u0060.", "description": "This can be overridden within the \u0060Entity\u0060(s) and/or their corresponding \u0060Operation\u0060(s)." }, "webApiAutoLocation": { "type": "boolean", "title": "Indicates whether the HTTP Response Location Header route (\u0060Operation.WebApiLocation\u0060) is automatically inferred.", "description": "This will automatically set the \u0060Operation.WebApiLocation\u0060 for an \u0060Operation\u0060 named \u0060Create\u0060 where there is a corresponding named \u0060Get\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "webApiRoutePrefix": { "type": "string", "title": "The base (prefix) \u0060URI\u0060 prepended to all \u0060Operation.WebApiRoute\u0060 values." }, "webApiTags": { "type": "array", "title": "The list of tags to add for the generated \u0060WebApi\u0060.", "description": "This can be overridden within the \u0060Entity\u0060(s) and/or their corresponding \u0060Operation\u0060(s).", "items": { "type": "string" } }, "managerCleanUp": { "type": "boolean", "title": "Indicates whether a \u0060Cleaner.Cleanup\u0060 is performed for the operation parameters within the Manager-layer.", "description": "This can be overridden within the \u0060Entity\u0060(s) and \u0060Operation\u0060(s)." }, "validationFramework": { "type": "string", "title": "The \u0060Validation\u0060 framework to use for the entity-based validation.", "description": "Defaults to \u0060CoreEx\u0060 (literal). This can be overridden within the \u0060Entity\u0060(s), \u0060Operation\u0060(s) and \u0060Parameter\u0060(s).", "enum": [ "CoreEx", "FluentValidation" ] }, "autoImplement": { "type": "string", "title": "The data source auto-implementation option.", "description": "Defaults to \u0060None\u0060. Indicates that the implementation for the underlying \u0060Operations\u0060 will be auto-implemented using the selected data source (unless explicitly overridden). When selected some of the related attributes will also be required (as documented). Additionally, the \u0060AutoImplement\u0060 can be further specified/overridden per \u0060Operation\u0060.", "enum": [ "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" ] }, "databaseType": { "type": "string", "title": "The .NET database type and optional name (used where \u0060Operation.AutoImplement\u0060 is \u0060Database\u0060).", "description": "Defaults to \u0060IDatabase\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IDatabase^Db\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. This can be overridden within the \u0060Entity\u0060(s)." }, "databaseSchema": { "type": "string", "title": "The default database schema name.", "description": "Defaults to \u0060dbo\u0060." }, "databaseProvider": { "type": "string", "title": "The default database schema name.", "description": "Defaults to \u0060SqlServer\u0060. Enables specific database provider functionality/formatting/etc. where applicable.", "enum": [ "SqlServer", "MySQL", "Postgres" ] }, "databaseMapperEx": { "type": "boolean", "title": "Indicates that a \u0060DatabaseMapperEx\u0060 will be used; versus, \u0060DatabaseMapper\u0060 (which uses Reflection internally).", "description": "Defaults to \u0060true\u0060. The \u0060DatabaseMapperEx\u0060 essentially replaces the \u0060DatabaseMapper\u0060 as it is more performant (extended/explicit); this option can be used where leagcy/existing behavior is required." }, "entityFrameworkType": { "type": "string", "title": "The .NET Entity Framework type and optional name (used where \u0060Operation.AutoImplement\u0060 is \u0060EntityFramework\u0060).", "description": "Defaults to \u0060IEfDb\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IEfDb^Ef\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. This can be overridden within the \u0060Entity\u0060(s)." }, "cosmosType": { "type": "string", "title": "The .NET Cosmos DB type and name (used where \u0060Operation.AutoImplement\u0060 is \u0060Cosmos\u0060).", "description": "Defaults to \u0060ICosmosDb\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060ICosmosDb^Cosmos\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. This can be overridden within the \u0060Entity\u0060(s)." }, "odataType": { "type": "string", "title": "The .NET OData interface name used where \u0060Operation.AutoImplement\u0060 is \u0060OData\u0060.", "description": "Defaults to \u0060IOData\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IOData^OData\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. This can be overridden within the \u0060Entity\u0060(s)." }, "httpAgentType": { "type": "string", "title": "The default .NET HTTP Agent interface name used where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "Defaults to \u0060IHttpAgent\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IHttpAgent^HttpAgent\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. This can be overridden within the \u0060Entity\u0060(s)." }, "etagDefaultMapperConverter": { "type": "string", "title": "The default ETag to/from RowVersion column Mapping Converter used where \u0060Operation.AutoImplement\u0060 is \u0060Database\u0060 or \u0060EntityFramework\u0060.", "description": "Defaults to \u0060StringToBase64Converter\u0060." }, "refDataDefaultMapperConverter": { "type": "string", "title": "The default Reference Data property \u0060Converter\u0060 used by the generated \u0060Mapper\u0060(s) where not specifically defined.", "description": "Defaults to \u0060ReferenceDataCodeConverter\u003CT\u003E\u0060. Where this value is suffixed by \u0060\u003CT\u003E\u0060 or \u0060{T}\u0060 this will automatically be set to the \u0060Type\u0060.", "enum": [ "ReferenceDataCodeConverter", "ReferenceDataCodeConverter{T}", "ReferenceDataCodeConverter\u003CT\u003E", "ReferenceDataIdConverter{T, int}", "ReferenceDataIdConverter\u003CT, int\u003E", "ReferenceDataIdConverter{T, int?}", "ReferenceDataIdConverter\u003CT, int?\u003E", "ReferenceDataIdConverter{T, long}", "ReferenceDataIdConverter\u003CT, long\u003E", "ReferenceDataIdConverter{T, long?}", "ReferenceDataIdConverter\u003CT, long?\u003E", "ReferenceDataIdConverter{T, Guid}", "ReferenceDataIdConverter\u003CT, Guid\u003E", "ReferenceDataIdConverter{T, Guid?}", "ReferenceDataIdConverter\u003CT, Guid?\u003E", "ReferenceDataInt32IdConverter", "ReferenceDataInt32IdConverter{T}", "ReferenceDataInt32IdConverter\u003CT\u003E", "ReferenceDataNullableInt32IdConverter", "ReferenceDataNullableInt32IdConverter{T}", "ReferenceDataNullableInt32IdConverter\u003CT\u003E", "ReferenceDataInt64IdConverter", "ReferenceDataInt64IdConverter{T}", "ReferenceDataInt64IdConverter\u003CT\u003E", "ReferenceDataNullableInt64IdConverter", "ReferenceDataNullableInt64IdConverter{T}", "ReferenceDataNullableInt64IdConverter\u003CT\u003E", "ReferenceDataGuidIdConverter", "ReferenceDataGuidIdConverter{T}", "ReferenceDataGuidIdConverter\u003CT\u003E", "ReferenceDataNullableGuidIdConverter", "ReferenceDataNullableGuidIdConverter{T}", "ReferenceDataNullableGuidIdConverter\u003CT\u003E" ] }, "refDataCodeDataName": { "type": "string", "title": "The Reference Data \u0060Code\u0060 data name.", "description": "Defaults to \u0060Code\u0060 (literal)." }, "refDataTextDataName": { "type": "string", "title": "The Reference Data \u0060Text\u0060 data name.", "description": "Defaults to \u0060Text\u0060 (literal)." }, "refDataIsActiveDataName": { "type": "string", "title": "The Reference Data \u0060IsActive\u0060 data name.", "description": "Defaults to \u0060IsActive\u0060 (literal)." }, "refDataSortOrderDataName": { "type": "string", "title": "The Reference Data \u0060SortOrder\u0060 data name.", "description": "Defaults to \u0060SortOrder\u0060 (literal)." }, "refDataETagDataName": { "type": "string", "title": "The Reference Data \u0060ETag\u0060 data name.", "description": "Defaults to \u0060RowVersion\u0060 (literal)." }, "eventPublish": { "type": "string", "title": "The layer to add logic to publish an event for a \u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060 operation.", "description": "Defaults to \u0060DataSvc\u0060. Used to enable the sending of messages to the likes of EventHub, ServiceBus, SignalR, etc. This can be overridden within the \u0060Entity\u0060(s).", "enum": [ "None", "DataSvc", "Data" ] }, "eventSourceRoot": { "type": "string", "title": "The URI root for the event source by prepending to all event source URIs.", "description": "The event source is only updated where an \u0060EventSourceKind\u0060 is not \u0060None\u0060. This can be extended within the \u0060Entity\u0060(s)." }, "eventSourceKind": { "type": "string", "title": "The URI kind for the event source URIs.", "description": "Defaults to \u0060None\u0060 (being the event source is not updated).", "enum": [ "None", "Absolute", "Relative", "RelativeOrAbsolute" ] }, "eventSubjectRoot": { "type": "string", "title": "The root for the event Subject name by prepending to all event subject names.", "description": "Used to enable the sending of messages to the likes of EventHub, ServiceBus, SignalR, etc. This can be overridden within the \u0060Entity\u0060(s)." }, "eventSubjectSeparator": { "type": "string", "title": "The subject path separator.", "description": "Defaults to \u0060.\u0060. Used only where the subject is automatically inferred." }, "eventActionFormat": { "type": "string", "title": "The formatting for the Action when an Event is published.", "description": "Defaults to \u0060None\u0060 (no formatting required, i.e. as-is)\u0060.", "enum": [ "None", "PastTense" ] }, "eventTransaction": { "type": "boolean", "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060DataSvc\u0060-layer whereever generating event publishing logic.", "description": "Usage will force a rollback of any underlying data transaction (where the provider supports TransactionScope) on failure, such as an \u0060EventPublish\u0060 error. This is by no means implying a Distributed Transaction (DTC) should be invoked; this is only intended for a single data source that supports a TransactionScope to guarantee reliable event publishing. Defaults to \u0060false\u0060. This essentially defaults the \u0060Entity.EventTransaction\u0060 where not otherwise specified. This should only be used where \u0060EventPublish\u0060 is \u0060DataSvc\u0060 and a transactionally-aware data source is being used." }, "grpc": { "type": "boolean", "title": "Indicates whether gRPC support (more specifically service-side) is required.", "description": "gRPC support is an explicit opt-in model. Must be set to \u0060true\u0060 for any of the subordinate gRPC capabilities to be code-generated. Will require each \u0060Entity\u0060, and corresponding \u0060Property\u0060 and \u0060Operation\u0060 to be opted-in specifically." }, "pathBase": { "type": "string", "title": "The base path (directory) prefix for the artefacts; other \u0060Path*\u0060 properties append to this value when they are not specifically overridden.", "description": "Defaults to \u0060Company\u0060 (runtime parameter) \u002B \u0060.\u0060 \u002B \u0060AppName\u0060 (runtime parameter). For example \u0060Beef.Demo\u0060." }, "pathCommon": { "type": "string", "title": "The path (directory) for the Database-related artefacts.", "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Common\u0060 (literal). For example \u0060Beef.Demo.Common\u0060." }, "pathBusiness": { "type": "string", "title": "The path (directory) for the Business-related (.NET) artefacts.", "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060." }, "pathApi": { "type": "string", "title": "The path (directory) for the API-related (.NET) artefacts.", "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.\u0060 \u002B \u0060ApiName\u0060 (runtime parameter). For example \u0060Beef.Demo.Api\u0060." }, "namespaceBase": { "type": "string", "title": "The base Namespace (root) for the .NET artefacts.", "description": "Defaults to \u0060Company\u0060 (runtime parameter) \u002B \u0060.\u0060 \u002B \u0060AppName\u0060 (runtime parameter). For example \u0060Beef.Demo\u0060." }, "namespaceCommon": { "type": "string", "title": "The Namespace (root) for the Common-related .NET artefacts.", "description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.Common\u0060 (literal). For example \u0060Beef.Demo.Common\u0060." }, "namespaceBusiness": { "type": "string", "title": "The Namespace (root) for the Business-related .NET artefacts.", "description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060." }, "namespaceApi": { "type": "string", "title": "The Namespace (root) for the Api-related .NET artefacts.", "description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.\u0060 \u002B \u0060ApiName\u0060 (runtime parameter). For example \u0060Beef.Demo.Api\u0060." }, "authActionCreate": { "type": "string", "title": "The default \u0060Operation.AuthAction\u0060 for an \u0060Operation.Type\u0060 of \u0060Create\u0060.", "description": "Defaults to \u0060Create\u0060." }, "authActionRead": { "type": "string", "title": "The default \u0060Operation.AuthAction\u0060 for an \u0060Operation.Type\u0060 of \u0060Get\u0060 or \u0060GetColl\u0060.", "description": "Defaults to \u0060Read\u0060." }, "authActionUpdate": { "type": "string", "title": "The default \u0060Operation.AuthAction\u0060 for an \u0060Operation.Type\u0060 of \u0060Update\u0060.", "description": "Defaults to \u0060Update\u0060." }, "authActionDelete": { "type": "string", "title": "The default \u0060Operation.AuthAction\u0060 for an \u0060Operation.Type\u0060 of \u0060Delete\u0060.", "description": "Defaults to \u0060Delete\u0060." }, "entities": { "type": "array", "title": "The corresponding \u0060Entity\u0060 collection.", "items": { "$ref": "#/definitions/Entity" } } } }, "Entity": { "type": "object", "title": "\u0027Entity\u0027 object (entity-driven)", "description": "The \u0060Entity\u0060 is used as the primary configuration for driving the entity-driven code generation.", "properties": { "name": { "type": "string", "title": "The unique entity name." }, "text": { "type": "string", "title": "The overriding text for use in comments.", "description": "Overrides the Name (as sentence text) for the summary comments. It will be formatted as: \u0060Represents the {Text} entity.\u0060. To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. {{Xxx}}). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "fileName": { "type": "string", "title": "The overriding file name.", "description": "Overrides the Name as the code-generated file name." }, "privateName": { "type": "string", "title": "The overriding private name.", "description": "Overrides the \u0060Name\u0060 to be used for private fields. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060_firstName\u0060." }, "argumentName": { "type": "string", "title": "The overriding argument name.", "description": "Overrides the \u0060Name\u0060 to be used for argument parameters. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060firstName\u0060." }, "constType": { "type": "string", "title": "The Const .NET Type option.", "description": "The .NET Type to be used for the \u0060const\u0060 values. Defaults to \u0060string\u0060.", "enum": [ "int", "long", "Guid", "string" ] }, "isInitialOverride": { "type": "boolean", "title": "Indicates whether to override the \u0060IInitial.IsInitial\u0060 property.", "description": "Set to either \u0060true\u0060 or \u0060false\u0060 to override as specified; otherwise, \u0060null\u0060 to check each property. Defaults to \u0060null\u0060." }, "withResult": { "type": "boolean", "title": "Indicates whether to use \u0060CoreEx.Results\u0060 (aka Railway-oriented programming).", "description": "Defaults to \u0060CodeGeneration.WithResult\u0060. This can be overridden within the Operation\u0060(s)." }, "refDataType": { "type": "string", "title": "The Reference Data identifier Type option.", "description": "Required to identify an entity as being Reference Data. Specifies the underlying .NET Type used for the Reference Data identifier.", "enum": [ "int", "long", "Guid", "string" ] }, "refDataText": { "type": "boolean", "title": "Indicates whether a corresponding \u0060Text\u0060 property is added when generating a Reference Data \u0060Property\u0060 overriding the \u0060CodeGeneration.RefDataText\u0060 selection.", "description": "This is used where serializing within the Web API\u0060Controller\u0060 and the \u0060ExecutionContext.IsRefDataTextSerializationEnabled\u0060 is set to \u0060true\u0060 (which is automatically set where the url contains \u0060$text=true\u0060). Defaults from \u0060CodeGeneration.RefDataText\u0060." }, "refDataSortOrder": { "type": "string", "title": "The Reference Data sort order option.", "description": "Specifies the default sort order for the underlying Reference Data collection. Defaults to \u0060SortOrder\u0060.", "enum": [ "SortOrder", "Id", "Code", "Text" ] }, "inherits": { "type": "string", "title": "The base class that the entity inherits from.", "description": "Defaults to \u0060EntityBase\u0060 for a standard entity. For Reference Data it will default to \u0060ReferenceDataBaseEx\u003Cxxx\u003E\u0060 depending on the corresponding \u0060RefDataType\u0060 value. See \u0060OmitEntityBase\u0060 if the desired outcome is to not inherit from any of the aforementioned base classes." }, "implements": { "type": "string", "title": "The list of comma separated interfaces that are to be declared for the entity class." }, "implementsAutoInfer": { "type": "boolean", "title": "Indicates whether to automatically infer the interface implements for the entity from the properties declared.", "description": "Will attempt to infer the following: \u0060IIdentifier\u003CGuid\u003E\u0060, \u0060IIdentifier\u003Cint\u003E\u0060, \u0060IIdentifier\u003Clong\u003E\u0060, \u0060IIdentifier\u003Cstring\u003E\u0060, \u0060IETag\u0060 and \u0060IChangeLog\u0060. Defaults to \u0060true\u0060." }, "abstract": { "type": "boolean", "title": "Indicates whether the class should be defined as abstract." }, "genericWithT": { "type": "boolean", "title": "Indicates whether the class should be defined as a generic with a single parameter \u0060T\u0060." }, "namespace": { "type": "string", "title": "The entity namespace to be appended.", "description": "Appended to the end of the standard structure as follows: \u0060{Company}.{AppName}.Business.Entities.{Namespace}\u0060." }, "omitEntityBase": { "type": "boolean", "title": "Indicates that the entity should not inherit from \u0060EntityBase\u0060.", "description": "As such any of the \u0060EntityBase\u0060 related capabilites are not supported (are omitted from generation). The intention for this is more for the generation of simple internal entities." }, "jsonSerializer": { "type": "string", "title": "The JSON Serializer to use for JSON property attribution.", "description": "Defaults to the \u0060CodeGeneration.JsonSerializer\u0060 configuration property where specified; otherwise, \u0060SystemText\u0060.", "enum": [ "SystemText", "Newtonsoft" ] }, "internalOnly": { "type": "boolean", "title": "Indicates whether the entity is for internal use only; declared in Business entities only." }, "collection": { "type": "boolean", "title": "Indicates whether a corresponding entity collection class should be created." }, "collectionResult": { "type": "boolean", "title": "Indicates whether a corresponding entity collection result class should be created", "description": "Enables the likes of additional paging state to be stored with the underlying collection." }, "collectionType": { "type": "string", "title": "The entity collection type used where \u0060CollectionInherits\u0060 is not specified.", "enum": [ "Standard", "Keyed", "Dictionary" ] }, "collectionInherits": { "type": "string", "title": "The base class that a \u0060Collection\u0060 inherits from.", "description": "Defaults to \u0060EntityBaseCollection\u0060 or \u0060EntityBaseKeyedCollection\u0060 depending on \u0060CollectionKeyed\u0060. For Reference Data it will default to \u0060ReferenceDataCollectionBase\u0060." }, "collectionResultInherits": { "type": "string", "title": "The base class that a \u0060CollectionResult\u0060 inherits from.", "description": "Defaults to \u0060EntityCollectionResult\u0060." }, "behavior": { "type": "string", "title": "Defines the key CRUD-style behavior (operation types), being \u0027C\u0027reate, \u0027G\u0027et (or \u0027R\u0027ead), \u0027U\u0027pdate, \u0027P\u0027atch, \u0027D\u0027elete and \u0060Q\u0060uery). Additionally, \u0060GetByArgs\u0060 (\u0027B\u0027), \u0060GetAll\u0060 (\u0027A\u0027) and \u0060GetByQuery\u0060 (\u0027Q\u0027) operations configuration will be automatically inferred where not otherwise explicitly specified.", "description": "Value may only specifiy one or more of the \u0060CGRUDBAQ\u0060 characters (in any order) to define the automatically generated behavior (operations); for example: \u0060CRUPD\u0060 or \u0060CRUP\u0060 or \u0060rba\u0060 (case insensitive). This is shorthand for setting one or more of the following properties: \u0060Get\u0060, \u0060GetByArgs\u0060, \u0060GetAll\u0060, \u0027Create\u0027, \u0060Update\u0060, \u0060Patch\u0060 and \u0060Delete\u0060. Where one of these properties is set to either \u0060true\u0060 or \u0060false\u0060 this will take precedence over the value set for \u0060Behavior\u0060." }, "get": { "type": "boolean", "title": "Indicates that a \u0060Get\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "getByArgs": { "type": "boolean", "title": "Indicates that a \u0060GetByArgs\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "getAll": { "type": "boolean", "title": "Indicates that a \u0060GetAll\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "getByQuery": { "type": "boolean", "title": "Indicates that a \u0060GetByQuery\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "create": { "type": "boolean", "title": "Indicates that a \u0060Create\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "update": { "type": "boolean", "title": "Indicates that a \u0060Update\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "patch": { "type": "boolean", "title": "Indicates that a \u0060Patch\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "delete": { "type": "boolean", "title": "Indicates that a \u0060Delete\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "autoImplement": { "type": "string", "title": "The data source auto-implementation option.", "description": "Defaults to \u0060CodeGeneration.AutoImplement\u0060 (where \u0060RefDataType\u0060 or \u0060EntityFrameworkModel\u0060 or \u0060CosmosModel\u0060 or \u0060HttpAgent\u0060 is not null; otherwise, \u0060None\u0060. Indicates that the implementation for the underlying \u0060Operations\u0060 will be auto-implemented using the selected data source (unless explicitly overridden). When selected some of the related attributes will also be required (as documented). Additionally, the \u0060AutoImplement\u0060 can be further specified/overridden per \u0060Operation\u0060.", "enum": [ "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" ] }, "dataCtor": { "type": "string", "title": "The access modifier for the generated \u0060Data\u0060 constructor.", "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", "Protected" ] }, "dataCtorCustom": { "type": "boolean", "title": "Indicates whether the \u0060Data\u0060 constructor will be implemented as custom; i.e. not generated." }, "dataCtorParams": { "type": "array", "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated \u0060Data\u0060 constructor.", "description": "Each constructor parameter should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IConfiguration^Config\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. Where the \u0060Type\u0060 matches an already inferred value it will be ignored.", "items": { "type": "string" } }, "dataExtensions": { "type": "boolean", "title": "Indicates whether the \u0060Data\u0060 extensions logic should be generated.", "description": "This can be overridden using \u0060Operation.DataExtensions\u0060." }, "refDataIdDataName": { "type": "string", "title": "The Reference Data \u0060Id\u0060 data name.", "description": "Defaults to \u0060Name\u0060 \u002B \u0060Id\u0060 (literal)." }, "refDataCodeDataName": { "type": "string", "title": "The Reference Data \u0060Code\u0060 data name.", "description": "Defaults to \u0060Code\u0060 (literal)." }, "refDataTextDataName": { "type": "string", "title": "The Reference Data \u0060Text\u0060 data name.", "description": "Defaults to \u0060Text\u0060 (literal)." }, "refDataIsActiveDataName": { "type": "string", "title": "The Reference Data \u0060IsActive\u0060 data name.", "description": "Defaults to \u0060IsActive\u0060 (literal)." }, "refDataSortOrderDataName": { "type": "string", "title": "The Reference Data \u0060SortOrder\u0060 data name.", "description": "Defaults to \u0060SortOrder\u0060 (literal)." }, "refDataETagDataName": { "type": "string", "title": "The Reference Data \u0060ETag\u0060 data name.", "description": "Defaults to \u0060RowVersion\u0060 (literal)." }, "refDataStoredProcedureName": { "type": "string", "title": "The Reference Data database stored procedure name.", "description": "Defaults to \u0060sp\u0060 (literal) \u002B \u0060Name\u0060 \u002B \u0060GetAll\u0060 (literal)." }, "databaseType": { "type": "string", "title": "The .NET database type and optional name (used where \u0060AutoImplement\u0060 is \u0060Database\u0060).", "description": "Defaults to the \u0060CodeGeneration.DatabaseName\u0060 configuration property (its default value is \u0060IDatabase\u0060). Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060." }, "databaseSchema": { "type": "string", "title": "The database schema name (used where \u0060AutoImplement\u0060 is \u0060Database\u0060).", "description": "Defaults to \u0060dbo\u0060." }, "databaseMapperInheritsFrom": { "type": "string", "title": "The name of the \u0060Mapper\u0060 that the generated Database \u0060Mapper\u0060 inherits from." }, "databaseCustomMapper": { "type": "boolean", "title": "Indicates that a custom Database \u0060Mapper\u0060 will be used; i.e. not generated.", "description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated." }, "databaseMapperEx": { "type": "boolean", "title": "Indicates that a \u0060DatabaseMapperEx\u0060 (extended/explicit) will be used; versus, \u0060DatabaseMapper\u0060 (which uses Reflection internally).", "description": "Defaults to \u0060CodeGeneration.DatabaseMapperEx\u0060 (its default value is \u0060true\u0060). The \u0060DatabaseMapperEx\u0060 essentially replaces the \u0060DatabaseMapper\u0060 as it is more performant; this option can be used where leagcy/existing behavior is required." }, "entityFrameworkType": { "type": "string", "title": "The .NET Entity Framework type and optyional name used where \u0060AutoImplement\u0060 is \u0060EntityFramework\u0060.", "description": "Defaults to \u0060CodeGeneration.EntityFrameworkName\u0060. Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060." }, "entityFrameworkModel": { "type": "string", "title": "The corresponding Entity Framework model name (required where \u0060AutoImplement\u0060 is \u0060EntityFramework\u0060)." }, "entityFrameworkCustomMapper": { "type": "boolean", "title": "Indicates that a custom Entity Framework \u0060Mapper\u0060 will be used; i.e. not generated.", "description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated." }, "entityFrameworkMapperBase": { "type": "string", "title": "The EntityFramework data-layer name that should be used for base mappings." }, "cosmosType": { "type": "string", "title": "The .NET Cosmos DB type and optional name used where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060.", "description": "Defaults to the \u0060CodeGeneration.CosmosName\u0060 configuration property (its default value is \u0060ICosmosDb\u0060). Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060." }, "cosmosModel": { "type": "string", "title": "The corresponding Cosmos model name (required where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060)." }, "cosmosContainerId": { "type": "string", "title": "The Cosmos \u0060ContainerId\u0060 required where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060." }, "cosmosPartitionKey": { "type": "string", "title": "The C# code to be used for setting the optional Cosmos \u0060PartitionKey\u0060 where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060.", "description": "The value \u0060PartitionKey.None\u0060 can be specified. Literals will need to be quoted." }, "cosmosValueContainer": { "type": "boolean", "title": "Indicates whether the \u0060CosmosDbValueContainer\u0060 is to be used; otherwise, \u0060CosmosDbContainer\u0060." }, "cosmosCustomMapper": { "type": "boolean", "title": "Indicates that a custom Cosmos \u0060Mapper\u0060 will be used; i.e. not generated.", "description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated." }, "cosmosMapperBase": { "type": "string", "title": "The Cosmos data-layer name that should be used for base mappings." }, "odataType": { "type": "string", "title": "The .NET OData type and optional name used where \u0060AutoImplement\u0060 is \u0060OData\u0060.", "description": "Defaults to the \u0060CodeGeneration.ODataName\u0060 configuration property (its default value is \u0060IOData\u0060). Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060." }, "odataModel": { "type": "string", "title": "The corresponding OData model name (required where \u0060AutoImplement\u0060 is \u0060OData\u0060)." }, "odataCollectionName": { "type": "string", "title": "The name of the underlying OData collection where \u0060AutoImplement\u0060 is \u0060OData\u0060.", "description": "The underlying \u0060Simple.OData.Client\u0060 will attempt to infer." }, "odataCustomMapper": { "type": "boolean", "title": "Indicates that a custom OData \u0060Mapper\u0060 will be used; i.e. not generated.", "description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated." }, "httpAgentType": { "type": "string", "title": "The .NET HTTP Agent type and optional name used where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "Defaults to \u0060CodeGeneration.HttpAgentName\u0060 configuration property (its default value is \u0060IHttpAgent\u0060). Should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060." }, "httpAgentRoutePrefix": { "type": "string", "title": "The base HTTP Agent API route where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "This is the base (prefix) \u0060URI\u0060 for the HTTP Agent endpoint and can be further extended when defining the underlying \u0060Operation\u0060(s)." }, "httpAgentModel": { "type": "string", "title": "The corresponding HTTP Agent model name (required where \u0060AutoImplement\u0060 is \u0060HttpAgent\u0060).", "description": "This can be overridden within the \u0060Operation\u0060(s)." }, "httpAgentReturnModel": { "type": "string", "title": "The corresponding HTTP Agent model name (required where \u0060AutoImplement\u0060 is \u0060HttpAgent\u0060).", "description": "This can be overridden within the \u0060Operation\u0060(s)." }, "httpAgentCode": { "type": "string", "title": "The fluent-style method-chaining C# HTTP Agent API code to include where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "Prepended to \u0060Operation.HttpAgentCode\u0060 where specified to enable standardized functionality." }, "httpAgentCustomMapper": { "type": "boolean", "title": "Indicates that a custom HTTP Agent \u0060Mapper\u0060 will be used; i.e. not generated.", "description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated." }, "httpAgentMapperBase": { "type": "string", "title": "The HTTP Agent data-layer name that should be used for base mappings." }, "dataSvcCaching": { "type": "boolean", "title": "Indicates whether request-based \u0060IRequestCache\u0060 caching is to be performed at the \u0060DataSvc\u0060 layer to improve performance (i.e. reduce chattiness).", "description": "Defaults to \u0060true\u0060." }, "dataSvcCtor": { "type": "string", "title": "The access modifier for the generated \u0060DataSvc\u0060 constructor.", "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", "Protected" ] }, "dataSvcCustom": { "type": "string", "title": "The option that indicates the level of \u0060DataSvc\u0060 customization (invokes \u0060*OnImplementationAsync\u0060 method) vs code-generation (automatically invokes data-layer).", "description": "\u0060Full\u0060 indicates the logic is fully customized (only invocation is code-generated). \u0060Partial\u0060 indicates combination of surrounding code-generation with final custom invocation versus data-layer. \u0060None\u0060 indicates data-layer invocation with _no_ custom invocation (default).", "enum": [ "Full", "Partial", "None" ] }, "dataSvcCtorCustom": { "type": "boolean", "title": "Indicates whether the \u0060DataSvc\u0060 constructor will be implemented as custom; i.e. not generated." }, "dataSvcCtorParams": { "type": "array", "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated \u0060DataSvc\u0060 constructor.", "description": "Each constructor parameter should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IConfiguration^Config\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. Where the \u0060Type\u0060 matches an already inferred value it will be ignored.", "items": { "type": "string" } }, "dataSvcExtensions": { "type": "boolean", "title": "Indicates whether the \u0060DataSvc\u0060 extensions logic should be generated.", "description": "This can be overridden using \u0060Operation.DataSvcExtensions\u0060." }, "eventPublish": { "type": "string", "title": "The layer to add logic to publish an event for a \u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060 operation.", "description": "Defaults to the \u0060CodeGeneration.EventPublish\u0060 configuration property (inherits) where not specified. Used to enable the sending of messages to the likes of EventGrid, Service Broker, SignalR, etc. This can be overridden within the \u0060Operation\u0060(s).", "enum": [ "None", "DataSvc", "Data" ] }, "eventSource": { "type": "string", "title": "The Event Source.", "description": "Defaults to \u0060Name\u0060 (as lowercase) appended with the \u0060/{$key}\u0060 placeholder. Note: when used in code-generation the \u0060CodeGeneration.EventSourceRoot\u0060 will be prepended where specified. To include the entity id/key include a \u0060{$key}\u0060 placeholder (\u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060 operation only); for example: \u0060person/{$key}\u0060. This can be overridden for the \u0060Operation\u0060." }, "eventTransaction": { "type": "boolean", "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated whereever generating event publishing logic.", "description": "Usage will force a rollback of any underlying data transaction (where the provider supports TransactionScope) on failure, such as an \u0060EventPublish\u0060 error. This is by no means implying a Distributed Transaction (DTC) should be invoked; this is only intended for a single data source that supports a TransactionScope to guarantee reliable event publishing. Defaults to \u0060CodeGeneration.EventTransaction\u0060. This essentially defaults the \u0060Operation.DataSvcTransaction\u0060 where not otherwise specified. This should only be used where a transactionally-aware data source is being used." }, "managerCustom": { "type": "boolean", "title": "Indicates whether the \u0060Manager\u0060 logic is a custom implementation; i.e. no auto-\u0060DataSvc\u0060 invocation logic is to be generated." }, "managerCtor": { "type": "string", "title": "The access modifier for the generated \u0060Manager\u0060 constructor.", "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", "Protected" ] }, "managerCtorCustom": { "type": "boolean", "title": "Indicates whether the \u0060Manager\u0060 constructor will be implemented as custom; i.e. not generated." }, "managerCtorParams": { "type": "array", "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated \u0060Manager\u0060 constructor.", "description": "Each constructor parameter should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IConfiguration^Config\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. Where the \u0060Type\u0060 matches an already inferred value it will be ignored.", "items": { "type": "string" } }, "managerExtensions": { "type": "boolean", "title": "Indicates whether the \u0060Manager\u0060 extensions logic should be generated.", "description": "This can be overridden using \u0060Operation.ManagerExtensions\u0060." }, "validator": { "type": "string", "title": "The name of the .NET implementing \u0060Type\u0060 or interface \u0060Type\u0060 that will perform the validation.", "description": "Only used for defaulting the \u0060Create\u0060 and \u0060Update\u0060 operation types (\u0060Operation.Type\u0060) where not specified explicitly." }, "identifierGenerator": { "type": "boolean", "title": "Indicates whether the \u0060IIdentifierGenerator\u0060 should be used to generate the \u0060Id\u0060 property where the operation types (\u0060Operation.Type\u0060) is \u0060Create\u0060." }, "managerCleanUp": { "type": "boolean", "title": "Indicates whether a \u0060Cleaner.Cleanup\u0060 is performed for the operation parameters within the Manager-layer.", "description": "This can be overridden within the \u0060CodeGeneration\u0060 and \u0060Operation\u0060(s)." }, "validationFramework": { "type": "string", "title": "The \u0060Validation\u0060 framework to use for the entity-based validation.", "description": "Defaults to \u0060CodeGeneration.ValidationFramework\u0060. This can be overridden within the \u0060Operation\u0060(s) and \u0060Parameter\u0060(s).", "enum": [ "CoreEx", "FluentValidation" ] }, "webApiRoutePrefix": { "type": "string", "title": "The \u0060RoutePrefixAtttribute\u0060 for the corresponding entity Web API controller.", "description": "This is the base (prefix) \u0060URI\u0060 for the entity and can be further extended when defining the underlying \u0060Operation\u0060(s). The \u0060CodeGeneration.WebApiRoutePrefix\u0060 will be prepended where specified. Where not specified will automatically default to the pluralized \u0060Name\u0060 (as lowercase)." }, "webApiAuthorize": { "type": "string", "title": "The authorize attribute value to be used for the corresponding entity Web API controller; generally either \u0060Authorize\u0060 or \u0060AllowAnonymous\u0060.", "description": "Defaults to the \u0060CodeGeneration.WebApiAuthorize\u0060 configuration property (inherits) where not specified; can be overridden at the \u0060Operation\u0060 level also." }, "webApiCtor": { "type": "string", "title": "The access modifier for the generated Web API \u0060Controller\u0060 constructor.", "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", "Protected" ] }, "webApiCtorParams": { "type": "array", "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated \u0060WebApi\u0060 constructor.", "description": "Each constructor parameter should be formatted as \u0060Type\u0060 \u002B \u0060^\u0060 \u002B \u0060Name\u0060; e.g. \u0060IConfiguration^Config\u0060. Where the \u0060Name\u0060 portion is not specified it will be inferred. Where the \u0060Type\u0060 matches an already inferred value it will be ignored.", "items": { "type": "string" } }, "webApiAutoLocation": { "type": "boolean", "title": "Indicates whether the HTTP Response Location Header route (\u0060Operation.WebApiLocation\u0060) is automatically inferred.", "description": "This will automatically set the \u0060Operation.WebApiLocation\u0060 for an \u0060Operation\u0060 named \u0060Create\u0060 where there is a corresponding named \u0060Get\u0060. This is defaulted from the \u0060CodeGen.WebApiAutoLocation\u0060." }, "webApiConcurrency": { "type": "boolean", "title": "Indicates whether the Web API is responsible for managing (simulating) concurrency via auto-generated ETag.", "description": "This provides an alternative where the underlying data source does not natively support optimistic concurrency (native support should always be leveraged as a priority). Where the \u0060Operation.Type\u0060 is \u0060Update\u0060 or \u0060Patch\u0060, the request ETag will be matched against the response for a corresponding \u0060Get\u0060 operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the \u0060Get\u0060 must be the same as that returned from the corresponding \u0060Create\u0060, \u0060Update\u0060 and \u0060Patch\u0060 (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. This defaults the \u0060Operation.WebApiConcurrency\u0060." }, "webApiGetOperation": { "type": "string", "title": "The corresponding \u0060Get\u0060 method name (in the \u0060XxxManager\u0060) where the \u0060Operation.Type\u0060 is \u0060Update\u0060 and \u0060SimulateConcurrency\u0060 is \u0060true\u0060.", "description": "Defaults to \u0060Get\u0060. Specify either just the method name (e.g. \u0060OperationName\u0060) or, interface and method name (e.g. \u0060IXxxManager.OperationName\u0060) to be invoked where in a different \u0060YyyManager.OperationName\u0060." }, "webApiTags": { "type": "array", "title": "The list of tags to add for the generated \u0060WebApi\u0060 controller.", "items": { "type": "string" } }, "dataModel": { "type": "boolean", "title": "Indicates whether a data \u0060model\u0060 version of the entity should also be generated (output to \u0060.\\Business\\Data\\Model\u0060).", "description": "The model will be generated with \u0060OmitEntityBase = true\u0060. Any reference data properties will be defined using their \u0060RefDataType\u0060 intrinsic \u0060Type\u0060 versus their corresponding (actual) reference data \u0060Type\u0060." }, "dataModelInherits": { "type": "string", "title": "Overrides the default data \u0060model\u0060 inherits value." }, "excludeEntity": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060Entity\u0060 class (\u0060Xxx.cs\u0060)." }, "excludeAll": { "type": "boolean", "title": "Indicates whether to exclude the generation of all \u0060Operation\u0060 related artefacts; excluding the \u0060Entity\u0060 class.", "description": "Is a shorthand means for setting all of the other \u0060Exclude*\u0060 properties (with the exception of \u0060ExcludeEntity\u0060) to exclude." }, "excludeIData": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060Data\u0060 interface (\u0060IXxxData.cs\u0060)." }, "excludeData": { "type": "string", "title": "The option to exclude the generation of the \u0060Data\u0060 class (\u0060XxxData.cs\u0060).", "description": "Defaults to \u0060Include\u0060 indicating _not_ to exclude. A value of \u0060Exclude\u0060 indicates to exclude all output; alternatively, \u0060RequiresMapper\u0060 indicates to at least output the corresponding \u0060Mapper\u0060 class.", "enum": [ "Include", "Exclude", "RequiresMapper" ] }, "excludeIDataSvc": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060DataSvc\u0060 interface (\u0060IXxxDataSvc.cs\u0060)." }, "excludeDataSvc": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060DataSvc\u0060 class (\u0060XxxDataSvc.cs\u0060)." }, "excludeIManager": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060Manager\u0060 interface (\u0060IXxxManager.cs\u0060)." }, "excludeManager": { "type": "boolean", "title": "Indicates whether to exclude the generation of the \u0060Manager\u0060 class (\u0060XxxManager.cs\u0060)." }, "excludeWebApi": { "type": "boolean", "title": "The option to exclude the generation of the WebAPI \u0060Controller\u0060 class (\u0060XxxController.cs\u0060)." }, "excludeWebApiAgent": { "type": "boolean", "title": "Indicates whether to exclude the generation of the WebAPI consuming \u0060Agent\u0060 class (\u0060XxxAgent.cs\u0060)." }, "excludeGrpcAgent": { "type": "boolean", "title": "Indicates whether to exclude the generation of the gRPC consuming \u0060Agent\u0060 class (\u0060XxxAgent.cs\u0060)." }, "authPermission": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsAuthorized(AuthPermission)\u0060 to determine whether the user is authorized." }, "authEntity": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)\u0060 to determine whether the user is authorized." }, "authRole": { "type": "string", "title": "The role (permission) used by the \u0060ExecutionContext.UserIsInRole(role)\u0060 for each \u0060Operation\u0060.", "description": "Used where not overridden specifically for an \u0060Operation\u0060; i.e. acts as the default." }, "grpc": { "type": "boolean", "title": "Indicates whether gRPC support (more specifically service-side) is required for the Entity.", "description": "gRPC support is an explicit opt-in model (see \u0060CodeGeneration.Grpc\u0060 configuration); therefore, each corresponding \u0060Property\u0060 and \u0060Operation\u0060 will also need to be opted-in specifically." }, "properties": { "type": "array", "title": "The corresponding \u0060Property\u0060 collection.", "items": { "$ref": "#/definitions/Property" } }, "operations": { "type": "array", "title": "The corresponding \u0060Operation\u0060 collection.", "items": { "$ref": "#/definitions/Operation" } }, "consts": { "type": "array", "title": "The corresponding \u0060Consts\u0060 collection.", "items": { "$ref": "#/definitions/Const" } } }, "required": [ "name" ] }, "Property": { "type": "object", "title": "\u0027Property\u0027 object (entity-driven)", "description": "The \u0060Property\u0060 object defines an \u0060Entity\u0060 property and its charateristics.", "properties": { "name": { "type": "string", "title": "The unique property name." }, "text": { "type": "string", "title": "The overriding text for use in comments.", "description": "By default the \u0060Text\u0060 will be the \u0060Name\u0060 reformatted as sentence casing. Depending on whether the \u0060Type\u0060 is \u0060bool\u0060, will appear in one of the two generated sentences. Where not \u0060bool\u0060 it will be: Gets or sets a value indicating whether {text}.\u0027. Otherwise, it will be: Gets or sets the {text}.\u0027. To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. {{Xxx}}). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "modelText": { "type": "string", "title": "The overriding model text for use in comments.", "description": "By default the \u0060ModelText\u0060 will be the \u0060Name\u0060 reformatted as sentence casing. Depending on whether the \u0060Type\u0060 is \u0060bool\u0060, will appear in one of the two generated sentences. Where not \u0060bool\u0060 it will be: Gets or sets a value indicating whether {text}.\u0027. Otherwise, it will be: Gets or sets the {text}.\u0027. To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. {{Xxx}}). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "type": { "type": "string", "title": "The .NET \u0060Type\u0060.", "description": "Defaults to \u0060string\u0060. To reference a Reference Data \u0060Type\u0060 always prefix with \u0060RefDataNamespace\u0060 (e.g. \u0060RefDataNamespace.Gender\u0060) or shortcut \u0060^\u0060 (e.g. \u0060^Gender\u0060). This will ensure that the appropriate Reference Data \u0060using\u0060 statement is used. _Shortcut:_ Where the \u0060Type\u0060 starts with (prefix) \u0060RefDataNamespace.\u0060 or \u0060^\u0060, and the correspondong \u0060RefDataType\u0060 attribute is not specified it will automatically default the \u0060RefDataType\u0060 to \u0060string.\u0060" }, "nullable": { "type": "boolean", "title": "Indicates whether the .NET \u0060Type\u0060 should be declared as nullable; e.g. \u0060string?\u0060. Will be inferred where the \u0060Type\u0060 is denoted as nullable; i.e. suffixed by a \u0060?\u0060." }, "inherited": { "type": "boolean", "title": "Indicates whether the property is inherited and therefore should not be output within the generated Entity class." }, "privateName": { "type": "string", "title": "The overriding private name.", "description": "Overrides the \u0060Name\u0060 to be used for private fields. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060_firstName\u0060." }, "argumentName": { "type": "string", "title": "The overriding argument name.", "description": "Overrides the \u0060Name\u0060 to be used for argument parameters. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060firstName\u0060." }, "primaryKey": { "type": "boolean", "title": "Indicates whether the property is considered part of the primary (unique) key.", "description": "This is also used to simplify the parameter specification for an Entity Operation by inferrence." }, "isEntity": { "type": "boolean", "title": "Indicates that the property \u0060Type\u0060 is another generated entity / collection and therefore specific capabilities can be assumed (e.g. \u0060CopyFrom\u0060 and \u0060Clone\u0060).", "description": "Will be inferred (default to \u0060true\u0060) where the \u0060Type\u0060 is \u0060ChangeLog\u0060 or the \u0060Type\u0060 is found as another \u0060Entity\u0060 within the code-generation configuration file." }, "immutable": { "type": "boolean", "title": "Indicates that the value is immutable and therefore cannot be changed once set." }, "dateTimeTransform": { "type": "string", "title": "The \u0060DateTime\u0060 transformation to be performed on \u0060Set\u0060 and \u0060CleanUp\u0060.", "description": "Defaults to \u0060UseDefault\u0060. This is only applied where the \u0060Type\u0060 is \u0060DateTime\u0060.", "enum": [ "UseDefault", "None", "DateOnly", "DateTimeLocal", "DateTimeUtc", "DateTimeUnspecified" ] }, "stringTrim": { "type": "string", "title": "The \u0060string\u0060 trimming of white space characters to be performed on \u0060Set\u0060 and \u0060CleanUp\u0060.", "description": "Defaults to \u0060UseDefault\u0060. This is only applied where the \u0060Type\u0060 is \u0060string\u0060.", "enum": [ "UseDefault", "None", "Start", "End", "Both" ] }, "stringTransform": { "type": "string", "title": "The \u0060string\u0060 transformation to be performed on \u0060Set\u0060 and \u0060CleanUp\u0060.", "description": "Defaults to \u0060UseDefault\u0060. This is only applied where the \u0060Type\u0060 is \u0060string\u0060.", "enum": [ "UseDefault", "None", "NullToEmpty", "EmptyToNull" ] }, "stringCasing": { "type": "string", "title": "The \u0060string\u0060 casing to be performed on \u0060Set\u0060 and \u0060CleanUp\u0060.", "description": "Defaults to \u0060UseDefault\u0060. This is only applied where the \u0060Type\u0060 is \u0060string\u0060.", "enum": [ "UseDefault", "None", "Lower", "Upper", "Title" ] }, "autoCreate": { "type": "boolean", "title": "Indicates whether an instance of the \u0060Type\u0060 is to be automatically created/instantiated when the property is first accessed (i.e. lazy instantiation)." }, "default": { "type": "string", "title": "The C# code to default the value.", "description": "Where the \u0060Type\u0060 is \u0060string\u0060 then the specified default value will need to be delimited. Any valid value assignment C# code can be used." }, "partitionKey": { "type": "boolean", "title": "Indicates whether the property is considered part of the Partition Key.", "description": "This will implement \u0060IPartitionKey\u0060 for the generated entity." }, "cacheKey": { "type": "boolean", "title": "Indicates whether the property is considered part of the Cache Key.", "description": "This will implement \u0060ICacheKey\u0060 for the generated entity." }, "internalOnly": { "type": "boolean", "title": "Indicates whether the property is for internal use only; declared in Business entities only.", "description": "In this instance the \u0060Property\u0060 will be excluded from the \u0060Common\u0060 entity declaration and \u0060Business\u0060 JSON serialization." }, "refDataType": { "type": "string", "title": "The underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID).", "description": "Defaults to \u0060string\u0060 (being the \u0060ReferenceDataBase.Code\u0060) where not specified and the corresponding \u0060Type\u0060 starts with (prefix) \u0060RefDataNamespace.\u0060 or \u0060^\u0060. Note: an \u0060Id\u0060 of type \u0060string\u0060 is currently not supported; the use of the \u0060Code\u0060 is the recommended approach.", "enum": [ "string", "int", "Guid" ] }, "refDataList": { "type": "boolean", "title": "Indicates that the Reference Data property is to be a serializable list (\u0060ReferenceDataSidList\u0060).", "description": "This is required to enable a list of Reference Data values (as per \u0060RefDataType\u0060) to be passed as an argument for example." }, "refDataText": { "type": "string", "title": "Indicates whether a corresponding \u0060Text\u0060 property is added when generating a Reference Data property, overriding the \u0060Entity.RefDataText\u0060 selection.", "description": "This is used where serializing within the Web API \u0060Controller\u0060 and the \u0060ExecutionContext.IsRefDataTextSerializationEnabled\u0060 is set to \u0060true\u0060 (which is automatically set where the url contains \u0060$text=true\u0060).\u0060Optional\u0060 indicates when \u0060ExecutionContext.IsRefDataTextSerializationEnabled\u0060 is set to \u0060true\u0060 then a value is output, \u0060Always\u0060 indicates that the value is _always_ output, and \u0060Never\u0060 indicates that feature is turned off.", "enum": [ "Optional", "Always", "Never" ] }, "refDataTextName": { "type": "string", "title": "The corresponding reference data \u0060Text\u0060 property name; defaults to \u0060Name\u0060 \u002B \u0027Text\u0027." }, "refDataMapping": { "type": "boolean", "title": "Indicates whether the property should use the underlying Reference Data mapping capabilities.", "description": "Mapped properties are a special Reference Data property type that ensure value uniqueness; this allows the likes of additional to/from mappings to occur between systems where applicable." }, "jsonName": { "type": "string", "title": "The JSON property name.", "description": "Defaults to \u0060ArgumentName\u0060 where not specified (i.e. camelCase); however, where the property is \u0060ETag\u0060 it will default to the \u0060Config.ETagJsonName\u0060." }, "jsonDataModelName": { "type": "string", "title": "The JSON property name for the corresponding data model (see \u0060Entity.DataModel\u0060).", "description": "Defaults to \u0060JsonName\u0060 where not specified." }, "serializationIgnore": { "type": "boolean", "title": "Indicates whether the property is not to be serialized.", "description": "All properties are serialized by default." }, "serializationAlwaysInclude": { "type": "boolean", "title": "Indicates whether to include the value (default or otherwise) when serializing." }, "dataModelIgnore": { "type": "boolean", "title": "Indicates whether the property is to be included within the data model.", "description": "All properties are included in the data model by default." }, "dataModelSerializationIgnore": { "type": "boolean", "title": "Indicates whether the property is not to be serialized where outputting as a data model.", "description": "All properties are included in the data model by default." }, "dataName": { "type": "string", "title": "The data name where Entity.AutoImplement is selected.", "description": "Defaults to the property \u0060Name\u0060. Represents the column name for a \u0060Database\u0060, or the correspinding property name for the other options." }, "dataConverter": { "type": "string", "title": "The data \u0060Converter\u0060 class name where \u0060Entity.AutoImplement\u0060 is selected.", "description": "A \u0060Converter\u0060 is used to convert a data source value to/from a .NET \u0060Type\u0060 where no standard data conversion can be applied. Where this value is suffixed by \u0060\u003CT\u003E\u0060 or \u0060{T}\u0060 this will automatically set \u0060Type\u0060." }, "dataMapperIgnore": { "type": "boolean", "title": "Indicates whether the property should be ignored (excluded) from the \u0060Data\u0060-layer / data \u0060Mapper\u0060 generated output.", "description": "All properties are included by default." }, "dataAutoGenerated": { "type": "boolean", "title": "Indicates whether the \u0060PrimaryKey\u0060 property value is automatically generated by the data source on \u0060Create\u0060." }, "dataOperationTypes": { "type": "string", "title": "The operations types (\u0060ExecutionContext.OperationType\u0060) selection to enable inclusion and exclusion of property mapping.", "description": "Defaults to \u0060Any\u0060.", "enum": [ "Any", "AnyExceptCreate", "AnyExceptUpdate", "AnyExceptGet", "Get", "Create", "Update", "Delete" ] }, "databaseMapper": { "type": "string", "title": "The database property \u0060Mapper\u0060 class name where \u0060Entity.AutoImplement\u0060 is selected.", "description": "A \u0060Mapper\u0060 is used to map a data source value to/from a .NET complex \u0060Type\u0060 (i.e. class with one or more properties)." }, "databaseIgnore": { "type": "boolean", "title": "Indicates whether the property should be ignored (excluded) from the database \u0060Mapper\u0060 generated output." }, "databaseDbType": { "type": "string", "title": "The database \u0060DbType\u0060 override (versus inferring from the corresponding .NET Type).", "description": "Overrides the inferred database type; i.e. can specify \u0060Date\u0060 or \u0060DateTime2\u0060, for .NET Type \u0060System.DateTime\u0060." }, "entityFrameworkMapper": { "type": "string", "title": "The Entity Framework \u0060Mapper\u0060 approach for the property.", "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", "Map", "Flatten" ] }, "cosmosMapper": { "type": "string", "title": "The Cosmos \u0060Mapper\u0060 approach for the property.", "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", "Map", "Flatten" ] }, "odataMapper": { "type": "string", "title": "The OData \u0060Mapper\u0060 approach for the property.", "description": "Defaults to \u0060Map\u0060 which indicates the property will be explicitly mapped. A value of \u0060Ignore\u0060 will explicitly \u0060Ignore\u0060, whilst a value of \u0060Skip\u0060 will skip code-generated mapping altogether.", "enum": [ "Map", "Ignore", "Skip" ] }, "httpAgentMapper": { "type": "string", "title": "The HttpAgent \u0060Mapper\u0060 approach for the property.", "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", "Map", "Flatten" ] }, "displayName": { "type": "string", "title": "The display name used in the likes of error messages for the property.", "description": "Defaults to the \u0060Name\u0060 as sentence case." }, "annotation1": { "type": "string", "title": "The property annotation (e.g. attribute) declaration code." }, "annotation2": { "type": "string", "title": "The property annotation (e.g. attribute) declaration code." }, "annotation3": { "type": "string", "title": "The property annotation (e.g. attribute) declaration code." }, "grpcFieldNo": { "type": "integer", "title": "The unique (immutable) field number required to enable gRPC support." }, "grpcType": { "type": "string", "title": "The underlying gRPC data type; will be inferred where not specified." } }, "required": [ "name" ] }, "Operation": { "type": "object", "title": "\u0027CodeGeneration\u0027 object (entity-driven)", "description": "The code generation for an \u0060Operation\u0060 is primarily driven by the \u0060Type\u0060 property. This encourages (enforces) a consistent implementation for the standardised **CRUD** (Create, Read, Update and Delete) actions, as well as supporting fully customised operations as required.", "properties": { "name": { "type": "string", "title": "The unique operation name." }, "type": { "type": "string", "title": "The type of operation that is to be code-generated.", "description": "Defaults to \u0060Custom\u0060.", "enum": [ "Get", "GetColl", "Create", "Update", "Patch", "Delete", "Custom", "CustomManagerOnly" ] }, "text": { "type": "string", "title": "The text for use in comments.", "description": "The \u0060Text\u0060 will be defaulted for all the \u0060Operation.Type\u0060 options with the exception of \u0060Custom\u0060. To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. {{Xxx}}). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "primaryKey": { "type": "boolean", "title": "Indicates whether the properties marked as a primary key (\u0060Property.PrimaryKey\u0060) are to be used as the parameters.", "description": "This simplifies the specification of these properties as parameters versus having to declare each specifically. Each of the parameters will also be set to be mandatory." }, "paging": { "type": "boolean", "title": "Indicates whether a \u0060PagingArgs\u0060 argument is to be added to the operation to enable (standardized) paging related logic." }, "query": { "type": "boolean", "title": "Indicates whether a \u0060QueryArgs\u0060 argument is to be added to the operation to enable OData-like $filter and $orderby related logic." }, "valueType": { "type": "string", "title": "The .NET value parameter \u0060Type\u0060 for the operation.", "description": "Defaults to the parent \u0060Entity.Name\u0060 where the \u0060Operation.Type\u0060 options are \u0060Create\u0060 or \u0060Update\u0060." }, "returnType": { "type": "string", "title": "The .NET return \u0060Type\u0060 for the operation.", "description": "Defaults to the parent \u0060Entity.Name\u0060 where the \u0060Operation.Type\u0060 options are \u0060Get\u0060, \u0060GetColl\u0060, \u0060Create\u0060 or \u0060Update\u0060; otherwise, defaults to \u0060void\u0060." }, "returnTypeNullable": { "type": "boolean", "title": "Indicates whether the \u0060ReturnType\u0060 is nullable for the operation.", "description": "Will be inferred where the \u0060ReturnType\u0060 is denoted as nullable; i.e. suffixed by a \u0060?\u0060. Additionally a \u0060Type\u0060 of \u0060Get\u0060 will default to \u0060true\u0060 where not specified." }, "returnText": { "type": "string", "title": "The text for use in comments to describe the \u0060ReturnType\u0060.", "description": "A default will be created where not specified. To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. {{Xxx}}). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "privateName": { "type": "string", "title": "The overriding private name.", "description": "Overrides the \u0060Name\u0060 to be used for private usage. By default reformatted from \u0060Name\u0060; e.g. \u0060GetByArgs\u0060 as \u0060_getByArgs\u0060." }, "withResult": { "type": "boolean", "title": "Indicates whether to use \u0060CoreEx.Results\u0060 (aka Railway-oriented programming).", "description": "Defaults to \u0060Entity.WilhResult\u0060." }, "autoImplement": { "type": "string", "title": "The operation override for the \u0060Entity.AutoImplement\u0060.", "description": "Defaults to \u0060Entity.AutoImplement\u0060. The corresponding \u0060Entity.AutoImplement\u0060 must be defined for this to be enacted. Auto-implementation is applicable for all \u0060Operation.Type\u0060 options with the exception of \u0060Custom\u0060.", "enum": [ "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" ] }, "dataEntityMapper": { "type": "string", "title": "The override for the data entity \u0060Mapper\u0060.", "description": "Used where the default generated \u0060Mapper\u0060 is not applicable." }, "dataExtensions": { "type": "boolean", "title": "Indicates whether the \u0060Data\u0060 extensions logic should be generated.", "description": "Defaults to \u0060Entity.DataExtensions\u0060." }, "dataInvoker": { "type": "boolean", "title": "Indicates whether a \u0060DataInvoker\u0060 should orchestrate the \u0060Data\u0060-layer.", "description": "Where \u0060Dataransaction\u0060 or \u0060EventPublish\u0060 is \u0060Data\u0060 then orchestration will default to \u0060true\u0060." }, "dataTransaction": { "type": "boolean", "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060Data\u0060-layer.", "description": "Where using an \u0060EventOutbox\u0060 this is ignored as it is implied through its usage." }, "databaseStoredProc": { "type": "string", "title": "The database stored procedure name used where \u0060Operation.AutoImplement\u0060 is \u0060Database\u0060.", "description": "Defaults to \u0060sp\u0060 \u002B \u0060Entity.Name\u0060 \u002B \u0060Operation.Name\u0060; e.g. \u0060spPersonCreate\u0060." }, "entityFrameworkModel": { "type": "string", "title": "The corresponding Entity Framework model name (required where \u0060AutoImplement\u0060 is \u0060EntityFramework\u0060).", "description": "Overrides the \u0060Entity.EntityFrameworkModel\u0060." }, "cosmosModel": { "type": "string", "title": "The corresponding Cosmos model name (required where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060).", "description": "Overrides the \u0060Entity.CosmosModel\u0060." }, "cosmosContainerId": { "type": "string", "title": "The Cosmos \u0060ContainerId\u0060 override used where \u0060Operation.AutoImplement\u0060 is \u0060Cosmos\u0060.", "description": "Overrides the \u0060Entity.CosmosContainerId\u0060." }, "cosmosPartitionKey": { "type": "string", "title": "The C# code override to be used for setting the optional Cosmos \u0060PartitionKey\u0060 used where \u0060Operation.AutoImplement\u0060 is \u0060Cosmos\u0060.", "description": "Overrides the \u0060Entity.CosmosPartitionKey\u0060." }, "odataCollectionName": { "type": "string", "title": "The override name of the underlying OData collection where \u0060Operation.AutoImplement\u0060 is \u0060OData\u0060.", "description": "Overriddes the \u0060Entity.ODataCollectionName\u0060; otherwise, the underlying \u0060Simple.OData.Client\u0060 will attempt to infer." }, "httpAgentRoute": { "type": "string", "title": "The HTTP Agent API route where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "This is appended to the \u0060Entity.HttpAgentRoutePrefix\u0060." }, "httpAgentMethod": { "type": "string", "title": "The HTTP Agent Method for the operation.", "description": "Defaults to \u0060Operation.WebApiMethod\u0060.", "enum": [ "HttpGet", "HttpPost", "HttpPut", "HttpDelete", "HttpPatch" ] }, "httpAgentModel": { "type": "string", "title": "The corresponding HTTP Agent model name (required where \u0060AutoImplement\u0060 is \u0060HttpAgent\u0060).", "description": "This can be overridden within the \u0060Operation\u0060(s)." }, "httpAgentReturnModel": { "type": "string", "title": "The corresponding HTTP Agent model name (required where \u0060AutoImplement\u0060 is \u0060HttpAgent\u0060).", "description": "Defaults to \u0060Operation.HttpAgentModel\u0060 where the \u0060Operation.ReturnType\u0060 is equal to \u0060Entity.Name\u0060 (same type). This can be overridden within the \u0060Operation\u0060(s)." }, "httpAgentCode": { "type": "string", "title": "The fluent-style method-chaining C# HTTP Agent API code to include where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", "description": "Appended to \u0060Entity.HttpAgentCode\u0060 where specified to extend." }, "managerCustom": { "type": "boolean", "title": "Indicates whether the \u0060Manager\u0060 logic is a custom implementation; i.e. no auto-\u0060DataSvc\u0060 invocation logic is to be generated." }, "managerTransaction": { "type": "boolean", "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060Manager\u0060-layer." }, "managerExtensions": { "type": "boolean", "title": "Indicates whether the \u0060Manager\u0060 extensions logic should be generated.", "description": "Defaults to \u0060Entity.ManagerExtensions\u0060." }, "validator": { "type": "string", "title": "The name of the .NET implementing \u0060Type\u0060 or interface \u0060Type\u0060 that will perform the validation.", "description": "Defaults to the \u0060Entity.Validator\u0060 where not specified explicitly (where \u0060Operation.Type\u0060 options \u0060Create\u0060 or \u0060Update\u0060)." }, "validationFramework": { "type": "string", "title": "The \u0060Validation\u0060 framework to use for the entity-based validation.", "description": "Defaults to \u0060Entity.ValidationFramework\u0060. This can be overridden within the \u0060Parameter\u0060(s).", "enum": [ "CoreEx", "FluentValidation" ] }, "managerOperationType": { "type": "string", "title": "The \u0060ExecutionContext.OperationType\u0060 (CRUD denotation) defined at the \u0060Manager\u0060-layer.", "description": "The default will be inferred from the \u0060Operation.Type\u0060; however, where the \u0060Operation.Type\u0060 is \u0060Custom\u0060 it will default to \u0060Unspecified\u0060.", "enum": [ "Create", "Read", "Update", "Delete", "Unspecified" ] }, "managerCleanUp": { "type": "boolean", "title": "Indicates whether a \u0060Cleaner.Cleanup\u0060 is performed for the operation parameters within the Manager-layer.", "description": "This can be overridden within the \u0060CodeGeneration\u0060 and \u0060Entity\u0060." }, "dataSvcCustom": { "type": "string", "title": "The option that indicates the level of \u0060DataSvc\u0060 customization (invokes \u0060*OnImplementationAsync\u0060 method) vs code-generation (automatically invokes data-layer).", "description": "\u0060Full\u0060 indicates the logic is fully customized (only invocation is code-generated). \u0060Partial\u0060 indicates combination of surrounding code-generation with final custom invocation versus data-layer. \u0060None\u0060 indicates data-layer invocation with _no_ custom invocation (default).", "enum": [ "Full", "Partial", "None" ] }, "dataSvcTransaction": { "type": "boolean", "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060DataSvc\u0060-layer." }, "dataSvcInvoker": { "type": "boolean", "title": "Indicates whether a \u0060DataSvcInvoker\u0060 should orchestrate the \u0060DataSvc\u0060-layer.", "description": "Where \u0060DataSvcTransaction\u0060 or \u0060EventPublish\u0060 is \u0060DataSvc\u0060 then the orchestration will default to \u0060true\u0060." }, "dataSvcExtensions": { "type": "boolean", "title": "Indicates whether the \u0060DataSvc\u0060 extensions logic should be generated.", "description": "Defaults to \u0060Entity.ManagerExtensions\u0060." }, "eventPublish": { "type": "string", "title": "The layer to add logic to publish an event for a \u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060 operation.", "description": "Defaults to the \u0060Entity.EventPublish\u0060 configuration property (inherits) where not specified. Used to enable the sending of messages to the likes of EventGrid, Service Broker, SignalR, etc.", "enum": [ "None", "DataSvc", "Data" ] }, "eventValue": { "type": "string", "title": "The event value override as C# code (is used as-is).", "description": "The event value is automatically inferred where the \u0060Operation.Type\u0060 is \u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060." }, "eventSource": { "type": "string", "title": "The Event Source.", "description": "Defaults to \u0060Entity.EventSource\u0060. Note: when used in code-generation the \u0060CodeGeneration.EventSourceRoot\u0060 will be prepended where specified. To include the entity id/key include a \u0060{$key}\u0060 placeholder (\u0060Create\u0060, \u0060Update\u0060 or \u0060Delete\u0060 operation only); for example: \u0060person/{$key}\u0060. Otherwise, specify the C# string interpolation expression; for example: \u0060person/{r.Id}\u0060." }, "eventSubject": { "type": "string", "title": "The event subject template and corresponding event action pair (separated by a colon).", "description": "The event subject template defaults to \u0060{AppName}.{Entity.Name}\u0060, plus each of the unique key placeholders comma separated; e.g. \u0060Domain.Entity.{id1},{id2}\u0060 (depending on whether \u0060Entity.EventSubjectFormat\u0060 is \u0060NameAndKey\u0060 or \u0060NameOnly\u0060). The event action defaults to \u0060WebApiOperationType\u0060 or \u0060Operation.Type\u0060 where not specified. Multiple events can be raised by specifying more than one subject/action pair separated by a semicolon. E.g. \u0060Demo.Person.{id}:Create;Demo.Other.{id}:Update\u0060." }, "webApiRoute": { "type": "string", "title": "The Web API \u0060RouteAtttribute\u0060 to be appended to the \u0060Entity.WebApiRoutePrefix\u0060.", "description": "Where the value is specified with a leading \u0060!\u0060 character this indicates that the \u0060Entity.WebApiRoutePrefix\u0060 should not be used, and the value should be used as-is (with the \u0060!\u0060 removed)." }, "webApiAuthorize": { "type": "string", "title": "The authorize attribute value to be used for the corresponding entity Web API controller; generally either \u0060Authorize\u0060 or \u0060AllowAnonymous\u0060.", "description": "Where not specified no attribute output will occur; it will then inherit as supported by .NET." }, "webApiMethod": { "type": "string", "title": "The HTTP Method for the operation.", "description": "The value defaults as follows: \u0060HttpGet\u0060 for \u0060Operation.Type\u0060 value \u0060Get\u0060 or \u0060GetColl\u0060, \u0060HttpPost\u0060 for \u0060Operation.Type\u0060 value \u0060Create\u0060 or \u0060Custom\u0060, \u0060HttpPut\u0060 for \u0060Operation.Type\u0060 value \u0060Update\u0060, and \u0060HttpDelete\u0060 for \u0060Operation.Type\u0060 value \u0060Delete\u0060. An \u0060Operation.Type\u0060 value \u0060Patch\u0060 can not be specified and will always default to \u0060HttpPatch\u0060.", "enum": [ "HttpGet", "HttpPost", "HttpPut", "HttpDelete" ] }, "webApiStatus": { "type": "string", "title": "The primary HTTP Status Code that will be returned for the operation where there is a non-\u0060null\u0060 return value.", "description": "The value defaults as follows: \u0060OK\u0060 for \u0060Operation.Type\u0060 value \u0060Get\u0060, \u0060GetColl\u0060, \u0060Update\u0060, \u0060Delete\u0060 or \u0060Custom\u0060, \u0060Created\u0060 for \u0060Operation.Type\u0060 value \u0060Create\u0060.", "enum": [ "OK", "Accepted", "Created", "NoContent", "NotFound" ] }, "webApiAlternateStatus": { "type": "string", "title": "The primary HTTP Status Code that will be returned for the operation where there is a \u0060null\u0060 return value.", "description": "The value defaults as follows: \u0060NotFound\u0060 for \u0060Operation.Type\u0060 of \u0060Get\u0060, \u0060Update\u0060, \u0060Patch\u0060; \u0060NoContent\u0060 for \u0060Operation.Type\u0060 of \u0060GetColl\u0060; otherwise, \u0060none\u0060. A value of \u0060none\u0060 indicates that there is _no_ alternate status.", "enum": [ "OK", "Accepted", "Created", "NoContent", "NotFound", "none" ] }, "webApiLocation": { "type": "string", "title": "The HTTP Response Location Header route.", "description": "This uses similar formatting to the \u0060WebApiRoute\u0060. The response value is accessed using \u0060r.\u0060 notation to access underlying properties; for example \u0060{r.Id}\u0060 or \u0060person/{r.Id}\u0060. The \u0060Entity.WebApiRoutePrefix\u0060 will be prepended automatically; however, to disable set the first character to \u0060!\u0060, e.g. \u0060!person/{r.Id}\u0060. The URI can be inferred from another \u0060Operation\u0060 by using a lookup \u0060^\u0060; for example \u0060^Get\u0060 indicates to infer from the named \u0060Get\u0060 operation (where only \u0060^\u0060 is specified this is shorthand for \u0060^Get\u0060 as this is the most common value). The Location URI will ensure the first character is a \u0060/\u0060 so it acts a \u0027relative URL absolute path\u0027." }, "webApiConcurrency": { "type": "boolean", "title": "Indicates whether the Web API is responsible for managing (simulating) concurrency via auto-generated ETag.", "description": "This provides an alternative where the underlying data source does not natively support optimistic concurrency (native support should always be leveraged as a priority). Where the \u0060Operation.Type\u0060 is \u0060Update\u0060 or \u0060Patch\u0060, the request ETag will be matched against the response for a corresponding \u0060Get\u0060 operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the \u0060Get\u0060 must be the same as that returned from the corresponding \u0060Create\u0060, \u0060Update\u0060 and \u0060Patch\u0060 (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. Defaults to \u0060Entity.WebApiConcurrency\u0060." }, "webApiGetOperation": { "type": "string", "title": "The corresponding \u0060Get\u0060 method name (in the \u0060XxxManager\u0060) where the \u0060Operation.Type\u0060 is \u0060Update\u0060 and \u0060SimulateConcurrency\u0060 is \u0060true\u0060.", "description": "Defaults to \u0060Get\u0060. Specify either just the method name (e.g. \u0060OperationName\u0060) or, interface and method name (e.g. \u0060IXxxManager.OperationName\u0060) to be invoked where in a different \u0060YyyManager.OperationName\u0060." }, "webApiUpdateOperation": { "type": "string", "title": "The corresponding \u0060Update\u0060 method name (in the \u0060XxxManager\u0060) where the \u0060Operation.Type\u0060 is \u0060Patch\u0060.", "description": "Defaults to \u0060Update\u0060. Specify either just the method name (e.g. \u0060OperationName\u0060) or, interface and method name (e.g. \u0060IXxxManager.OperationName\u0060) to be invoked where in a different \u0060YyyManager.OperationName\u0060." }, "webApiProduces": { "type": "array", "title": "The value(s) for the optional \u0060[Produces()]\u0060 attribute for the operation within the Web Api Controller for the Swagger/OpenAPI documentation.", "items": { "type": "string" } }, "webApiProducesResponseType": { "type": "string", "title": "The \u0060[ProducesResponseType()]\u0060 attribute \u0060typeof\u0060 for the operation within the Web Api Controller for the Swagger/OpenAPI documentation.", "description": "Defaults to the _Common_ type. A value of \u0060None\u0060, \u0060none\u0060 or \u0060\u0060 will ensure no type is emitted." }, "webApiTags": { "type": "array", "title": "The list of tags to add for the generated \u0060WebApi\u0060 operation.", "description": "Overrides the \u0060Entity.WebApiTags\u0060; unless, if the first tag value is a \u0060^\u0060 then this indicates that the \u0060Entity.WebApiTags\u0060 are to be included (inherited) as a replacement. Otherwise, defaults to \u0060Entity.WebApiTags\u0060.", "items": { "type": "string" } }, "authPermission": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsAuthorized(AuthPermission)\u0060 to determine whether the user is authorized." }, "authEntity": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)\u0060 to determine whether the user is authorized. Defaults to \u0060Entity.AuthEntity\u0060. Both the \u0060AuthEntity\u0060 and \u0060AuthAction\u0060 are required for code-generation." }, "authAction": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)\u0060 to determine whether the user is authorized. Both the \u0060AuthEntity\u0060 and \u0060AuthAction\u0060 are required for code-generation." }, "authRole": { "type": "string", "title": "The permission used by the \u0060ExecutionContext.UserIsInRole(AuthRole)\u0060 to determine whether the user is authorized." }, "excludeAll": { "type": "boolean", "title": "Indicates whether to exclude the generation of all \u0060Operation\u0060 related output.", "description": "Is a shorthand means for setting all of the other \u0060Exclude*\u0060 properties to \u0060true\u0060." }, "excludeIData": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060Data\u0060 interface (\u0060IXxxData.cs\u0060) output." }, "excludeData": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060Data\u0060 class (\u0060XxxData.cs\u0060) output." }, "excludeIDataSvc": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060DataSvc\u0060 interface (\u0060IXxxDataSvc.cs\u0060) output." }, "excludeDataSvc": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060DataSvc\u0060 class (\u0060XxxDataSvc.cs\u0060) output." }, "excludeIManager": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060Manager\u0060 interface (\u0060IXxxManager.cs\u0060) output." }, "excludeManager": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the \u0060Manager\u0060 class (\u0060XxxManager.cs\u0060) output." }, "excludeWebApi": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the WebAPI \u0060Controller\u0060 class (\u0060XxxController.cs\u0060) output." }, "excludeWebApiAgent": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the WebAPI consuming \u0060Agent\u0060 class (\u0060XxxAgent.cs\u0060) output." }, "excludeGrpcAgent": { "type": "boolean", "title": "Indicates whether to exclude the generation of the operation within the gRPC consuming \u0060Agent\u0060 class (\u0060XxxAgent.cs\u0060) output." }, "grpc": { "type": "boolean", "title": "Indicates whether gRPC support (more specifically service-side) is required for the Operation.", "description": "gRPC support is an explicit opt-in model (see \u0060CodeGeneration.Grpc\u0060 configuration); therefore, each corresponding \u0060Entity\u0060, \u0060Property\u0060 and \u0060Operation\u0060 will also need to be opted-in specifically." }, "parameters": { "type": "array", "title": "The corresponding \u0060Parameter\u0060 collection.", "items": { "$ref": "#/definitions/Parameter" } } }, "required": [ "name" ] }, "Parameter": { "type": "object", "title": "\u0027Parameter\u0027 object (entity-driven)", "description": "The \u0060Parameter\u0060 object defines an \u0060Operation\u0060 parameter and its charateristics.", "properties": { "name": { "type": "string", "title": "The unique parameter name." }, "text": { "type": "string", "title": "The overriding text for use in comments.", "description": "By default the \u0060Text\u0060 will be the \u0060Name\u0060 reformatted as sentence casing. To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "type": { "type": "string", "title": "The .NET \u0060Type\u0060.", "description": "Defaults to \u0060string\u0060. To reference a Reference Data \u0060Type\u0060 always prefix with \u0060RefDataNamespace\u0060 (e.g. \u0060RefDataNamespace.Gender\u0060) or shortcut \u0060^\u0060 (e.g. \u0060^Gender\u0060). This will ensure that the appropriate Reference Data \u0060using\u0060 statement is used. _Shortcut:_ Where the \u0060Type\u0060 starts with (prefix) \u0060RefDataNamespace.\u0060 or \u0060^\u0060, and the correspondong \u0060RefDataType\u0060 attribute is not specified it will automatically default the \u0060RefDataType\u0060 to \u0060string.\u0060" }, "nullable": { "type": "boolean", "title": "Indicates whether the .NET Type should be declared as nullable; e.g. \u0060int?\u0060. Will be inferred where the \u0060Type\u0060 is denoted as nullable; i.e. suffixed by a \u0060?\u0060. Where the .NET Type is not considered as an intrinsic type then will default to \u0060true\u0060." }, "default": { "type": "string", "title": "The C# code to default the value.", "description": "Where the \u0060Type\u0060 is \u0060string\u0060 then the specified default value will need to be delimited. Any valid value assignment C# code can be used." }, "privateName": { "type": "string", "title": "The overriding private name.", "description": "Overrides the \u0060Name\u0060 to be used for private fields. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060_firstName\u0060." }, "argumentName": { "type": "string", "title": "The overriding argument name.", "description": "Overrides the \u0060Name\u0060 to be used for argument parameters. By default reformatted from \u0060Name\u0060; e.g. \u0060FirstName\u0060 as \u0060firstName\u0060." }, "property": { "type": "string", "title": "The \u0060Property.Name\u0060 within the parent \u0060Entity\u0060 to copy (set) the configuration/characteristics from where not already defined." }, "refDataType": { "type": "string", "title": "The underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID).", "description": "Defaults to \u0060string\u0060 where not specified and the corresponding \u0060Type\u0060 starts with (prefix) \u0060RefDataNamespace.\u0060.", "enum": [ "string", "int", "Guid" ] }, "refDataList": { "type": "boolean", "title": "Indicates that the Reference Data property is to be a serializable list (\u0060ReferenceDataSidList\u0060).", "description": "This is required to enable a list of Reference Data values (as per \u0060RefDataType\u0060) to be passed as an argument for example." }, "validator": { "type": "string", "title": "The name of the .NET \u0060Type\u0060 that will perform the validation." }, "validatorCode": { "type": "string", "title": "The fluent-style method-chaining C# validator code to append to \u0060IsMandatory\u0060 and \u0060Validator\u0060 (where specified)." }, "validationFramework": { "type": "string", "title": "The \u0060Validation\u0060 framework to use for the entity-based validation.", "description": "Defaults to \u0060Operation.ValidationFramework\u0060.", "enum": [ "CoreEx", "FluentValidation" ] }, "isMandatory": { "type": "boolean", "title": "Indicates whether a \u0060ValidationException\u0060 should be thrown when the parameter value has its default value (null, zero, etc)." }, "layerPassing": { "type": "string", "title": "The option that determines the layers in which the parameter is passed.", "description": "Defaults to \u0060All\u0060. To further describe, \u0060All\u0060 passes the parameter through all layeys, \u0060ToManagerSet\u0060 only passes the parameter to the \u0060Manager\u0060 layer and overrides the same named property within the corresponding \u0060value\u0060 parameter, \u0060ToManagerCollSet\u0060 only passes the parameter to the \u0060Manager\u0060 layer and overrides the same named property within the corresponding \u0060value\u0060 collection parameter. Where using the \u0060PrimaryKey\u0060 option to automatically set \u0060Parameters\u0060, and the \u0060Operation.Type\u0060 is \u0060Create\u0060 or \u0060Update\u0060 it will default to \u0060ToManagerSet\u0060.", "enum": [ "All", "ToManagerSet", "ToManagerCollSet" ] }, "dataConverter": { "type": "string", "title": "The data \u0060Converter\u0060 class name where specific data conversion is required.", "description": "A \u0060Converter\u0060 is used to convert a data source value to/from a .NET \u0060Type\u0060 where no standard data conversion can be applied. Where this value is suffixed by \u0060\u003CT\u003E\u0060 or \u0060{T}\u0060 this will automatically set \u0060Type\u0060." }, "webApiFrom": { "type": "string", "title": "The option for how the parameter will be delcared within the Web API Controller.", "description": "Defaults to \u0060FromQuery\u0060; unless the parameter \u0060Type\u0060 has also been defined as an \u0060Entity\u0060 within the code-gen config file then it will default to \u0060FromEntityProperties\u0060. Specifies that the parameter will be declared with corresponding \u0060FromQueryAttribute\u0060, \u0060FromBodyAttribute\u0060 or \u0060FromRouteAttribute\u0060 for the Web API method. The \u0060FromEntityProperties\u0060 will declare all properties of the \u0060Entity\u0060 as query parameters.An \u0060AcceptsBody\u0060 indicates that the _value_ will be passed in the HTTP Request Body and be handled (JSON deserialized) as a \u0060CoreEx.AspNetCore.WebApis.WebWebApiParam\u0060 (default behavior for a \u0060Create\u0060 or \u0060Update\u0060 operation type).", "enum": [ "FromQuery", "FromBody", "FromRoute", "FromEntityProperties", "AcceptsBody" ] }, "webApiText": { "type": "string", "title": "The overriding text for use in the Web API comments.", "description": "By default the \u0060WbeApiText\u0060 will be the \u0060Name\u0060 reformatted as sentence casing. To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." }, "grpcType": { "type": "string", "title": "The underlying gRPC data type; will be inferred where not specified." } }, "required": [ "name" ] }, "Const": { "type": "object", "title": "\u0027Const\u0027 object (entity-driven)", "description": "The \u0060Const\u0060 object is used to define a .NET (C#) constant value for an \u0060Entity\u0060.", "properties": { "name": { "type": "string", "title": "The unique constant name." }, "value": { "type": "string", "title": "The .NET (C#) code for the constant value.", "description": "The code generation will ensure the value is delimited properly to output correctly formed (delimited) .NET (C#) code." }, "text": { "type": "string", "title": "The overriding text for use in comments.", "description": "By default the \u0060Text\u0060 will be the \u0060Name\u0060 reformatted as sentence casing. It will be formatted as: \u0060Represents a {text} constant value.\u0060 To create a \u0060\u003Csee cref=\u0022XXX\u0022/\u003E\u0060 within use moustache shorthand (e.g. \u0060{{Xxx}}\u0060). To have the text used as-is prefix with a \u0060\u002B\u0060 plus-sign character." } }, "required": [ "name", "value" ] } }, "allOf": [ { "$ref": "#/definitions/CodeGeneration" } ] }