diff --git a/CHANGELOG.md b/CHANGELOG.md index 80513c268..1febda911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Represents the **NuGet** versions. +## v5.8.0 +- *Fixed:* Upgraded `CoreEx` (`v3.8.0`) to include all related fixes and improvements; `WebApi` class supports returning value of `IActionResult` as-is. +- *Enhancement:* Updated code-generation to support `IActionResult` return type for `WebApi` operations. The following `operation` YAML properties enable: + - New `webApiProduces: [ 'text/plain' ]` where the value is a `Produces` content type array (supports multiple) to override the default; for example `[Produces("text/plain")]`. + - New `webApiProducesResponseType: none` indicates that the resulting generated code does _not_ include the response type; for example `[ProducesResponseType((int)HttpStatusCode.OK)]`. + ## v5.7.4 - *Fixed:* Upgraded `CoreEx` (`v3.7.2`) to include all related fixes and improvements; updated reference data code-generation template and samples as a result. diff --git a/Common.targets b/Common.targets index 0a5a321e4..da632cde9 100644 --- a/Common.targets +++ b/Common.targets @@ -1,6 +1,6 @@ - 5.7.4 + 5.8.0 preview Avanade Avanade diff --git a/docs/Entity-Operation-Config.md b/docs/Entity-Operation-Config.md index 767500a04..9f146b5a0 100644 --- a/docs/Entity-Operation-Config.md +++ b/docs/Entity-Operation-Config.md @@ -66,7 +66,7 @@ Property | Description **`name`** | The unique operation name. [Mandatory] **`type`** | The type of operation that is to be code-generated. Valid options are: `Get`, `GetColl`, `Create`, `Update`, `Patch`, `Delete`, `Custom`.
† Defaults to `Custom`. `text` | The text for use in comments.
† The `Text` will be defaulted for all the `Operation.Type` options with the exception of `Custom`. To create a `` within use moustache shorthand (e.g. {{Xxx}}). -**`primaryKey`** | Indicates whether the properties marked as a primary key (`Property.PrimaryKey`) are to be used as the parameters.
† This simplifies the specification of these properties versus having to declare each specifically. +**`primaryKey`** | Indicates whether the properties marked as a primary key (`Property.PrimaryKey`) are to be used as the parameters.
† 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`** | Indicates whether a `PagingArgs` argument is to be added to the operation to enable (standardized) paging related logic. `valueType` | The .NET value parameter `Type` for the operation.
† Defaults to the parent `Entity.Name` where the `Operation.Type` options are `Create` or `Update`. `returnType` | The .NET return `Type` for the operation.
† Defaults to the parent `Entity.Name` where the `Operation.Type` options are `Get`, `GetColl`, `Create` or `Update`; otherwise, defaults to `void`. @@ -112,6 +112,8 @@ Property | Description `webApiConcurrency` | Indicates whether the Web API is responsible for managing (simulating) concurrency via auto-generated ETag.
† 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 `Operation.Type` is `Update` or `Patch`, the request ETag will be matched against the response for a corresponding `Get` operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the `Get` must be the same as that returned from the corresponding `Create`, `Update` and `Patch` (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. Defaults to `Entity.WebApiConcurrency`. `webApiGetOperation` | The corresponding `Get` method name (in the `XxxManager`) where the `Operation.Type` is `Update` and `SimulateConcurrency` is `true`.
† Defaults to `Get`. Specify either just the method name (e.g. `OperationName`) or, interface and method name (e.g. `IXxxManager.OperationName`) to be invoked where in a different `YyyManager.OperationName`. `webApiUpdateOperation` | The corresponding `Update` method name (in the `XxxManager`) where the `Operation.Type` is `Patch`.
† Defaults to `Update`. Specify either just the method name (e.g. `OperationName`) or, interface and method name (e.g. `IXxxManager.OperationName`) to be invoked where in a different `YyyManager.OperationName`. +`webApiProduces` | The value(s) for the optional `[Produces()]` attribute for the operation within the Web Api Controller for the Swagger/OpenAPI documentation. +`webApiProducesResponseType` | The `[ProducesResponseType()]` attribute `typeof` for the operation within the Web Api Controller for the Swagger/OpenAPI documentation.
† Defaults to the _Common_ type. A value of `None`, `none` or `` will ensure no type is emitted.
diff --git a/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj b/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj index d43b75c2b..598f508a4 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj @@ -5,7 +5,7 @@ true
- + diff --git a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs index 2cb3d651f..ad46fa9da 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs @@ -61,4 +61,16 @@ public Task GetDetail(string? accountId) [ProducesResponseType((int)HttpStatusCode.NotFound)] public Task GetBalance(string? accountId) => _webApi.GetWithResultAsync(Request, p => _manager.GetBalanceAsync(accountId)); + + /// + /// Get statement (file). + /// + /// The identifier. + /// A resultant . + [HttpGet("api/v1/banking/accounts/{accountId}/statement")] + [Produces("text/plain")] + [ProducesResponseType((int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.NoContent)] + public Task GetStatement(string? accountId) + => _webApi.GetWithResultAsync(Request, p => _manager.GetStatementAsync(accountId), alternateStatusCode: HttpStatusCode.NoContent, operationType: CoreEx.OperationType.Unspecified); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj b/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj index 3a80bceb3..88044314a 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj @@ -11,7 +11,8 @@ - - + + +
\ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Data/AccountData.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Data/AccountData.cs index e1f451eed..506e41c16 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Data/AccountData.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Data/AccountData.cs @@ -1,4 +1,5 @@ using Microsoft.Azure.Cosmos.Linq; +using System.Text; namespace Cdr.Banking.Business.Data; @@ -48,4 +49,11 @@ partial void AccountDataCtor() return bal.Adjust(b => b.Id = a.Id); }); } + + /// + /// Gets the statement (file) for the specified account. + /// + private Task> GetStatementOnImplementationAsync(string? accountId) + => Result.GoAsync(GetDetailAsync(accountId)) + .WhenAs(d => d is not null, d => new FileContentResult(Encoding.UTF8.GetBytes($"Statement for Account '{d.AccountNumber}'."), "text/plain") { FileDownloadName = $"{accountId}.statement.txt" }); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/AccountData.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/AccountData.cs index 6719ffa5c..90082d3aa 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/AccountData.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/AccountData.cs @@ -32,6 +32,9 @@ public Task> GetAccountsAsync(AccountArgs? args, /// public Task> GetBalanceAsync(string? accountId) => GetBalanceOnImplementationAsync(accountId); + /// + public Task> GetStatementAsync(string? accountId) => GetStatementOnImplementationAsync(accountId); + /// /// Provides the to Entity Framework mapping. /// diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/IAccountData.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/IAccountData.cs index e4f6be0fe..ce3659667 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/IAccountData.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Data/Generated/IAccountData.cs @@ -30,4 +30,11 @@ public partial interface IAccountData /// The identifier. /// The selected where found. Task> GetBalanceAsync(string? accountId); + + /// + /// Get statement (file). + /// + /// The identifier. + /// A resultant . + Task> GetStatementAsync(string? accountId); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/AccountDataSvc.cs b/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/AccountDataSvc.cs index 459975b0a..e0849326e 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/AccountDataSvc.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/AccountDataSvc.cs @@ -30,4 +30,7 @@ public AccountDataSvc(IAccountData data, IRequestCache cache) /// public Task> GetBalanceAsync(string? accountId) => Result.Go().CacheGetOrAddAsync(_cache, accountId, () => _data.GetBalanceAsync(accountId)); + + /// + public Task> GetStatementAsync(string? accountId) => _data.GetStatementAsync(accountId); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/IAccountDataSvc.cs b/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/IAccountDataSvc.cs index 10d3061f2..ccd38dd53 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/IAccountDataSvc.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/DataSvc/Generated/IAccountDataSvc.cs @@ -30,4 +30,11 @@ public partial interface IAccountDataSvc /// The identifier. /// The selected where found. Task> GetBalanceAsync(string? accountId); + + /// + /// Get statement (file). + /// + /// The identifier. + /// A resultant . + Task> GetStatementAsync(string? accountId); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/AccountManager.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/AccountManager.cs index 8c28976fa..5781a3323 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/AccountManager.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/AccountManager.cs @@ -41,4 +41,11 @@ public Task> GetAccountsAsync(AccountArgs? args, return Result.Go().Requires(accountId) .ThenAsAsync(() => _dataService.GetBalanceAsync(accountId)); }, InvokerArgs.Read); + + /// + public Task> GetStatementAsync(string? accountId) => ManagerInvoker.Current.InvokeAsync(this, (_, ct) => + { + return Result.Go().Requires(accountId) + .ThenAsAsync(() => _dataService.GetStatementAsync(accountId)); + }, InvokerArgs.Unspecified); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/IAccountManager.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/IAccountManager.cs index 50da81001..432e4a8aa 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/IAccountManager.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/IAccountManager.cs @@ -30,4 +30,11 @@ public partial interface IAccountManager /// The identifier. /// The selected where found. Task> GetBalanceAsync(string? accountId); + + /// + /// Get statement (file). + /// + /// The identifier. + /// A resultant . + Task> GetStatementAsync(string? accountId); } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/GlobalUsings.cs b/samples/Cdr.Banking/Cdr.Banking.Business/GlobalUsings.cs index bf6d663f8..a1ea938b1 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/GlobalUsings.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Business/GlobalUsings.cs @@ -15,6 +15,7 @@ global using CoreEx.Results; global using CoreEx.Validation; global using CoreEx.Validation.Rules; +global using Microsoft.AspNetCore.Mvc; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.Logging; global using System; diff --git a/samples/Cdr.Banking/Cdr.Banking.CodeGen/entity.beef-5.yaml b/samples/Cdr.Banking/Cdr.Banking.CodeGen/entity.beef-5.yaml index 9bc6d86cf..8254bcbeb 100644 --- a/samples/Cdr.Banking/Cdr.Banking.CodeGen/entity.beef-5.yaml +++ b/samples/Cdr.Banking/Cdr.Banking.CodeGen/entity.beef-5.yaml @@ -52,7 +52,15 @@ entities: # Route requires accountId; e.g. api/v1/banking/accounts/{accountId}/balance # Data access logic cannot be auto-implemented. # - { name: GetBalance, text: 'Get {{Account}} {{Balance}}', type: Get, returnType: Balance, webApiRoute: '{accountId}/balance', primaryKey: true, autoImplement: None } + { name: GetBalance, text: 'Get {{Account}} {{Balance}}', type: Get, returnType: Balance, webApiRoute: '{accountId}/balance', primaryKey: true, autoImplement: None }, + # Operation to get an Account statement _file_. + # Operation is 'Custom' to specifically override and manually implement data. + # ReturnType of FileContentResult (standard ASP.NET) is an IActionResult which will be returned as-is. + # PrimaryKey="true" indicates that all properties marked as PrimaryKey are to be used for parameters (avoids having to explicitly define again). + # WebApiProducesResponseType="none" indicates that the [ProducesResponseType()] attribute should not include the response type (also ensures that the Agent code does not include response type). + # WebApiProduces enables specification of the [Produces()] attribute and corresponding value(s) array. + # + { name: GetStatement, text: 'Get {{Account}} statement (file)', type: Custom, primaryKey: true, returnType: FileContentResult?, webApiMethod: HttpGet, webApiRoute: '{accountId}/statement', webApiProducesResponseType: none, webApiProduces: [ text/plain ] } ] } diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/AccountAgent.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/AccountAgent.cs index 4acafcee7..cadf40ce2 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/AccountAgent.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/AccountAgent.cs @@ -44,5 +44,9 @@ public Task> GetAccountsAsync(AccountArgs? a /// public Task> GetBalanceAsync(string? accountId, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => GetAsync("api/v1/banking/accounts/{accountId}/balance", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("accountId", accountId)), cancellationToken: cancellationToken); + + /// + public Task GetStatementAsync(string? accountId, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/banking/accounts/{accountId}/statement", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("accountId", accountId)), cancellationToken: cancellationToken); } } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/IAccountAgent.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/IAccountAgent.cs index b62494753..51de7378e 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/IAccountAgent.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/IAccountAgent.cs @@ -49,5 +49,14 @@ public partial interface IAccountAgent /// The . /// A . Task> GetBalanceAsync(string? accountId, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default); + + /// + /// Get statement (file). + /// + /// The identifier. + /// The optional . + /// The . + /// A . + Task GetStatementAsync(string? accountId, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/ReferenceDataAgent.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/ReferenceDataAgent.cs index 9b318159f..7c6f53f8b 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/ReferenceDataAgent.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Common/Agents/Generated/ReferenceDataAgent.cs @@ -35,28 +35,28 @@ public ReferenceDataAgent(HttpClient client, IJsonSerializer jsonSerializer, Cor : base(client, jsonSerializer, executionContext, settings, logger) { } /// - public Task> OpenStatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/openstatuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> OpenStatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/openstatuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> ProductCategoryGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/productcategories", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> ProductCategoryGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/productcategories", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> AccountUTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/accountutypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> AccountUTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/accountutypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> MaturityInstructionsGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/maturityinstructions", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> MaturityInstructionsGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/maturityinstructions", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> TransactionTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/transactiontypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> TransactionTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/transactiontypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> TransactionStatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/ref/transactionstatuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> TransactionStatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/ref/transactionstatuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// public Task GetNamedAsync(string[] names, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj b/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj index 8b6557231..fbd519485 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Test/AccountTest.cs b/samples/Cdr.Banking/Cdr.Banking.Test/AccountTest.cs index 302320bab..81cfa9d3c 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Test/AccountTest.cs +++ b/samples/Cdr.Banking/Cdr.Banking.Test/AccountTest.cs @@ -259,5 +259,20 @@ public void D140_GetBalance_NoAuth() } #endregion + + #region GetStatement + + [Test] + public void E110_GetStatement_Found() + { + Agent() + .WithUser("jenny") + .Run(a => a.GetStatementAsync("23456789")) + .AssertOK() + .AssertContentTypePlainText() + .AssertContent("Statement for Account '23456789'."); + } + + #endregion } } \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj b/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj index aad6e9978..cda0f70da 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj @@ -35,7 +35,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj b/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj index 3e3000b60..e05c47817 100644 --- a/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj +++ b/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs index 60fcef397..04590426d 100644 --- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs +++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs @@ -365,6 +365,18 @@ public Task DeleteWithEf(Guid id) [ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)] public Task PatchWithEf(Guid id) => _webApi.PatchAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id)); + + /// + /// Get Documentation. + /// + /// The identifier. + /// A resultant . + [HttpGet("api/v1/persons/{id}/documentation")] + [Produces("text/plain")] + [ProducesResponseType((int)HttpStatusCode.OK)] + [ProducesResponseType((int)HttpStatusCode.NoContent)] + public Task GetDocumentation(Guid id) + => _webApi.GetAsync(Request, p => _manager.GetDocumentationAsync(id), alternateStatusCode: HttpStatusCode.NoContent, operationType: CoreEx.OperationType.Unspecified); } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj index 1d0672442..789f97029 100644 --- a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj +++ b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj @@ -15,13 +15,14 @@ - - - - - - - + + + + + + + + diff --git a/samples/Demo/Beef.Demo.Business/Data/Generated/IPersonData.cs b/samples/Demo/Beef.Demo.Business/Data/Generated/IPersonData.cs index c8fd54e4a..1978724ec 100644 --- a/samples/Demo/Beef.Demo.Business/Data/Generated/IPersonData.cs +++ b/samples/Demo/Beef.Demo.Business/Data/Generated/IPersonData.cs @@ -176,6 +176,13 @@ public partial interface IPersonData /// /// The identifier. Task DeleteWithEfAsync(Guid id); + + /// + /// Get Documentation. + /// + /// The identifier. + /// A resultant . + Task GetDocumentationAsync(Guid id); } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/Data/Generated/PersonData.cs b/samples/Demo/Beef.Demo.Business/Data/Generated/PersonData.cs index 2bcdb7dd9..b1e0ff890 100644 --- a/samples/Demo/Beef.Demo.Business/Data/Generated/PersonData.cs +++ b/samples/Demo/Beef.Demo.Business/Data/Generated/PersonData.cs @@ -218,6 +218,9 @@ public Task DeleteWithEfAsync(Guid id) => DataInvoker.Current.InvokeAsync(this, await Invoker.InvokeAsync(_deleteWithEfOnAfterAsync?.Invoke(id)).ConfigureAwait(false); }, new InvokerArgs { ExceptionHandler = _deleteWithEfOnException }); + /// + public Task GetDocumentationAsync(Guid id) => GetDocumentationOnImplementationAsync(id); + /// /// Provides the property and database column mapping. /// diff --git a/samples/Demo/Beef.Demo.Business/Data/PersonData.cs b/samples/Demo/Beef.Demo.Business/Data/PersonData.cs index 7753b7bc3..694ac8bd4 100644 --- a/samples/Demo/Beef.Demo.Business/Data/PersonData.cs +++ b/samples/Demo/Beef.Demo.Business/Data/PersonData.cs @@ -1,4 +1,6 @@ -namespace Beef.Demo.Business.Data +using System.Text; + +namespace Beef.Demo.Business.Data { public partial class PersonData { @@ -145,5 +147,10 @@ await _db.StoredProcedure("[Demo].[spPersonUpdateDetail]") // d2s.ForMember(s => s.Address, o => o.MapFrom(d => d)); // } //} + + private static Task GetDocumentationOnImplementationAsync(Guid id) + { + return Task.FromResult(new FileContentResult(Encoding.ASCII.GetBytes($"Documentation for '{id}'."), "text/plain")); + } } } \ No newline at end of file diff --git a/samples/Demo/Beef.Demo.Business/DataSvc/Generated/IPersonDataSvc.cs b/samples/Demo/Beef.Demo.Business/DataSvc/Generated/IPersonDataSvc.cs index cf8497e3b..01d108691 100644 --- a/samples/Demo/Beef.Demo.Business/DataSvc/Generated/IPersonDataSvc.cs +++ b/samples/Demo/Beef.Demo.Business/DataSvc/Generated/IPersonDataSvc.cs @@ -195,6 +195,13 @@ public partial interface IPersonDataSvc /// /// The identifier. Task DeleteWithEfAsync(Guid id); + + /// + /// Get Documentation. + /// + /// The identifier. + /// A resultant . + Task GetDocumentationAsync(Guid id); } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/DataSvc/Generated/PersonDataSvc.cs b/samples/Demo/Beef.Demo.Business/DataSvc/Generated/PersonDataSvc.cs index c9357b64f..8a23c7b91 100644 --- a/samples/Demo/Beef.Demo.Business/DataSvc/Generated/PersonDataSvc.cs +++ b/samples/Demo/Beef.Demo.Business/DataSvc/Generated/PersonDataSvc.cs @@ -40,6 +40,7 @@ public partial class PersonDataSvc : IPersonDataSvc private Func? _createWithEfOnAfterAsync; private Func? _updateWithEfOnAfterAsync; private Func? _deleteWithEfOnAfterAsync; + private Func? _getDocumentationOnAfterAsync; #endregion @@ -269,6 +270,14 @@ public Task DeleteWithEfAsync(Guid id) => DataSvcInvoker.Current.InvokeAsync(thi await Invoker.InvokeAsync(_deleteWithEfOnAfterAsync?.Invoke(id)).ConfigureAwait(false); _events.PublishValueEvent(new Person { Id = id }, new Uri($"/person/{id}", UriKind.Relative), $"Demo.Person.{id}", "Delete"); }, new InvokerArgs { IncludeTransactionScope = true, EventPublisher = _events }); + + /// + public async Task GetDocumentationAsync(Guid id) + { + var r = await _data.GetDocumentationAsync(id).ConfigureAwait(false); + await Invoker.InvokeAsync(_getDocumentationOnAfterAsync?.Invoke(r, id)).ConfigureAwait(false); + return r; + } } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/Generated/ContactManager.cs b/samples/Demo/Beef.Demo.Business/Generated/ContactManager.cs index 0776c3cee..0f5eecb2b 100644 --- a/samples/Demo/Beef.Demo.Business/Generated/ContactManager.cs +++ b/samples/Demo/Beef.Demo.Business/Generated/ContactManager.cs @@ -47,7 +47,11 @@ public Task CreateAsync(Contact value) => ManagerInvoker.Current.Invoke public Task UpdateAsync(Contact value, Guid id) => ManagerInvoker.Current.InvokeAsync(this, async (_, ct) => { value.Required().Id = id; - await value.Validate().Entity().With().ValidateAsync(true).ConfigureAwait(false); + await MultiValidator.Create() + .Add(id.Validate().Mandatory()) + .Add(value.Validate().Mandatory().Entity().With()) + .ValidateAsync(true).ConfigureAwait(false); + return await _dataService.UpdateAsync(value).ConfigureAwait(false); }, InvokerArgs.Update); diff --git a/samples/Demo/Beef.Demo.Business/Generated/IPersonManager.cs b/samples/Demo/Beef.Demo.Business/Generated/IPersonManager.cs index 0cbc2b853..47954ac3e 100644 --- a/samples/Demo/Beef.Demo.Business/Generated/IPersonManager.cs +++ b/samples/Demo/Beef.Demo.Business/Generated/IPersonManager.cs @@ -211,6 +211,13 @@ public partial interface IPersonManager /// /// The identifier. Task DeleteWithEfAsync(Guid id); + + /// + /// Get Documentation. + /// + /// The identifier. + /// A resultant . + Task GetDocumentationAsync(Guid id); } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/Generated/PersonManager.cs b/samples/Demo/Beef.Demo.Business/Generated/PersonManager.cs index c410ea64b..0c1c14173 100644 --- a/samples/Demo/Beef.Demo.Business/Generated/PersonManager.cs +++ b/samples/Demo/Beef.Demo.Business/Generated/PersonManager.cs @@ -147,6 +147,11 @@ public partial class PersonManager : IPersonManager private Func? _deleteWithEfOnBeforeAsync; private Func? _deleteWithEfOnAfterAsync; + private Func? _getDocumentationOnPreValidateAsync; + private Action? _getDocumentationOnValidate; + private Func? _getDocumentationOnBeforeAsync; + private Func? _getDocumentationOnAfterAsync; + #endregion /// @@ -225,6 +230,7 @@ public Task UpdateAsync(Person value, Guid id) => ManagerInvoker.Current Cleaner.CleanUp(value); await Invoker.InvokeAsync(_updateOnPreValidateAsync?.Invoke(value, id)).ConfigureAwait(false); await MultiValidator.Create() + .Add(id.Validate().Mandatory()) .Add(value.Validate().Mandatory().Entity().With()) .Additional(mv => _updateOnValidate?.Invoke(mv, value, id)) .ValidateAsync(true).ConfigureAwait(false); @@ -242,6 +248,7 @@ public Task UpdateWithRollbackAsync(Person value, Guid id) => ManagerInv Cleaner.CleanUp(value); await Invoker.InvokeAsync(_updateWithRollbackOnPreValidateAsync?.Invoke(value, id)).ConfigureAwait(false); await MultiValidator.Create() + .Add(id.Validate().Mandatory()) .Add(value.Validate().Mandatory().Entity().With()) .Additional(mv => _updateWithRollbackOnValidate?.Invoke(mv, value, id)) .ValidateAsync(true).ConfigureAwait(false); @@ -394,6 +401,7 @@ public Task UpdateDetailAsync(PersonDetail value, Guid id) => Mana Cleaner.CleanUp(value); await Invoker.InvokeAsync(_updateDetailOnPreValidateAsync?.Invoke(value, id)).ConfigureAwait(false); await MultiValidator.Create() + .Add(id.Validate().Mandatory()) .Add(value.Validate().Mandatory().Entity().With()) .Additional(mv => _updateDetailOnValidate?.Invoke(mv, value, id)) .ValidateAsync(true).ConfigureAwait(false); @@ -496,6 +504,7 @@ await MultiValidator.Create() Cleaner.CleanUp(id); await Invoker.InvokeAsync(_invokeApiViaAgentOnPreValidateAsync?.Invoke(id)).ConfigureAwait(false); await MultiValidator.Create() + .Add(id.Validate().Mandatory()) .Additional(mv => _invokeApiViaAgentOnValidate?.Invoke(mv, id)) .ValidateAsync(true).ConfigureAwait(false); @@ -560,6 +569,7 @@ public Task UpdateWithEfAsync(Person value, Guid id) => ManagerInvoker.C Cleaner.CleanUp(value); await Invoker.InvokeAsync(_updateWithEfOnPreValidateAsync?.Invoke(value, id)).ConfigureAwait(false); await MultiValidator.Create() + .Add(id.Validate().Mandatory()) .Add(value.Validate().Mandatory().Entity().With()) .Additional(mv => _updateWithEfOnValidate?.Invoke(mv, value, id)) .ValidateAsync(true).ConfigureAwait(false); @@ -584,6 +594,22 @@ await MultiValidator.Create() await _dataService.DeleteWithEfAsync(id).ConfigureAwait(false); await Invoker.InvokeAsync(_deleteWithEfOnAfterAsync?.Invoke(id)).ConfigureAwait(false); }, InvokerArgs.Delete); + + /// + public Task GetDocumentationAsync(Guid id) => ManagerInvoker.Current.InvokeAsync(this, async (_, ct) => + { + Cleaner.CleanUp(id); + await Invoker.InvokeAsync(_getDocumentationOnPreValidateAsync?.Invoke(id)).ConfigureAwait(false); + await MultiValidator.Create() + .Add(id.Validate().Mandatory()) + .Additional(mv => _getDocumentationOnValidate?.Invoke(mv, id)) + .ValidateAsync(true).ConfigureAwait(false); + + await Invoker.InvokeAsync(_getDocumentationOnBeforeAsync?.Invoke(id)).ConfigureAwait(false); + var r = await _dataService.GetDocumentationAsync(id).ConfigureAwait(false); + await Invoker.InvokeAsync(_getDocumentationOnAfterAsync?.Invoke(r, id)).ConfigureAwait(false); + return Cleaner.Clean(r); + }, InvokerArgs.Unspecified); } #pragma warning restore diff --git a/samples/Demo/Beef.Demo.Business/Generated/RobotManager.cs b/samples/Demo/Beef.Demo.Business/Generated/RobotManager.cs index 8c28e8701..179c4d2fa 100644 --- a/samples/Demo/Beef.Demo.Business/Generated/RobotManager.cs +++ b/samples/Demo/Beef.Demo.Business/Generated/RobotManager.cs @@ -74,7 +74,7 @@ public Task> GetByArgsAsync(RobotArgs? args, Pagin /// public Task RaisePowerSourceChangeAsync(Guid id, RefDataNamespace.PowerSource? powerSource) => ManagerInvoker.Current.InvokeAsync(this, (_, ct) => { - return Result.Go() + return Result.Go().Requires(id) .ThenAsync(() => RaisePowerSourceChangeOnImplementationAsync(id, powerSource)); }, InvokerArgs.Unspecified); } diff --git a/samples/Demo/Beef.Demo.Business/GlobalUsings.cs b/samples/Demo/Beef.Demo.Business/GlobalUsings.cs index 16be7a988..5b4e9812e 100644 --- a/samples/Demo/Beef.Demo.Business/GlobalUsings.cs +++ b/samples/Demo/Beef.Demo.Business/GlobalUsings.cs @@ -21,6 +21,7 @@ global using CoreEx.Results; global using CoreEx.Validation; global using CoreEx.Validation.Rules; +global using Microsoft.AspNetCore.Mvc; global using Microsoft.Data.SqlClient; global using Microsoft.EntityFrameworkCore; global using Microsoft.Extensions.Configuration; diff --git a/samples/Demo/Beef.Demo.CodeGen/Config/TestConfigEditor.cs b/samples/Demo/Beef.Demo.CodeGen/Config/TestConfigEditor.cs index f226faecf..75d85e44d 100644 --- a/samples/Demo/Beef.Demo.CodeGen/Config/TestConfigEditor.cs +++ b/samples/Demo/Beef.Demo.CodeGen/Config/TestConfigEditor.cs @@ -1,5 +1,4 @@ using Beef.CodeGen.Config.Entity; -using Newtonsoft.Json.Linq; using OnRamp.Config; using System.Threading.Tasks; @@ -13,8 +12,8 @@ public Task AfterPrepareAsync(IRootConfig config) foreach (var e in cgc.Entities) { // Look for the additional property added in the configuration file. - if (e.TryGetExtraProperty("TestCodeGen", out JValue val) && val.ToObject()) - e.CustomProperties["TestExtra"] = $"XXX.{e.GetExtraProperty("TestExtra")}.XXX"; // Add a new custom property that can be referenced in the template. + if (e.TryGetExtraProperty("TestCodeGen", out var val) && val) + e.CustomProperties["TestExtra"] = $"XXX.{e.GetExtraProperty("TestExtra")}.XXX"; // Add a new custom property that can be referenced in the template. } return Task.CompletedTask; diff --git a/samples/Demo/Beef.Demo.CodeGen/Generated/PersonCodeGenTest.cs b/samples/Demo/Beef.Demo.CodeGen/Generated/PersonCodeGenTest.cs index aa93b9b5f..058f28406 100644 --- a/samples/Demo/Beef.Demo.CodeGen/Generated/PersonCodeGenTest.cs +++ b/samples/Demo/Beef.Demo.CodeGen/Generated/PersonCodeGenTest.cs @@ -2,9 +2,9 @@ Company: Beef AppName: Demo Entity name: Person -Extra dictionary: [TestCodeGen, true],[TestExtra, Unknown-Config] -Extra loop: TestCodeGen,true;TestExtra,Unknown-Config; -Extra loop2: TestCodeGen,true;TestExtra,Unknown-Config; +Extra dictionary: [TestCodeGen, True],[TestExtra, Unknown-Config] +Extra loop: TestCodeGen,True;TestExtra,Unknown-Config +Extra loop2: TestCodeGen,True;TestExtra,Unknown-Config Extra lookup: Unknown-Config Custom lookup: XXX.Unknown-Config.XXX Custom lookup lowercase: xxx.unknown-config.xxx diff --git a/samples/Demo/Beef.Demo.CodeGen/Generators/TestCodeGenerator.cs b/samples/Demo/Beef.Demo.CodeGen/Generators/TestCodeGenerator.cs index eacc2a722..50c8ce413 100644 --- a/samples/Demo/Beef.Demo.CodeGen/Generators/TestCodeGenerator.cs +++ b/samples/Demo/Beef.Demo.CodeGen/Generators/TestCodeGenerator.cs @@ -1,5 +1,4 @@ using Beef.CodeGen.Config.Entity; -using Newtonsoft.Json.Linq; using OnRamp.Generators; using System.Collections.Generic; using System.Linq; @@ -9,6 +8,6 @@ namespace Beef.Demo.CodeGen.Generators public class TestCodeGenerator : CodeGeneratorBase { protected override IEnumerable SelectGenConfig(CodeGenConfig config) - => config.Entities.Where(x => x.GetExtraProperty("TestCodeGen")?.ToObject() ?? false).AsEnumerable(); + => config.Entities.Where(x => x.GetExtraProperty("TestCodeGen") ?? false).AsEnumerable(); } } \ No newline at end of file diff --git a/samples/Demo/Beef.Demo.CodeGen/entity.beef-5.yaml b/samples/Demo/Beef.Demo.CodeGen/entity.beef-5.yaml index 46f40c663..f407e4dbe 100644 --- a/samples/Demo/Beef.Demo.CodeGen/entity.beef-5.yaml +++ b/samples/Demo/Beef.Demo.CodeGen/entity.beef-5.yaml @@ -93,7 +93,11 @@ entities: parameters: [ { name: Id, text: '{{Person}} identifier', type: Guid, isMandatory: true } ]}, - { name: PatchWithEf, type: Patch, validator: PersonValidator, primaryKey: true, webApiRoute: 'ef/{id}', autoImplement: EntityFramework } + { name: PatchWithEf, type: Patch, validator: PersonValidator, primaryKey: true, webApiRoute: 'ef/{id}', autoImplement: EntityFramework }, + { name: GetDocumentation, type: Custom, returnType: FileContentResult, webApiMethod: HttpGet, webApiRoute: '{id}/documentation', webApiProduces: [ text/plain ], webApiProducesResponseType: none, + parameters: [ + { name: Id, text: '{{Person}} identifier', type: Guid, isMandatory: true } + ]} ] } diff --git a/samples/Demo/Beef.Demo.Common/Agents/Generated/IPersonAgent.cs b/samples/Demo/Beef.Demo.Common/Agents/Generated/IPersonAgent.cs index 3cb4a2976..dca80d37f 100644 --- a/samples/Demo/Beef.Demo.Common/Agents/Generated/IPersonAgent.cs +++ b/samples/Demo/Beef.Demo.Common/Agents/Generated/IPersonAgent.cs @@ -305,6 +305,15 @@ public partial interface IPersonAgent /// The . /// A . Task> PatchWithEfAsync(HttpPatchOption patchOption, string value, Guid id, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default); + + /// + /// Get Documentation. + /// + /// The identifier. + /// The optional . + /// The . + /// A . + Task GetDocumentationAsync(Guid id, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default); } } diff --git a/samples/Demo/Beef.Demo.Common/Agents/Generated/PersonAgent.cs b/samples/Demo/Beef.Demo.Common/Agents/Generated/PersonAgent.cs index ba7636b69..f5a1961c8 100644 --- a/samples/Demo/Beef.Demo.Common/Agents/Generated/PersonAgent.cs +++ b/samples/Demo/Beef.Demo.Common/Agents/Generated/PersonAgent.cs @@ -155,6 +155,10 @@ public Task DeleteWithEfAsync(Guid id, HttpRequestOptions? requestOp /// public Task> PatchWithEfAsync(HttpPatchOption patchOption, string value, Guid id, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => PatchAsync("api/v1/persons/ef/{id}", patchOption, value, requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("id", id)), cancellationToken: cancellationToken); + + /// + public Task GetDocumentationAsync(Guid id, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/persons/{id}/documentation", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("id", id)), cancellationToken: cancellationToken); } } diff --git a/samples/Demo/Beef.Demo.Common/Agents/Generated/ReferenceDataAgent.cs b/samples/Demo/Beef.Demo.Common/Agents/Generated/ReferenceDataAgent.cs index 4b662a140..0115cd061 100644 --- a/samples/Demo/Beef.Demo.Common/Agents/Generated/ReferenceDataAgent.cs +++ b/samples/Demo/Beef.Demo.Common/Agents/Generated/ReferenceDataAgent.cs @@ -38,36 +38,36 @@ public ReferenceDataAgent(HttpClient client, IJsonSerializer jsonSerializer, Cor : base(client, jsonSerializer, executionContext, settings, logger) { } /// - public Task> CountryGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/countries", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> CountryGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/countries", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/usStates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/usStates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> EyeColorGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/eyeColors", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> EyeColorGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/eyeColors", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> PowerSourceGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/powerSources", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> PowerSourceGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/powerSources", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> CompanyGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/companies", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> CompanyGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/companies", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> StatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/statuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> StatusGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/statuses", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> CommunicationTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("api/v1/demo/ref/communicationTypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> CommunicationTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("api/v1/demo/ref/communicationTypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// public Task GetNamedAsync(string[] names, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) diff --git a/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj b/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj index 61c9d4463..f83547788 100644 --- a/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj +++ b/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/Demo/Beef.Demo.Database/Data/RefData.yaml b/samples/Demo/Beef.Demo.Database/Data/RefData.yaml index f16143dee..8e0dc173b 100644 --- a/samples/Demo/Beef.Demo.Database/Data/RefData.yaml +++ b/samples/Demo/Beef.Demo.Database/Data/RefData.yaml @@ -1,5 +1,4 @@ -^Type: Beef.Database.Core.DefaultIdentifierGenerators -Ref: +Ref: - $Country: - NZ: New Zealand - AU: Australia diff --git a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj index 000b7f91b..4d2cdd09a 100644 --- a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj +++ b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj @@ -52,13 +52,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj b/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj index 0d4eeeec5..62ee0793a 100644 --- a/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj +++ b/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj @@ -5,7 +5,7 @@ true - + diff --git a/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj b/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj index 8498eab04..19944708d 100644 --- a/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj +++ b/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj @@ -5,10 +5,10 @@ true - - - - + + + + \ No newline at end of file diff --git a/samples/My.Hr/My.Hr.CodeGen/entity.beef-5.yaml b/samples/My.Hr/My.Hr.CodeGen/entity.beef-5.yaml index 11ec0627e..6339c021f 100644 --- a/samples/My.Hr/My.Hr.CodeGen/entity.beef-5.yaml +++ b/samples/My.Hr/My.Hr.CodeGen/entity.beef-5.yaml @@ -95,7 +95,7 @@ entities: # - EventSubject is overridden so that the action component will be Terminated. # - AutoImplement is None as this will be implemented by the developer. # - An additional Id parameter is passed; in this instance we do not use the PrimaryKey as we require the value to be passed down all the layers. - { name: Terminate, text: 'Terminates an existing {{Employee}}', type: Update, valueType: TerminationDetail, validator: TerminationDetailValidator, webApiRoute: '{id}/terminate', webApiMethod: HttpPost, eventSubject: 'Hr.Employee:Terminated', autoImplement: None, + { name: Terminate, text: 'Terminates an existing {{Employee}}', type: Update, primaryKey: true, valueType: TerminationDetail, validator: TerminationDetailValidator, webApiRoute: '{id}/terminate', webApiMethod: HttpPost, eventSubject: 'Hr.Employee:Terminated', autoImplement: None, parameters: [ { name: Id, type: Guid, text: '{{Employee}} identifier' } ] diff --git a/samples/My.Hr/My.Hr.Common/Agents/Generated/ReferenceDataAgent.cs b/samples/My.Hr/My.Hr.Common/Agents/Generated/ReferenceDataAgent.cs index 169daf33a..921e887a7 100644 --- a/samples/My.Hr/My.Hr.Common/Agents/Generated/ReferenceDataAgent.cs +++ b/samples/My.Hr/My.Hr.Common/Agents/Generated/ReferenceDataAgent.cs @@ -35,24 +35,24 @@ public ReferenceDataAgent(HttpClient client, IJsonSerializer jsonSerializer, Cor : base(client, jsonSerializer, executionContext, settings, logger) { } /// - public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> TerminationReasonGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/terminationReasons", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> TerminationReasonGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/terminationReasons", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> RelationshipTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/relationshipTypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> RelationshipTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/relationshipTypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/usStates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/usStates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> PerformanceOutcomeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/performanceOutcomes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> PerformanceOutcomeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/performanceOutcomes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// public Task GetNamedAsync(string[] names, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) diff --git a/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj b/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj index 42e682af7..3cb51503f 100644 --- a/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj +++ b/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj @@ -4,6 +4,6 @@ enable - + \ No newline at end of file diff --git a/samples/My.Hr/My.Hr.Test/Apis/ReferenceDataTest.cs b/samples/My.Hr/My.Hr.Test/Apis/ReferenceDataTest.cs index aff1b1a2d..70baf1fb9 100644 --- a/samples/My.Hr/My.Hr.Test/Apis/ReferenceDataTest.cs +++ b/samples/My.Hr/My.Hr.Test/Apis/ReferenceDataTest.cs @@ -36,6 +36,6 @@ public void A130_GetNamed() Agent() .Run(a => a.GetNamedAsync(new string[] { "Gender" })) .AssertOK() - .AssertJsonFromResource("RefDataGetNamed_Response.json", "items.id", "items.etag"); + .AssertJsonFromResource("RefDataGetNamed_Response.json", "gender.id", "gender.etag", "gender.entitykey"); } } \ No newline at end of file diff --git a/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj index db4afa995..9ffb2bdc5 100644 --- a/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj +++ b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj @@ -32,13 +32,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj b/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj index d3256b4d4..42d61c7dd 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj @@ -6,8 +6,8 @@ True - - + + diff --git a/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj b/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj index 25a4e0826..8c3b00789 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj @@ -5,10 +5,10 @@ true - - - - + + + + diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Agents/Generated/ReferenceDataAgent.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Agents/Generated/ReferenceDataAgent.cs index 2dad6add1..7ee22a74d 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Common/Agents/Generated/ReferenceDataAgent.cs +++ b/samples/MyEf.Hr/MyEf.Hr.Common/Agents/Generated/ReferenceDataAgent.cs @@ -35,24 +35,24 @@ public ReferenceDataAgent(HttpClient client, IJsonSerializer jsonSerializer, Cor : base(client, jsonSerializer, executionContext, settings, logger) { } /// - public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> GenderGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/genders", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> TerminationReasonGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/terminationreasons", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> TerminationReasonGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/terminationreasons", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> RelationshipTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/relationshiptypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> RelationshipTypeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/relationshiptypes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/usstates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> USStateGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/usstates", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// - public Task> PerformanceOutcomeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync("ref/performanceoutcomes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> PerformanceOutcomeGetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync("ref/performanceoutcomes", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); /// public Task GetNamedAsync(string[] names, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj b/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj index 42e682af7..3cb51503f 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj @@ -4,6 +4,6 @@ enable - + \ No newline at end of file diff --git a/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj b/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj index 2b95bf3c8..41ad2a62e 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj b/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj index 7a14bc100..b8ed1de0e 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj @@ -28,7 +28,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/MyEf.Hr/MyEf.Hr.Test/Apis/ReferenceDataTest.cs b/samples/MyEf.Hr/MyEf.Hr.Test/Apis/ReferenceDataTest.cs index edd33511b..d9ca8033e 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Test/Apis/ReferenceDataTest.cs +++ b/samples/MyEf.Hr/MyEf.Hr.Test/Apis/ReferenceDataTest.cs @@ -32,6 +32,6 @@ public void A130_GetNamed() Agent() .Run(a => a.GetNamedAsync(new string[] { "Gender" })) .AssertOK() - .AssertJsonFromResource("RefDataGetNamed_Response.json", "items.id", "items.etag"); + .AssertJsonFromResource("RefDataGetNamed_Response.json", "gender.id", "gender.etag", "gender.entitykey"); } } \ No newline at end of file diff --git a/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj b/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj index 5ed2a24a8..43b609cec 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj @@ -32,13 +32,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/templates/Beef.Template.Solution/content/.template.config/template.json b/templates/Beef.Template.Solution/content/.template.config/template.json index 92f2ecbed..5ed42d0dd 100644 --- a/templates/Beef.Template.Solution/content/.template.config/template.json +++ b/templates/Beef.Template.Solution/content/.template.config/template.json @@ -65,7 +65,7 @@ "type": "generated", "generator": "constant", "parameters": { - "value": "3.7.2" + "value": "3.8.1" }, "replaces": "CoreExVersion" }, @@ -73,7 +73,7 @@ "type": "generated", "generator": "constant", "parameters": { - "value": "5.7.4" + "value": "5.8.0" }, "replaces": "BeefVersion" }, diff --git a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml index f4d498baf..8faddfdce 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml +++ b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml @@ -1,4 +1,4 @@ -webapiRoutePrefix: ref +webApiRoutePrefix: ref //#if (implement_database) autoImplement: Database refDataType: Guid diff --git a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj index 31a034f6e..6cbd19938 100644 --- a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj +++ b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/tools/Beef.CodeGen.Core/Config/Database/CodeGenConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/CodeGenConfig.cs index 7f282def4..ff20ebf31 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/CodeGenConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/CodeGenConfig.cs @@ -4,7 +4,6 @@ using DbEx.DbSchema; using DbEx.Migration; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; @@ -13,6 +12,7 @@ using System.Diagnostics; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -20,7 +20,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the global database code-generation configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("CodeGeneration", Title = "'CodeGeneration' object (database-driven)", Description = "The `CodeGeneration` object defines global properties that are used to drive the underlying database-driven code generation.", Markdown = "")] @@ -39,7 +38,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the name of the `Schema` where the artefacts are defined in the database. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The name of the `Schema` where the artefacts are defined in, or should be created in, the database.", IsImportant = true, Description = "This is used as the default `Schema` for all child objects.")] public string? Schema { get; set; } @@ -51,7 +50,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `IsDeleted` capability. /// - [JsonProperty("columnNameIsDeleted", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameIsDeleted")] [CodeGenProperty("Infer", Title = "The column name for the `IsDeleted` capability.", Description = "Defaults to `IsDeleted`.")] public string? ColumnNameIsDeleted { get; set; } @@ -59,7 +58,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `TenantId` capability. /// - [JsonProperty("columnNameTenantId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameTenantId")] [CodeGenProperty("Infer", Title = "The column name for the `TenantId` capability.", Description = "Defaults to `TenantId`.")] public string? ColumnNameTenantId { get; set; } @@ -67,7 +66,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `OrgUnitId` capability. /// - [JsonProperty("columnNameOrgUnitId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameOrgUnitId")] [CodeGenProperty("Infer", Title = "The column name for the `OrgUnitId` capability.", Description = "Defaults to `OrgUnitId`.")] public string? ColumnNameOrgUnitId { get; set; } @@ -75,7 +74,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `RowVersion` capability. /// - [JsonProperty("columnNameRowVersion", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameRowVersion")] [CodeGenProperty("Infer", Title = "The column name for the `RowVersion` capability.", Description = "Defaults to `RowVersion`.")] public string? ColumnNameRowVersion { get; set; } @@ -83,7 +82,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `CreatedBy` capability. /// - [JsonProperty("columnNameCreatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedBy` capability.", Description = "Defaults to `CreatedBy`.")] public string? ColumnNameCreatedBy { get; set; } @@ -91,7 +90,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `CreatedDate` capability. /// - [JsonProperty("columnNameCreatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedDate` capability.", Description = "Defaults to `CreatedDate`.")] public string? ColumnNameCreatedDate { get; set; } @@ -99,7 +98,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `UpdatedBy` capability. /// - [JsonProperty("columnNameUpdatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedBy` capability.", Description = "Defaults to `UpdatedBy`.")] public string? ColumnNameUpdatedBy { get; set; } @@ -107,7 +106,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `UpdatedDate` capability. /// - [JsonProperty("columnNameUpdatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedDate` capability.", Description = "Defaults to `UpdatedDate`.")] public string? ColumnNameUpdatedDate { get; set; } @@ -115,7 +114,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `DeletedBy` capability. /// - [JsonProperty("columnNameDeletedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedBy")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedBy` capability.", Description = "Defaults to `UpdatedBy`.")] public string? ColumnNameDeletedBy { get; set; } @@ -123,7 +122,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the column name for the `DeletedDate` capability. /// - [JsonProperty("columnNameDeletedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedDate")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedDate` capability.", Description = "Defaults to `UpdatedDate`.")] public string? ColumnNameDeletedDate { get; set; } @@ -131,7 +130,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the SQL table or function that is to be used to join against for security-based `OrgUnitId` verification. /// - [JsonProperty("orgUnitJoinSql", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("orgUnitJoinSql")] [CodeGenProperty("Infer", Title = "The SQL table or function that is to be used to join against for security-based `OrgUnitId` verification.", Description = "Defaults to `[Sec].[fnGetUserOrgUnits]()`.")] public string? OrgUnitJoinSql { get; set; } @@ -139,7 +138,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the SQL stored procedure that is to be used for `Permission` verification. /// - [JsonProperty("checkUserPermissionSql", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("checkUserPermissionSql")] [CodeGenProperty("Infer", Title = "The SQL stored procedure that is to be used for `Permission` verification.", Description = "Defaults to `[Sec].[spCheckUserHasPermission]`.")] public string? CheckUserPermissionSql { get; set; } @@ -147,7 +146,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the SQL function that is to be used for `Permission` verification. /// - [JsonProperty("getUserPermissionSql", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("getUserPermissionSql")] [CodeGenProperty("Infer", Title = "The SQL function that is to be used for `Permission` verification.", Description = "Defaults to `[Sec].[fnGetUserHasPermission]`.")] public string? GetUserPermissionSql { get; set; } @@ -159,7 +158,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the option to automatically rename the SQL Tables and Columns for use in .NET. /// - [JsonProperty("autoDotNetRename", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoDotNetRename")] [CodeGenProperty("DotNet", Title = "The option to automatically rename the SQL Tables and Columns for use in .NET.", Options = new string[] { "None", "PascalCase", "SnakeKebabToPascalCase" }, Description = "Defaults `SnakeKebabToPascalCase` that will remove any underscores or hyphens separating each word and capitalize the first character of each; e.g. `internal-customer_id` would be renamed as `InternalCustomerId`. The `PascalCase` option will capatilize the first character only.")] public string? AutoDotNetRename { get; set; } @@ -167,7 +166,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Indicates whether to use preprocessor directives in the generated output. /// - [JsonProperty("preprocessorDirectives", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("preprocessorDirectives")] [CodeGenProperty("DotNet", Title = "Indicates whether to use preprocessor directives in the generated output.")] public bool? PreprocessorDirectives { get; set; } @@ -178,7 +177,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Indicates whether an `Entity Framework` .NET (C#) model is to be generated. /// - [JsonProperty("efModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("efModel")] [CodeGenProperty("EntityFramework", Title = "Indicates whether an `Entity Framework` .NET (C#) model is to be generated for all tables.", Description = "This can be overridden within the `Table`(s).")] public bool? EfModel { get; set; } @@ -190,7 +189,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Indicates whether to generate the event outbox SQL and .NET artefacts. /// - [JsonProperty("outbox", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outbox")] [CodeGenProperty("Outbox", Title = "Indicates whether to generate the event outbox SQL and .NET artefacts.", Description = "Defaults to `false`.")] public bool? Outbox { get; set; } @@ -198,7 +197,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the schema name of the event outbox table. /// - [JsonProperty("outboxSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outboxSchema")] [CodeGenProperty("Outbox", Title = "The schema name of the event outbox table.", Description = "Defaults to `Outbox` (literal).")] public string? OutboxSchema { get; set; } @@ -206,7 +205,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Indicates whether to create the `Outbox`-Schema within the database. /// - [JsonProperty("outboxSchemaCreate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outboxSchemaCreate")] [CodeGenProperty("Outbox", Title = "Indicates whether to create the `OutboxSchema` within the database.", Description = "Defaults to `true`.")] public bool? OutboxSchemaCreate { get; set; } @@ -214,7 +213,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the name of the event outbox table. /// - [JsonProperty("outboxTable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outboxTable")] [CodeGenProperty("Outbox", Title = "The name of the event outbox table.", Description = "Defaults to `EventOutbox` (literal).")] public string? OutboxTable { get; set; } @@ -222,7 +221,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the stored procedure name for the event outbox enqueue. /// - [JsonProperty("outboxEnqueueStoredProcedure", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outboxEnqueueStoredProcedure")] [CodeGenProperty("Outbox", Title = "The stored procedure name for the event outbox enqueue.", Description = "Defaults to `spEventOutboxEnqueue` (literal).")] public string? OutboxEnqueueStoredProcedure { get; set; } @@ -230,7 +229,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the stored procedure name for the event outbox dequeue. /// - [JsonProperty("outboxDequeueStoredProcedure", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("outboxDequeueStoredProcedure")] [CodeGenProperty("Outbox", Title = "The stored procedure name for the event outbox dequeue.", Description = "Defaults to `spEventOutboxDequeue` (literal).")] public string? OutboxDequeueStoredProcedure { get; set; } @@ -242,7 +241,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the base path (directory) prefix for the artefacts. /// - [JsonProperty("pathBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathBase")] [CodeGenProperty("Path", Title = "The base path (directory) prefix for the Database-related artefacts; other `Path*` properties append to this value when they are not specifically overridden.", Description = "Defaults to `Company` (runtime parameter) + `.` + `AppName` (runtime parameter). For example `Beef.Demo`.")] public string? PathBase { get; set; } @@ -250,7 +249,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the path (directory) for the Schema Database-related artefacts. /// - [JsonProperty("pathDatabaseSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathDatabaseSchema")] [CodeGenProperty("Path", Title = "The path (directory) for the Schema Database-related artefacts.", Description = "Defaults to `PathBase` + `.Database/Schema` (literal). For example `Beef.Demo.Database/Schema`.")] public string? PathDatabaseSchema { get; set; } @@ -258,7 +257,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the path (directory) for the Schema Database-related artefacts. /// - [JsonProperty("pathDatabaseMigrations", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathDatabaseMigrations")] [CodeGenProperty("Path", Title = "The path (directory) for the Schema Database-related artefacts.", Description = "Defaults to `PathBase` + `.Database/Migrations` (literal). For example `Beef.Demo.Database/Migrations`.")] public string? PathDatabaseMigrations { get; set; } @@ -266,7 +265,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the path (directory) for the Business-related (.NET) artefacts. /// - [JsonProperty("pathBusiness", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathBusiness")] [CodeGenProperty("Path", Title = "The path (directory) for the Business-related (.NET) artefacts.", Description = "Defaults to `PathBase` + `.Business` (literal). For example `Beef.Demo.Business`.")] public string? PathBusiness { get; set; } @@ -278,7 +277,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set. /// - [JsonProperty("orgUnitImmutable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("orgUnitImmutable")] [CodeGenProperty("Auth", Title = "Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set.", IsImportant = true, Description = "This is only applicable for stored procedures.")] public bool? OrgUnitImmutable { get; set; } @@ -290,7 +289,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the base Namespace (root) for the .NET artefacts. /// - [JsonProperty("namespaceBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceBase")] [CodeGenProperty("Namespace", Title = "The base Namespace (root) for the .NET artefacts.", Description = "Defaults to `Company` (runtime parameter) + `.` + `AppName` (runtime parameter). For example `Beef.Demo`.")] public string? NamespaceBase { get; set; } @@ -298,7 +297,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the Namespace (root) for the Common-related .NET artefacts. /// - [JsonProperty("namespaceCommon", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceCommon")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Common-related .NET artefacts.", Description = "Defaults to `NamespaceBase` + `.Common` (literal). For example `Beef.Demo.Common`.")] public string? NamespaceCommon { get; set; } @@ -306,7 +305,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the Namespace (root) for the Business-related .NET artefacts. /// - [JsonProperty("namespaceBusiness", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceBusiness")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Business-related .NET artefacts.", Description = "Defaults to `NamespaceBase` + `.Business` (literal). For example `Beef.Demo.Business`.")] public string? NamespaceBusiness { get; set; } @@ -314,7 +313,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the Namespace (root) for the outbox-related .NET artefacts. /// - [JsonProperty("namespaceOutbox", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceOutbox")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Outbox-related Publisher .NET artefacts.", Description = "Defaults to `NamespaceBusiness`.")] public string? NamespaceOutbox { get; set; } @@ -324,7 +323,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the corresponding collection. /// - [JsonProperty("tables", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("tables")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Table` collection.", IsImportant = true, Markdown = "A `Table` object provides the relationship to an existing table within the database.")] public List? Tables { get; set; } @@ -332,7 +331,7 @@ public class CodeGenConfig : ConfigRootBase, ISpecialColumnNames /// /// Gets or sets the corresponding collection. /// - [JsonProperty("queries", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("queries")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Query` collection.", IsImportant = true, Markdown = "A `Query` object provides the primary configuration for a query, including multiple table joins.")] public List? Queries { get; set; } @@ -494,6 +493,6 @@ internal static void WarnWhereDeprecated(CodeGenConfig root, ConfigBase config, /// The schema. /// The table. /// The formatted name. - public string? FormatSchemaTableName(string? schema, string? table) => schema != null && schema.Length > 1 ? $"{schema}.{table}" : table; + public static string? FormatSchemaTableName(string? schema, string? table) => schema != null && schema.Length > 1 ? $"{schema}.{table}" : table; } } \ No newline at end of file diff --git a/tools/Beef.CodeGen.Core/Config/Database/EfRelationshipConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/EfRelationshipConfig.cs index 75d634467..663d0b589 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/EfRelationshipConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/EfRelationshipConfig.cs @@ -1,11 +1,11 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef using DbEx.DbSchema; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -13,7 +13,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents a database entity framework (EF) relationship configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Relationship", Title = "'Relationship' object (database-driven)", Description = "The `Relationship` object enables the definition of an entity framework (EF) model relationship.")] [CodeGenCategory("Key", Title = "Provides the _key_ configuration.")] @@ -26,14 +25,14 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the related table name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the primary table of the query.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the related schema name. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The schema name of the primary table of the view.", Description = "Defaults to `CodeGeneration.Schema`.")] public string? Schema { get; set; } @@ -41,7 +40,7 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the relationship type. /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The relationship type between the parent and child (self).", IsImportant = true, Options = new string[] { "OneToMany", "ManyToOne" }, Description = "Defaults to `OneToMany`.")] public string? Type { get; set; } @@ -49,14 +48,14 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the list of `Column` names from the related table that reference the parent. /// - [JsonProperty("foreignKeyColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("foreignKeyColumns")] [CodeGenPropertyCollection("Key", Title = "The list of `Column` names from the related table that reference the parent.", IsMandatory = true, IsImportant = true)] public List? ForeignKeyColumns { get; set; } /// /// Gets or sets the list of `Column` names from the principal table that reference the child. /// - [JsonProperty("principalKeyColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("principalKeyColumns")] [CodeGenPropertyCollection("Key", Title = "The list of `Column` names from the principal table that reference the child.", Description = " Typically this is only used where referencing property(s) other than the primary key as the principal property(s).")] public List? PrincipalKeyColumns { get; set; } @@ -68,7 +67,7 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the operation applied on delete. /// - [JsonProperty("onDelete", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("onDelete")] [CodeGenProperty("EF", Title = "The operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.", Options = new string[] { "NoAction", "Cascade", "ClientCascade", "ClientNoAction", "ClientSetNull", "Restrict", "SetNull" }, Description = "Defaults to `NoAction`. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.deletebehavior for more information.")] @@ -77,7 +76,7 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Indicates whether to automatically include navigation to the property. /// - [JsonProperty("autoInclude", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoInclude")] [CodeGenProperty("EF", Title = "Indicates whether to automatically include navigation to the property.", Description = "Defaults to `false`.")] public bool? AutoInclude { get; set; } @@ -89,7 +88,7 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the corresponding property name within the entity framework (EF) model. /// - [JsonProperty("propertyName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("propertyName")] [CodeGenProperty("DotNet", Title = "The corresponding property name within the entity framework (EF) model.", Description = "Defaults to `Name` using the `CodeGeneration.AutoDotNetRename` option.")] public string? PropertyName { get; set; } @@ -97,7 +96,7 @@ public class EfRelationshipConfig : ConfigBase, ITab /// /// Gets or sets the corresponding entity framework (EF) model name (.NET Type). /// - [JsonProperty("efModelName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("efModelName")] [CodeGenProperty("DotNet", Title = "The corresponding entity framework (EF) model name (.NET Type).", Description = "Defaults to `Name` using the `CodeGeneration.AutoDotNetRename` option.")] public string? EfModelName { get; set; } @@ -153,7 +152,7 @@ protected override Task PrepareAsync() Schema = DefaultWhereNull(Schema, () => Root!.Schema); DbTable = Root!.DbTables!.Where(x => x.Name == Name && x.Schema == Schema).SingleOrDefault(); if (DbTable == null) - throw new CodeGenException(this, nameof(Name), $"Specified Schema.Table '{Root.FormatSchemaTableName(Schema, Name)}' not found in database."); + throw new CodeGenException(this, nameof(Name), $"Specified Schema.Table '{CodeGenConfig.FormatSchemaTableName(Schema, Name)}' not found in database."); Type = DefaultWhereNull(Type, () => "OneToMany"); PropertyName = DefaultWhereNull(PropertyName, () => Root!.RenameForDotNet(Name)); diff --git a/tools/Beef.CodeGen.Core/Config/Database/ExecuteConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/ExecuteConfig.cs index fbc8e6b46..93e29e34f 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/ExecuteConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/ExecuteConfig.cs @@ -1,7 +1,7 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp.Config; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -9,7 +9,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure additional statement configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Execute", Title = "'Execute' object (database-driven)", Description = "The _Execute_ object enables additional TSQL statements to be embedded within the stored procedure.", ExampleMarkdown = @"A YAML example is as follows: @@ -42,14 +41,14 @@ public class ExecuteConfig : ConfigBase /// /// Gets or sets the additional TSQL statement. /// - [JsonProperty("statement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("statement")] [CodeGenProperty("Key", Title = "The additional TSQL statement.", IsMandatory = true, IsImportant = true)] public string? Statement { get; set; } /// /// Gets or sets the location of the statement in relation to the underlying primary stored procedure statement. /// - [JsonProperty("location", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("location")] [CodeGenProperty("Key", Title = "The location of the statement in relation to the underlying primary stored procedure statement.", IsImportant = true, Options = new string[] { "Before", "After" }, Description = "Defaults to `After`.")] public string? Location { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/OrderByConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/OrderByConfig.cs index 71abaac63..22f5f58e2 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/OrderByConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/OrderByConfig.cs @@ -1,8 +1,8 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp.Config; using System; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -10,7 +10,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure order-by configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("OrderBy", Title = "'OrderBy' object (database-driven)", Description = "The `OrderBy` object defines the query order. Only valid for `StoredProcedure.Type` of `GetAll`.", ExampleMarkdown = @"A YAML example is as follows: @@ -49,14 +48,14 @@ public class OrderByConfig : ConfigBase /// /// Gets or sets the name of the column to order by. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the `Column` to order by.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the sort order option. /// - [JsonProperty("order", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("order")] [CodeGenProperty("Key", Title = "The corresponding sort order.", IsImportant = true, Options = new string[] { "Ascending", "Descending" }, Description = "Defaults to `Ascending`.")] public string? Order { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/ParameterConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/ParameterConfig.cs index bbaf57b4a..b9b4d1fe4 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/ParameterConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/ParameterConfig.cs @@ -1,12 +1,12 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef using DbEx.DbSchema; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -14,7 +14,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure parameter configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Parameter", Title = "'Parameter' object (database-driven)", Description = "The `Parameter` is used to define a stored procedure parameter and its charateristics. These are in addition to those that are automatically inferred (added) by the selected `StoredProcedure.Type`.", ExampleMarkdown = @"A YAML example is as follows: @@ -53,14 +52,14 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the parameter name (without the `@` prefix). /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The parameter name (without the `@` prefix).", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the corresponding column name; used to infer characteristics. /// - [JsonProperty("column", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("column")] [CodeGenProperty("Key", Title = "The corresponding column name; used to infer characteristics.", Description = "Defaults to `Name`.")] public string? Column { get; set; } @@ -68,14 +67,14 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the SQL type definition (overrides inherited Column definition) including length/precision/scale. /// - [JsonProperty("sqlType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("sqlType")] [CodeGenProperty("Key", Title = "The SQL type definition (overrides inherited Column definition) including length/precision/scale.")] public string? SqlType { get; set; } /// /// Indicates whether the parameter is nullable. /// - [JsonProperty("nullable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("nullable")] [CodeGenProperty("Key", Title = "Indicates whether the parameter is nullable.", Description = "Note that when the parameter value is `NULL` it will not be included in the query.")] public bool? Nullable { get; set; } @@ -83,21 +82,21 @@ public class ParameterConfig : ConfigBase /// /// Indicates whether the column value where NULL should be treated as the specified value; results in: `ISNULL([x].[col], value)`. /// - [JsonProperty("treatColumnNullAs", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("treatColumnNullAs")] [CodeGenProperty("Key", Title = "Indicates whether the column value where NULL should be treated as the specified value; results in: `ISNULL([x].[col], value)`.")] public bool? TreatColumnNullAs { get; set; } /// /// Indicates whether the parameter is a collection (one or more values to be included `IN` the query). /// - [JsonProperty("collection", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collection")] [CodeGenProperty("Key", Title = "Indicates whether the parameter is a collection (one or more values to be included `IN` the query).")] public bool? Collection { get; set; } /// /// Gets or sets the where clause equality operator. /// - [JsonProperty("operator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("operator")] [CodeGenProperty("Key", Title = "The where clause equality operator", IsImportant = true, Options = new string[] { "EQ", "NE", "LT", "LE", "GT", "GE", "LIKE" }, Description = "Defaults to `EQ`.")] public string? Operator { get; set; } @@ -154,10 +153,7 @@ protected override Task PrepareAsync() SqlType = DefaultWhereNull(SqlType, () => { - var c = Parent!.Parent!.Columns.Where(x => x.Name == Column).SingleOrDefault()?.DbColumn; - if (c == null) - throw new CodeGenException(this, nameof(Column), $"Column '{Column}' (Schema.Table '{Parent!.Parent!.Schema}.{Parent!.Parent!.Name}') not found in database."); - + var c = (Parent!.Parent!.Columns.Where(x => x.Name == Column).SingleOrDefault()?.DbColumn) ?? throw new CodeGenException(this, nameof(Column), $"Column '{Column}' (Schema.Table '{Parent!.Parent!.Schema}.{Parent!.Parent!.Name}') not found in database."); var sb = new StringBuilder(); if (CompareValue(Collection, true)) { diff --git a/tools/Beef.CodeGen.Core/Config/Database/QueryConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/QueryConfig.cs index d1e397f95..f0824a740 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/QueryConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/QueryConfig.cs @@ -1,13 +1,13 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef using DbEx.DbSchema; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -15,7 +15,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents a database query configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Query", Title = "'Query' object (database-driven)", Description = "The `Query` object enables the definition of more complex multi-table queries (`Joins`) that would primarily result in a database _View_. The primary table `Name` for the query is required to be specified. Multiple queries can be specified for the same table(s)." + " The `IncludeColumns` and `ExcludeColumns` provide a shorthand to include or exclude selected columns; with the `AliasColumns` providing a means to rename where required (for example duplicate name)." @@ -52,14 +51,14 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the name of the primary table of the query. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the primary table of the query.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the schema name of the primary table of the view. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The schema name of the primary table of the view.", Description = "Defaults to `CodeGeneration.Schema`.")] public string? Schema { get; set; } @@ -67,7 +66,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the `Schema.Table` alias name. /// - [JsonProperty("alias", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("alias")] [CodeGenProperty("Key", Title = "The `Schema.Table` alias name.", Description = "Will automatically default where not specified.")] public string? Alias { get; set; } @@ -79,7 +78,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` names to be included in the underlying generated output. /// - [JsonProperty("includeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("includeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be included in the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates that all `Columns` are to be included.")] public List? IncludeColumns { get; set; } @@ -87,7 +86,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` names to be excluded from the underlying generated output. /// - [JsonProperty("excludeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be excluded from the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates no `Columns` are to be excluded.")] public List? ExcludeColumns { get; set; } @@ -95,7 +94,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` and `Alias` pairs to enable column renaming. /// - [JsonProperty("aliasColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("aliasColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` and `Alias` pairs (split by a `^` lookup character) to enable column aliasing/renaming.", IsImportant = true, Description = "Each alias value should be formatted as `Column` + `^` + `Alias`; e.g. `PCODE^ProductCode`")] public List? AliasColumns { get; set; } @@ -107,14 +106,14 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Indicates whether a `View` is to be generated. /// - [JsonProperty("view", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("view")] [CodeGenProperty("View", Title = "Indicates whether a `View` is to be generated.")] public bool? View { get; set; } /// /// Gets or sets the `View` name. /// - [JsonProperty("viewName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("viewName")] [CodeGenProperty("View", Title = "The `View` name.", Description = "Defaults to `vw` + `Name`; e.g. `vwTableName`.")] public string? ViewName { get; set; } @@ -122,7 +121,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the schema name of the `View`. /// - [JsonProperty("viewSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("viewSchema")] [CodeGenProperty("View", Title = "The schema name for the `View`.", Description = "Defaults to `Schema`.")] public string? ViewSchema { get; set; } @@ -134,7 +133,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the permission to be used for security permission checking. /// - [JsonProperty("permission", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("permission")] [CodeGenProperty("Auth", Title = "The permission to be used for security permission checking.", IsImportant = true, Description = "The suffix is optional, and where not specified will default to `.READ`.")] public string? Permission { get; set; } @@ -146,7 +145,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `IsDeleted` capability. /// - [JsonProperty("columnNameIsDeleted", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameIsDeleted")] [CodeGenProperty("Infer", Title = "The column name for the `IsDeleted` capability.", Description = "Defaults to `CodeGeneration.IsDeleted`.")] public string? ColumnNameIsDeleted { get; set; } @@ -154,7 +153,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `TenantId` capability. /// - [JsonProperty("columnNameTenantId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameTenantId")] [CodeGenProperty("Infer", Title = "The column name for the `TenantId` capability.", Description = "Defaults to `CodeGeneration.TenantId`.")] public string? ColumnNameTenantId { get; set; } @@ -162,7 +161,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `OrgUnitId` capability. /// - [JsonProperty("columnNameOrgUnitId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameOrgUnitId")] [CodeGenProperty("Infer", Title = "The column name for the `OrgUnitId` capability.", Description = "Defaults to `CodeGeneration.OrgUnitId`.")] public string? ColumnNameOrgUnitId { get; set; } @@ -170,7 +169,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `RowVersion` capability. /// - [JsonProperty("columnNameRowVersion", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameRowVersion")] [CodeGenProperty("Infer", Title = "The column name for the `RowVersion` capability.", Description = "Defaults to `CodeGeneration.RowVersion`.")] public string? ColumnNameRowVersion { get; set; } @@ -178,7 +177,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `CreatedBy` capability. /// - [JsonProperty("columnNameCreatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedBy` capability.", Description = "Defaults to `CodeGeneration.CreatedBy`.")] public string? ColumnNameCreatedBy { get; set; } @@ -186,7 +185,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `CreatedDate` capability. /// - [JsonProperty("columnNameCreatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedDate` capability.", Description = "Defaults to `CodeGeneration.CreatedDate`.")] public string? ColumnNameCreatedDate { get; set; } @@ -194,7 +193,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `UpdatedBy` capability. /// - [JsonProperty("columnNameUpdatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameUpdatedBy { get; set; } @@ -202,7 +201,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `UpdatedDate` capability. /// - [JsonProperty("columnNameUpdatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameUpdatedDate { get; set; } @@ -210,7 +209,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `DeletedBy` capability. /// - [JsonProperty("columnNameDeletedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedBy")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameDeletedBy { get; set; } @@ -218,7 +217,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `DeletedDate` capability. /// - [JsonProperty("columnNameDeletedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedDate")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameDeletedDate { get; set; } @@ -230,7 +229,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the corresponding collection. /// - [JsonProperty("joins", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("joins")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Join` collection.", IsImportant = true, Markdown = "A `Join` object provides the configuration for a joining table.")] public List? Joins { get; set; } @@ -238,7 +237,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the corresponding collection. /// - [JsonProperty("order", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("order")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Order` collection.", Markdown = "An `Order` object defines the order (sequence).")] public List? Order { get; set; } @@ -246,7 +245,7 @@ public class QueryConfig : ConfigBase, ITableRefer /// /// Gets or sets the corresponding collection. /// - [JsonProperty("where", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("where")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Where` collection.", Markdown = "A `Where` object defines the selection/filtering.")] public List? Where { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/QueryJoinConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/QueryJoinConfig.cs index 60ecb6c97..65c922cc0 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/QueryJoinConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/QueryJoinConfig.cs @@ -1,13 +1,13 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef using DbEx.DbSchema; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -15,7 +15,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the table join configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("QueryJoin", Title = "'QueryJoin' object (database-driven)", Description = "The `QueryJoin` object defines a join to another (or same) table within a query. The `Type` defines the join type, such as inner join, etc." + " The `IncludeColumns` and `ExcludeColumns` provide a shorthand to include or exclude selected columns; with the `AliasColumns` providing a means to rename where required (for example duplicate name).", @@ -48,14 +47,14 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the name of the table to join. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the table to join.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the schema name of the table to join. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The schema name of the table to join.", Description = "Defaults to `Table.Schema`; i.e. same schema.")] public string? Schema { get; set; } @@ -63,7 +62,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the `Schema.Table` alias name. /// - [JsonProperty("alias", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("alias")] [CodeGenProperty("Key", Title = "The `Schema.Table` alias name.", Description = "Will automatically default where not specified.")] public string? Alias { get; set; } @@ -71,7 +70,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the join type option. /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The SQL join type.", IsImportant = true, Options = new string[] { "Inner", "Left", "Right", "Full" }, Description = "Defaults to `Inner`.")] public string? Type { get; set; } @@ -83,7 +82,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the list of `Column` names to be included in the underlying generated output. /// - [JsonProperty("includeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("includeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be included in the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates that all `Columns` are to be included.")] public List? IncludeColumns { get; set; } @@ -91,7 +90,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the list of `Column` names to be excluded from the underlying generated output. /// - [JsonProperty("excludeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be excluded from the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates no `Columns` are to be excluded.")] public List? ExcludeColumns { get; set; } @@ -99,7 +98,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the list of `Column` and `Alias` pairs to enable column renaming. /// - [JsonProperty("aliasColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("aliasColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` and `Alias` pairs (split by a `^` lookup character) to enable column renaming.", IsImportant = true, Description = "Each alias value should be formatted as `Column` + `^` + `Alias`; e.g. `PCODE^ProductCode`")] public List? AliasColumns { get; set; } @@ -111,7 +110,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `IsDeleted` capability. /// - [JsonProperty("columnNameIsDeleted", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameIsDeleted")] [CodeGenProperty("Infer", Title = "The column name for the `IsDeleted` capability.", Description = "Defaults to `CodeGeneration.IsDeleted`.")] public string? ColumnNameIsDeleted { get; set; } @@ -119,7 +118,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `TenantId` capability. /// - [JsonProperty("columnNameTenantId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameTenantId")] [CodeGenProperty("Infer", Title = "The column name for the `TenantId` capability.", Description = "Defaults to `CodeGeneration.TenantId`.")] public string? ColumnNameTenantId { get; set; } @@ -127,7 +126,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `OrgUnitId` capability. /// - [JsonProperty("columnNameOrgUnitId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameOrgUnitId")] [CodeGenProperty("Infer", Title = "The column name for the `OrgUnitId` capability.", Description = "Defaults to `CodeGeneration.OrgUnitId`.")] public string? ColumnNameOrgUnitId { get; set; } @@ -135,7 +134,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `RowVersion` capability. /// - [JsonProperty("columnNameRowVersion", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameRowVersion")] [CodeGenProperty("Infer", Title = "The column name for the `RowVersion` capability.", Description = "Defaults to `CodeGeneration.RowVersion`.")] public string? ColumnNameRowVersion { get; set; } @@ -143,7 +142,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `CreatedBy` capability. /// - [JsonProperty("columnNameCreatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedBy` capability.", Description = "Defaults to `CodeGeneration.CreatedBy`.")] public string? ColumnNameCreatedBy { get; set; } @@ -151,7 +150,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `CreatedDate` capability. /// - [JsonProperty("columnNameCreatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedDate` capability.", Description = "Defaults to `CodeGeneration.CreatedDate`.")] public string? ColumnNameCreatedDate { get; set; } @@ -159,7 +158,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `UpdatedBy` capability. /// - [JsonProperty("columnNameUpdatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameUpdatedBy { get; set; } @@ -167,7 +166,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `UpdatedDate` capability. /// - [JsonProperty("columnNameUpdatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameUpdatedDate { get; set; } @@ -175,7 +174,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `DeletedBy` capability. /// - [JsonProperty("columnNameDeletedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedBy")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameDeletedBy { get; set; } @@ -183,7 +182,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the column name for the `DeletedDate` capability. /// - [JsonProperty("columnNameDeletedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedDate")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameDeletedDate { get; set; } @@ -193,7 +192,7 @@ public class QueryJoinConfig : ConfigBase, ITableRef /// /// Gets or sets the corresponding collection. /// - [JsonProperty("on", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("on")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `JoinOn` collection.")] public List? On { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/QueryJoinOnConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/QueryJoinOnConfig.cs index 8ddd6aa4b..6e56395c7 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/QueryJoinOnConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/QueryJoinOnConfig.cs @@ -1,10 +1,10 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -12,7 +12,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the table join on condition configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("QueryJoinOn", Title = "'QueryJoinOn' object (database-driven)", Description = "The `QueryJoinOn` object defines the join on characteristics for a join within a query.", ExampleMarkdown = @"A YAML configuration example is as follows: @@ -42,14 +41,14 @@ public class QueryJoinOnConfig : ConfigBase /// /// Gets or sets the name of the join column (from the `Join` table). /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the join column (from the `Join` table).", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the name of the other join to table schema. /// - [JsonProperty("toSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("toSchema")] [CodeGenProperty("Key", Title = "The name of the other join to table schema.", Description = "Defaults to `Table.Schema`; i.e. same schema. See also `ToTable` and `ToColumn` as these all relate.")] public string? ToSchema { get; set; } @@ -57,7 +56,7 @@ public class QueryJoinOnConfig : ConfigBase /// /// Gets or sets the name of the other join to table. /// - [JsonProperty("toTable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("toTable")] [CodeGenProperty("Key", Title = "The name of the other join to table.", Description = "Defaults to `Table.Name`; i.e. primary table. See also `ToSchema` and `ToColumn` as these all relate.")] public string? ToTable { get; set; } @@ -65,7 +64,7 @@ public class QueryJoinOnConfig : ConfigBase /// /// Gets or sets the name of the other join to column. /// - [JsonProperty("toColumn", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("toColumn")] [CodeGenProperty("Key", Title = "The name of the other join to column.", IsImportant = true, Description = "Defaults to `Name`; i.e. assumes same name. See also `ToSchema` and `ToTable` as these all relate.")] public string? ToColumn { get; set; } @@ -73,7 +72,7 @@ public class QueryJoinOnConfig : ConfigBase /// /// Gets or sets the fully qualified name (`Alias.Name`) of the other column being joined to or other valid SQL (e.g. function) bypassing the corresponding `Schema`, `Table` and `Column` logic. /// - [JsonProperty("toStatement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("toStatement")] [CodeGenProperty("Key", Title = "The fully qualified name (`Alias.Name`) of the other column being joined to or other valid SQL (e.g. function) bypassing the corresponding `Schema`, `Table` and `Column` logic.")] public string? ToStatement { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/QueryOrderConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/QueryOrderConfig.cs index e1eaa31ab..d0dc0c597 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/QueryOrderConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/QueryOrderConfig.cs @@ -1,10 +1,10 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -12,7 +12,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure order-by configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("QueryOrder", Title = "'QueryOrder' object (database-driven)", Description = "The `QueryOrder` object that defines the query order.")] [CodeGenCategory("Key", Title = "Provides the _key_ configuration.")] @@ -29,7 +28,7 @@ public class QueryOrderConfig : ConfigBase /// /// Gets or sets the name of the column to order by. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the `Column` to order by.", IsMandatory = true, IsImportant = true, Description = "See also `Schema` and `Table` as these all relate.")] public string? Name { get; set; } @@ -37,7 +36,7 @@ public class QueryOrderConfig : ConfigBase /// /// Gets or sets the name of the order by table schema. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The name of order by table schema. See also `Name` and `Column` as these all relate.", Description = "Defaults to `Query.Schema`.")] public string? Schema { get; set; } @@ -45,7 +44,7 @@ public class QueryOrderConfig : ConfigBase /// /// Gets or sets the name of the order by table. /// - [JsonProperty("table", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("table")] [CodeGenProperty("Key", Title = "The name of the order by table.", Description = "Defaults to `Table.Name`; i.e. primary table. See also `Schema` and `Column` as these all relate.")] public string? Table { get; set; } @@ -53,7 +52,7 @@ public class QueryOrderConfig : ConfigBase /// /// Gets or sets the sort order option. /// - [JsonProperty("order", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("order")] [CodeGenProperty("Key", Title = "The corresponding sort order.", IsImportant = true, Options = new string[] { "Ascending", "Descending" }, Description = "Defaults to `Ascending`.")] public string? Order { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/QueryWhereConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/QueryWhereConfig.cs index 5a14283a9..ba98f5c10 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/QueryWhereConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/QueryWhereConfig.cs @@ -1,7 +1,7 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp.Config; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -9,7 +9,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure where statement configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("QueryWhere", Title = "'QueryWhere' object (database-driven)", Description = "The `QueryWhere` object defines an additional where `Statement` to be added.")] [CodeGenCategory("Key", Title = "Provides the **key** configuration.")] @@ -20,7 +19,7 @@ public class QueryWhereConfig : ConfigBase /// /// Gets or sets the where TSQL statement. /// - [JsonProperty("statement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("statement")] [CodeGenProperty("Key", Title = "The where TSQL statement.", IsMandatory = true, IsImportant = true)] public string? Statement { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/StoredProcedureConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/StoredProcedureConfig.cs index 1b069cd26..caa138eb3 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/StoredProcedureConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/StoredProcedureConfig.cs @@ -1,10 +1,10 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -12,7 +12,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("StoredProcedure", Title = "'StoredProcedure' object (database-driven)", Description = "The code generation for an `StoredProcedure` is primarily driven by the `Type` property. This encourages (enforces) a consistent implementation for the standardised **CRUD** (Create, Read, Update and Delete) actions, as well as supporting `Upsert`, `Merge` and ad-hoc queries as required.", Markdown = @"The valid `Type` values are as follows: @@ -65,7 +64,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the name of the `StoredProcedure`. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the `StoredProcedure`; generally the verb/action, i.e. `Get`, `Update`, etc.", IsMandatory = true, IsImportant = true, Description = "See `StoredProcedureName` for the actual name used in the database.")] public string? Name { get; set; } @@ -73,7 +72,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the stored procedure operation type. /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The stored procedure operation type.", IsImportant = true, Options = new string[] { "Get", "GetColl", "Create", "Update", "Upsert", "Delete", "Merge" }, Description = "Defaults to `GetColl`.")] @@ -82,7 +81,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Indicates whether standardized paging support should be added. /// - [JsonProperty("paging", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("paging")] [CodeGenProperty("Key", Title = "Indicates whether standardized paging support should be added.", IsImportant = true, Description = "This only applies where the stored procedure operation `Type` is `GetColl`.")] public bool? Paging { get; set; } @@ -90,7 +89,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the `StoredProcedure` name in the database. /// - [JsonProperty("storedProcedureName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("storedProcedureName")] [CodeGenProperty("Key", Title = "The `StoredProcedure` name in the database.", Description = "Defaults to `sp` + `Table.Name` + `Name`; e.g. `spTableName` or `spPersonGet`.")] public string? StoredProcedureName { get; set; } @@ -102,7 +101,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the SQL statement to perform the reselect after a `Create`, `Update` or `Upsert` stored procedure operation `Type`. /// - [JsonProperty("reselectStatement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("reselectStatement")] [CodeGenProperty("Additional", Title = "The SQL statement to perform the reselect after a `Create`, `Update` or `Upsert` stored procedure operation `Type`.", Description = "Defaults to `[{{Table.Schema}}].[sp{{Table.Name}}Get]` passing the primary key column(s).")] public string? ReselectStatement { get; set; } @@ -110,7 +109,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Indicates whether to select into a `#TempTable` to allow other statements access to the selected data. /// - [JsonProperty("intoTempTable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("intoTempTable")] [CodeGenProperty("Additional", Title = "Indicates whether to select into a `#TempTable` to allow other statements access to the selected data.", Description = "A `Select * from #TempTable` is also performed (code-generated) where the stored procedure operation `Type` is `GetColl`.")] public bool? IntoTempTable { get; set; } @@ -118,7 +117,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the table hints using the SQL Server `WITH()` statement; the value specified will be used as-is; e.g. `NOLOCK` will result in `WITH(NOLOCK)`. /// - [JsonProperty("withHints", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("withHints")] [CodeGenProperty("Additional", Title = "the table hints using the SQL Server `WITH()` statement; the value specified will be used as-is; e.g. `NOLOCK` will result in `WITH(NOLOCK)`.")] public string? WithHints { get; set; } @@ -129,7 +128,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the column names to be used in the `Merge` statement to determine whether to insert, update or delete. /// - [JsonProperty("mergeOverrideIdentityColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("mergeOverrideIdentityColumns")] [CodeGenPropertyCollection("Merge", Title = "The list of `Column` names to be used in the `Merge` statement to determine whether to _insert_, _update_ or _delete_.", Description = "This is used to override the default behaviour of using the primary key column(s).")] public List? MergeOverrideIdentityColumns { get; set; } @@ -141,14 +140,14 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the permission (full name being `name.action`) override to be used for security permission checking. /// - [JsonProperty("permission", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("permission")] [CodeGenProperty("Auth", Title = "The name of the `StoredProcedure` in the database.")] public string? Permission { get; set; } /// /// Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set. /// - [JsonProperty("orgUnitImmutable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("orgUnitImmutable")] [CodeGenProperty("Auth", Title = "Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set.", IsImportant = true, Description = "Defaults to `Table.OrgUnitImmutable`.")] public bool? OrgUnitImmutable { get; set; } @@ -160,7 +159,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the list of `Column` names to be included in the underlying generated output (further filters `Table.IncludeColumns`). /// - [JsonProperty("includeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("includeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be included in the underlying generated _settable_ output (further filters `Table.IncludeColumns`).", IsImportant = true, Description = "Where not specified this indicates that all `Columns` are to be included. Only filters the columns where `Type` is `Get`, `GetColl`, `Create`, `Update` or `Upsert`.")] public List? IncludeColumns { get; set; } @@ -168,7 +167,7 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the list of `Column` names to be excluded from the underlying generated output (further filters `Table.ExcludeColumns`). /// - [JsonProperty("excludeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be excluded from the underlying generated _settable_ output (further filters `Table.ExcludeColumns`).", IsImportant = true, Description = "Where not specified this indicates no `Columns` are to be excluded. Only filters the columns where `Type` is `Get`, `GetColl`, `Create`, `Update` or `Upsert`.")] public List? ExcludeColumns { get; set; } @@ -180,28 +179,28 @@ public class StoredProcedureConfig : ConfigBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("parameters", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("parameters")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Parameter` collection.")] public List? Parameters { get; set; } /// /// Gets or sets the corresponding collection. /// - [JsonProperty("where", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("where")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Where` collection.")] public List? Where { get; set; } /// /// Gets or sets the corresponding collection. /// - [JsonProperty("orderby", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("orderby")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `OrderBy` collection.")] public List? OrderBy { get; set; } /// /// Gets or sets the corresponding collection. /// - [JsonProperty("execute", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("execute")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Execute` collection.")] public List? Execute { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Database/TableConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/TableConfig.cs index 4d0b896ea..850621de3 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/TableConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/TableConfig.cs @@ -1,13 +1,13 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef using DbEx.DbSchema; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -15,7 +15,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the table configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Table", Title = "'Table' object (entity-driven)", Description = "The `Table` object identifies an existing database `Table` (or `View`) and defines its code-generation characteristics.", Markdown = @"The columns for the table (or view) are inferred from the database schema definition. The `IncludeColumns` and `ExcludeColumns` provide a shorthand to include or exclude selected columns from all the `StoredProcedure` children. A table can be defined more that once to enable different column configurations as required. @@ -66,14 +65,14 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the name of the `Table` (or `View`) in the database. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The name of the `Table` in the database.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the name of the `Schema` where the `Table` is defined in the database. /// - [JsonProperty("schema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("schema")] [CodeGenProperty("Key", Title = "The name of the `Schema` where the `Table` is defined in the database.", IsImportant = true, Description = "Defaults to `CodeGeneration.Schema`.")] public string? Schema { get; set; } @@ -81,7 +80,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the `Schema.Table` alias name. /// - [JsonProperty("alias", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("alias")] [CodeGenProperty("Key", Title = "The `Schema.Table` alias name.", Description = "Will automatically default where not specified.")] public string? Alias { get; set; } @@ -93,7 +92,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` names to be included in the underlying generated output. /// - [JsonProperty("includeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("includeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be included in the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates that all `Columns` are to be included.")] public List? IncludeColumns { get; set; } @@ -101,7 +100,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` names to be excluded from the underlying generated output. /// - [JsonProperty("excludeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` names to be excluded from the underlying generated output.", IsImportant = true, Description = "Where not specified this indicates no `Columns` are to be excluded.")] public List? ExcludeColumns { get; set; } @@ -109,7 +108,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` and `Alias` pairs to enable column renaming. /// - [JsonProperty("aliasColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("aliasColumns")] [CodeGenPropertyCollection("Columns", Title = "The list of `Column` and `Alias` pairs (split by a `^` lookup character) to enable column aliasing/renaming.", IsImportant = true, Description = "Each alias value should be formatted as `Column` + `^` + `Alias`; e.g. `PCODE^ProductCode`.")] public List? AliasColumns { get; set; } @@ -121,14 +120,14 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Indicates whether a `Get` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("get", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("get")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Get` stored procedure is to be automatically generated where not otherwise explicitly specified.")] public bool? Get { get; set; } /// /// Indicates whether a `GetAll` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("getAll", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("getAll")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `GetAll` stored procedure is to be automatically generated where not otherwise explicitly specified.", Description = "The `GetAllOrderBy` is used to specify the `GetAll` query sort order.")] public bool? GetAll { get; set; } @@ -136,7 +135,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the list of `Column` names (including sort order `ASC`/`DESC` literal) to be used as the `GetAll` query sort order. /// - [JsonProperty("getAllOrderBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("getAllOrderBy")] [CodeGenPropertyCollection("CodeGen", Title = "The list of `Column` names (including sort order `ASC`/`DESC` literal) to be used as the `GetAll` query sort order.", Description = "This relates to the `GetAll` selection.")] public List? GetAllOrderBy { get; set; } @@ -144,35 +143,35 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Indicates whether a `Create` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("create", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("create")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Create` stored procedure is to be automatically generated where not otherwise explicitly specified.")] public bool? Create { get; set; } /// /// Indicates whether a `Update` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("update", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("update")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Update` stored procedure is to be automatically generated where not otherwise explicitly specified.")] public bool? Update { get; set; } /// /// Indicates whether a `Upsert` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("upsert", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("upsert")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Upsert` stored procedure is to be automatically generated where not otherwise explicitly specified.")] public bool? Upsert { get; set; } /// /// Indicates whether a `Delete` stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("delete", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("delete")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Delete` stored procedure is to be automatically generated where not otherwise explicitly specified.")] public bool? Delete { get; set; } /// /// Indicates whether a `Merge` (insert/update/delete of `Udt` list) stored procedure is to be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("merge", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("merge")] [CodeGenProperty("CodeGen", Title = "Indicates whether a `Merge` (insert/update/delete of `Udt` list) stored procedure is to be automatically generated where not otherwise explicitly specified.", Description = "This will also require a `Udt` (SQL User Defined Table) and `Tvp` (.NET Table-Valued Parameter) to function.")] public bool? Merge { get; set; } @@ -184,7 +183,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Indicates whether an `Entity Framework` .NET (C#) model is to be generated. /// - [JsonProperty("efModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("efModel")] [CodeGenProperty("EntityFramework", Title = "Indicates whether an `Entity Framework` .NET (C#) model is to be generated.", Description = "Defaults to `CodeGeneration.EfModel`.")] public bool? EfModel { get; set; } @@ -192,7 +191,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the .NET (C#) EntityFramework (EF) model name. /// - [JsonProperty("efModelName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("efModelName")] [CodeGenProperty("EntityFramework", Title = "The .NET (C#) EntityFramework (EF) model name.", Description = "Defaults to `Name` applying the `CodeGeneration.AutoDotNetRename`.")] public string? EfModelName { get; set; } @@ -204,14 +203,14 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Indicates whether a `User Defined Table (UDT)` type should be created. /// - [JsonProperty("udt", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("udt")] [CodeGenProperty("UDT", Title = "Indicates whether a `User Defined Table (UDT)` type should be created.", IsImportant = true)] public bool? Udt { get; set; } /// /// Gets or sets the list of `Column` names to be excluded from the `User Defined Table (UDT)`. /// - [JsonProperty("udtExcludeColumns", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("udtExcludeColumns")] [CodeGenPropertyCollection("UDT", Title = "The list of `Column` names to be excluded from the `User Defined Table (UDT)`.", Description = "Where not specified this indicates that no `Columns` are to be excluded.")] public List? UdtExcludeColumns { get; set; } @@ -219,7 +218,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the name of the .NET entity associated with the `Udt` so that it can be expressed (created) as a Table-Valued Parameter for usage within the corresponding `DbMapper`. /// - [JsonProperty("tvp", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("tvp")] [CodeGenProperty("UDT", Title = "The name of the .NET entity associated with the `Udt` so that it can be expressed (created) as a Table-Valued Parameter for usage within the corresponding `DbMapper`.", IsImportant = true)] public string? Tvp { get; set; } @@ -230,14 +229,14 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the permission (prefix) to be used for security permission checking (suffix defaults to `Read`, `Write` or `Delete` and can be overridden in the underlying stored procedure). /// - [JsonProperty("permission", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("permission")] [CodeGenProperty("Auth", Title = "The permission (prefix) to be used for security permission checking (suffix defaults to `Read`, `Write` or `Delete` and can be overridden in the underlying stored procedure).", IsImportant = true)] public string? Permission { get; set; } /// /// Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set. /// - [JsonProperty("orgUnitImmutable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("orgUnitImmutable")] [CodeGenProperty("Auth", Title = "Indicates whether the `OrgUnitId` column is considered immutable, in that it can not be changed once set.", IsImportant = true, Description = "Defaults to `CodeGeneration.OrgUnitImmutable`. This is only applicable for stored procedures.")] public bool? OrgUnitImmutable { get; set; } @@ -249,7 +248,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `IsDeleted` capability. /// - [JsonProperty("columnNameIsDeleted", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameIsDeleted")] [CodeGenProperty("Infer", Title = "The column name for the `IsDeleted` capability.", Description = "Defaults to `CodeGeneration.IsDeleted`.")] public string? ColumnNameIsDeleted { get; set; } @@ -257,7 +256,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `TenantId` capability. /// - [JsonProperty("columnNameTenantId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameTenantId")] [CodeGenProperty("Infer", Title = "The column name for the `TenantId` capability.", Description = "Defaults to `CodeGeneration.TenantId`.")] public string? ColumnNameTenantId { get; set; } @@ -265,7 +264,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `OrgUnitId` capability. /// - [JsonProperty("columnNameOrgUnitId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameOrgUnitId")] [CodeGenProperty("Infer", Title = "The column name for the `OrgUnitId` capability.", Description = "Defaults to `CodeGeneration.OrgUnitId`.")] public string? ColumnNameOrgUnitId { get; set; } @@ -273,7 +272,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `RowVersion` capability. /// - [JsonProperty("columnNameRowVersion", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameRowVersion")] [CodeGenProperty("Infer", Title = "The column name for the `RowVersion` capability.", Description = "Defaults to `CodeGeneration.RowVersion`.")] public string? ColumnNameRowVersion { get; set; } @@ -281,7 +280,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `CreatedBy` capability. /// - [JsonProperty("columnNameCreatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedBy` capability.", Description = "Defaults to `CodeGeneration.CreatedBy`.")] public string? ColumnNameCreatedBy { get; set; } @@ -289,7 +288,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `CreatedDate` capability. /// - [JsonProperty("columnNameCreatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameCreatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `CreatedDate` capability.", Description = "Defaults to `CodeGeneration.CreatedDate`.")] public string? ColumnNameCreatedDate { get; set; } @@ -297,7 +296,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `UpdatedBy` capability. /// - [JsonProperty("columnNameUpdatedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedBy")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameUpdatedBy { get; set; } @@ -305,7 +304,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `UpdatedDate` capability. /// - [JsonProperty("columnNameUpdatedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameUpdatedDate")] [CodeGenProperty("Infer", Title = "The column name for the `UpdatedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameUpdatedDate { get; set; } @@ -313,7 +312,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `DeletedBy` capability. /// - [JsonProperty("columnNameDeletedBy", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedBy")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedBy` capability.", Description = "Defaults to `CodeGeneration.UpdatedBy`.")] public string? ColumnNameDeletedBy { get; set; } @@ -321,7 +320,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the column name for the `DeletedDate` capability. /// - [JsonProperty("columnNameDeletedDate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("columnNameDeletedDate")] [CodeGenProperty("Infer", Title = "The column name for the `DeletedDate` capability.", Description = "Defaults to `CodeGeneration.UpdatedDate`.")] public string? ColumnNameDeletedDate { get; set; } @@ -333,7 +332,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the corresponding collection. /// - [JsonProperty("storedProcedures", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("storedProcedures")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `StoredProcedure` collection.", Markdown = "A `StoredProcedure` object defines the stored procedure code-generation characteristics.")] public List? StoredProcedures { get; set; } @@ -341,7 +340,7 @@ public class TableConfig : ConfigBase, ITableRefer /// /// Gets or sets the corresponding collection. /// - [JsonProperty("relationships", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("relationships")] [CodeGenPropertyCollection("Collections", Title = "The corresponding Entity Frameworrk (EF) `Relationship` collection.", Markdown = "A `Relationship` object defines an Entity Frameworrk (EF) relationship between parent and child tables.")] public List? Relationships { get; set; } @@ -486,7 +485,7 @@ protected override async Task PrepareAsync() Schema = DefaultWhereNull(Schema, () => Parent!.Schema); DbTable = Root!.DbTables!.Where(x => x.Name == Name && x.Schema == Schema).SingleOrDefault(); if (DbTable == null) - throw new CodeGenException(this, nameof(Name), $"Specified Schema.Table '{Root.FormatSchemaTableName(Schema, Name)}' not found in database."); + throw new CodeGenException(this, nameof(Name), $"Specified Schema.Table '{CodeGenConfig.FormatSchemaTableName(Schema, Name)}' not found in database."); Alias = DefaultWhereNull(Alias, () => new string(StringConverter.ToSentenceCase(Name)!.Split(' ').Select(x => x[..1].ToLower(System.Globalization.CultureInfo.InvariantCulture).ToCharArray()[0]).ToArray())); EfModel = DefaultWhereNull(EfModel, () => Parent!.EfModel); diff --git a/tools/Beef.CodeGen.Core/Config/Database/WhereConfig.cs b/tools/Beef.CodeGen.Core/Config/Database/WhereConfig.cs index 51863dffc..dfc56d17e 100644 --- a/tools/Beef.CodeGen.Core/Config/Database/WhereConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Database/WhereConfig.cs @@ -1,7 +1,7 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp.Config; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Database @@ -9,7 +9,6 @@ namespace Beef.CodeGen.Config.Database /// /// Represents the stored procedure where statement configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Where", Title = "'Where' object (database-driven)", Description = "The `Where` object defines an additional where `Statement` to be added. This is in addition to those automatically added based on the `StoredProcedure.Type`.", ExampleMarkdown = @"A YAML example is as follows: @@ -40,7 +39,7 @@ public class WhereConfig : ConfigBase /// /// Gets or sets the where statement (TSQL). /// - [JsonProperty("statement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("statement")] [CodeGenProperty("Key", Title = "The where statement (TSQL).", IsMandatory = true, IsImportant = true)] public string? Statement { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/CodeGenConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/CodeGenConfig.cs index b92f62e44..445d1d6d7 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/CodeGenConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/CodeGenConfig.cs @@ -2,12 +2,12 @@ using CoreEx.Entities.Extended; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -48,7 +48,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether to use Results. /// - [JsonProperty("withResult", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("withResult")] [CodeGenProperty("DotNet", Title = "Indicates whether to use `CoreEx.Results` (aka Railway-oriented programming).", Description = "Defaults to `true`. This can be overridden within the `Entity`(s) and/or `Operation`(s).")] public bool? WithResult { get; set; } @@ -56,7 +56,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether to use preprocessor directives in the generated output. /// - [JsonProperty("preprocessorDirectives", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("preprocessorDirectives")] [CodeGenProperty("DotNet", Title = "Indicates whether to use preprocessor directives in the generated output.")] public bool? PreprocessorDirectives { get; set; } @@ -67,7 +67,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the namespace for the Reference Data entities (adds as a c# using statement). /// - [JsonProperty("refDataNamespace", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataNamespace")] [CodeGenProperty("RefData", Title = "The namespace for the Reference Data entities (adds as a c# `using` statement).", IsImportant = true, Description = "Defaults to `Company` + `.` (literal) + AppName + `.Business.Entities` (literal).")] public string? RefDataNamespace { get; set; } @@ -75,7 +75,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the namespace for the Reference Data common entities (adds as a c# using statement). /// - [JsonProperty("refDataCommonNamespace", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataCommonNamespace")] [CodeGenProperty("RefData", Title = "The namespace for the Reference Data common entities (adds as a c# `using` statement).", IsImportant = true, Description = "Defaults to `Company` + `.` (literal) + AppName + `.Common.Entities` (literal).")] public string? RefDataCommonNamespace { get; set; } @@ -83,7 +83,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether a corresponding text property is added by default when generating a Reference Data `Property` for an `Entity`. /// - [JsonProperty("refDataText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataText")] [CodeGenProperty("RefData", Title = "Indicates whether a corresponding `Text` property is added when generating a Reference Data `Property` for an `Entity`.", IsImportant = true, Description = "This is used where serializing within the Web API `Controller` and the `ExecutionContext.IsRefDataTextSerializationEnabled` is set to `true` (which is automatically set where the url contains `$text=true`). This can be further configured on the `Entity` and for each `Property`.")] public bool? RefDataText { get; set; } @@ -91,7 +91,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data identifier Type option. /// - [JsonProperty("refDataType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataType")] [CodeGenProperty("RefData", Title = "The Reference Data identifier Type option.", IsImportant = true, Options = new string[] { "int", "long", "Guid", "string" }, 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.")] public string? RefDataType { get; set; } @@ -99,14 +99,14 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the RouteAtttribute for the Reference Data Web API controller required for named pre-fetching. /// - [JsonProperty("refDataWebApiRoute", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataWebApiRoute")] [CodeGenProperty("RefData", Title = "The `RouteAtttribute` for the Reference Data Web API controller required for named pre-fetching. The `WebApiRoutePrefix` will be prepended where specified.", IsImportant = true)] public string? RefDataWebApiRoute { get; set; } /// /// Gets or sets the list of extended (non-inferred) Dependency Injection (DI) parameters for the generated `ReferenceDataData` constructor. /// - [JsonProperty("refDataDataCtorParams", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataDataCtorParams")] [CodeGenPropertyCollection("Data", Title = "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated `ReferenceDataData` constructor.", Description = "Each constructor parameter should be formatted as `Type` + `^` + `Name`; e.g. `IConfiguration^Config`. Where the `Name` portion is not specified it will be inferred. " + "Where the `Type` matches an already inferred value it will be ignored.")] @@ -119,7 +119,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Get or sets the JSON Serializer to use for JSON property attribution. /// - [JsonProperty("jsonSerializer", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("jsonSerializer")] [CodeGenProperty("Entity", Title = "The JSON Serializer to use for JSON property attribution.", Options = new string[] { "SystemText", "Newtonsoft" }, Description = "Defaults to `SystemText`. This can be overridden within the `Entity`(s).")] public string? JsonSerializer { get; set; } @@ -127,7 +127,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default JSON name for the ETag property. /// - [JsonProperty("etagJsonName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("etagJsonName")] [CodeGenProperty("Entity", Title = "The default JSON name for the `ETag` property.", Options = new string[] { "etag", "eTag", "_etag", "_eTag", "ETag", "ETAG" }, Description = "Defaults to `etag`. Note that the `JsonName` can be set individually per property where required.")] public string? ETagJsonName { get; set; } @@ -135,7 +135,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the additional Namespace using statement to the added to the generated Entity code. /// - [JsonProperty("usingNamespace1", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("usingNamespace1")] [CodeGenProperty("Entity", Title = "The additional Namespace using statement to be added to the generated `Entity` code.", Description = "Typically used where referening a `Type` from a Namespace that is not generated by default.")] public string? UsingNamespace1 { get; set; } @@ -143,7 +143,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the additional Namespace using statement to the added to the generated Entity code. /// - [JsonProperty("usingNamespace2", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("usingNamespace2")] [CodeGenProperty("Entity", Title = "The additional Namespace using statement to be added to the generated `Entity` code.", Description = "Typically used where referening a `Type` from a Namespace that is not generated by default.")] public string? UsingNamespace2 { get; set; } @@ -151,7 +151,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the additional Namespace using statement to the added to the generated Entity code. /// - [JsonProperty("usingNamespace3", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("usingNamespace3")] [CodeGenProperty("Entity", Title = "The additional Namespace using statement to be added to the generated `Entity` code.", Description = "Typically used where referening a `Type` from a Namespace that is not generated by default.")] public string? UsingNamespace3 { get; set; } @@ -163,7 +163,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the authorize attribute value to be used for the corresponding entity Web API controller; generally either Authorize or AllowAnonynous. /// - [JsonProperty("webApiAuthorize", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAuthorize")] [CodeGenProperty("WebApi", Title = "The authorize attribute value to be used for the corresponding entity Web API controller; generally either `Authorize` or `AllowAnonymous`.", Description = "This can be overridden within the `Entity`(s) and/or their corresponding `Operation`(s).")] public string? WebApiAuthorize { get; set; } @@ -171,7 +171,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether the HTTP Response Location Header route (`Operation.WebApiLocation`)` is automatically inferred. /// - [JsonProperty("webApiAutoLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAutoLocation")] [CodeGenProperty("WebApi", Title = "Indicates whether the HTTP Response Location Header route (`Operation.WebApiLocation`) is automatically inferred.", Description = "This will automatically set the `Operation.WebApiLocation` for an `Operation` named `Create` where there is a corresponding named `Get`. This can be overridden within the `Entity`(s).")] public bool? WebApiAutoLocation { get; set; } @@ -179,7 +179,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the RoutePrefixAtttribute for the corresponding entity Web API controller. /// - [JsonProperty("webApiRoutePrefix", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiRoutePrefix")] [CodeGenProperty("WebApi", Title = "The base (prefix) `URI` prepended to all `Operation.WebApiRoute` values.", IsImportant = true)] public string? WebApiRoutePrefix { get; set; } @@ -190,7 +190,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer. /// - [JsonProperty("managerCleanUp", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCleanUp")] [CodeGenProperty("Manager", Title = "Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer.", Description = "This can be overridden within the `Entity`(s) and `Operation`(s).")] public bool? ManagerCleanUp { get; set; } @@ -198,7 +198,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the `Validation` framework. /// - [JsonProperty("validationFramework", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validationFramework")] [CodeGenProperty("Manager", Title = "The `Validation` framework to use for the entity-based validation.", Options = new string[] { "CoreEx", "FluentValidation" }, Description = "Defaults to `CoreEx` (literal). This can be overridden within the `Entity`(s), `Operation`(s) and `Parameter`(s).")] public string? ValidationFramework { get; set; } @@ -210,7 +210,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the data source auto-implementation option. /// - [JsonProperty("autoImplement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoImplement")] [CodeGenProperty("Data", Title = "The data source auto-implementation option.", IsImportant = true, Options = new string[] { "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" }, Description = "Defaults to `None`. Indicates that the implementation for the underlying `Operations` 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 `AutoImplement` can be further specified/overridden per `Operation`.")] @@ -219,7 +219,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default .NET database interface name used where `Operation.AutoImplement` is `Database`. /// - [JsonProperty("databaseName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseName")] [CodeGenProperty("Database", Title = "The .NET database interface name (used where `Operation.AutoImplement` is `Database`).", IsImportant = true, Description = "Defaults to `IDatabase`. This can be overridden within the `Entity`(s).")] public string? DatabaseName { get; set; } @@ -227,7 +227,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default database schema name. /// - [JsonProperty("databaseSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseSchema")] [CodeGenProperty("Database", Title = "The default database schema name.", IsImportant = true, Description = "Defaults to `dbo`.")] public string? DatabaseSchema { get; set; } @@ -235,7 +235,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the database provider. /// - [JsonProperty("databaseProvider", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseProvider")] [CodeGenProperty("Database", Title = "The default database schema name.", IsImportant = true, Options = new string[] { "SqlServer", "MySQL" }, Description = "Defaults to `SqlServer`. Enables specific database provider functionality/formatting/etc. where applicable.")] public string? DatabaseProvider { get; set; } @@ -243,7 +243,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default .NET Entity Framework interface name used where `Operation.AutoImplement` is `EntityFramework`. /// - [JsonProperty("entityFrameworkName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkName")] [CodeGenProperty("EntityFramework", Title = "The .NET Entity Framework interface name used where `Operation.AutoImplement` is `EntityFramework`.", Description = "Defaults to `IEfDb`. This can be overridden within the `Entity`(s).")] public string? EntityFrameworkName { get; set; } @@ -251,7 +251,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default .NET Cosmos interface name used where `Operation.AutoImplement` is `Cosmos`. /// - [JsonProperty("cosmosName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosName")] [CodeGenProperty("Cosmos", Title = "The .NET Entity Framework interface name used where `Operation.AutoImplement` is `Cosmos`.", IsImportant = true, Description = "Defaults to `ICosmosDb`. This can be overridden within the `Entity`(s).")] public string? CosmosName { get; set; } @@ -259,7 +259,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default .NET OData interface name used where `Operation.AutoImplement` is `OData`. /// - [JsonProperty("odataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataName")] [CodeGenProperty("OData", Title = "The .NET OData interface name used where `Operation.AutoImplement` is `OData`.", IsImportant = true, Description = "Defaults to `IOData`. This can be overridden within the `Entity`(s).")] public string? ODataName { get; set; } @@ -267,7 +267,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default .NET HTTP Agent interface name used where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentName")] [CodeGenProperty("HttpAgent", Title = "The default .NET HTTP Agent interface name used where `Operation.AutoImplement` is `HttpAgent`.", IsImportant = true, Description = "Defaults to `IHttpAgent`. This can be overridden within the `Entity`(s).")] public string? HttpAgentName { get; set; } @@ -275,7 +275,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default ETag to/from RowVersion Mapping Converter used. /// - [JsonProperty("etagDefaultMapperConverter", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("etagDefaultMapperConverter")] [CodeGenProperty("Data", Title = "The default ETag to/from RowVersion column Mapping Converter used where `Operation.AutoImplement` is `Database` or `EntityFramework`.", IsImportant = true, Description = "Defaults to `StringToBase64Converter`.")] public string? ETagDefaultMapperConverter { get; set; } @@ -283,7 +283,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the default Reference Data property Converter used by the generated Mapper(s) where not specifically defined. /// - [JsonProperty("refDataDefaultMapperConverter", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataDefaultMapperConverter")] [CodeGenProperty("Data", Title = "The default Reference Data property `Converter` used by the generated `Mapper`(s) where not specifically defined.", Options = new string[] { "ReferenceDataCodeConverter", "ReferenceDataCodeConverter{T}", "ReferenceDataCodeConverter", @@ -302,7 +302,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data code data name /// - [JsonProperty("refDataCodeDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataCodeDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `Code` data name.", Description = "Defaults to `Code` (literal).")] public string? RefDataCodeDataName { get; set; } @@ -310,7 +310,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data text data name. /// - [JsonProperty("refDataTextDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataTextDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `Text` data name.", Description = "Defaults to `Text` (literal).")] public string? RefDataTextDataName { get; set; } @@ -318,7 +318,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data is active name. /// - [JsonProperty("refDataIsActiveDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataIsActiveDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `IsActive` data name.", Description = "Defaults to `IsActive` (literal).")] public string? RefDataIsActiveDataName { get; set; } @@ -326,7 +326,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data sort order data name. /// - [JsonProperty("refDataSortOrderDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataSortOrderDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `SortOrder` data name.", Description = "Defaults to `SortOrder` (literal).")] public string? RefDataSortOrderDataName { get; set; } @@ -334,7 +334,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Reference Data is ETag name. /// - [JsonProperty("refDataETagDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataETagDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `ETag` data name.", Description = "Defaults to `RowVersion` (literal).")] public string? RefDataETagDataName { get; set; } = "*"; @@ -346,7 +346,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the layer to add logic to publish an event for a Create, Update or Delete operation. /// - [JsonProperty("eventPublish", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventPublish")] [CodeGenProperty("Events", Title = "The layer to add logic to publish an event for a `Create`, `Update` or `Delete` operation.", IsImportant = true, Options = new string[] { "None", "DataSvc", "Data" }, Description = "Defaults to `DataSvc`. Used to enable the sending of messages to the likes of EventHub, ServiceBus, SignalR, etc. This can be overridden within the `Entity`(s).")] public string? EventPublish { get; set; } @@ -354,7 +354,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the URI root for the event source by prepending to all event source URIs. /// - [JsonProperty("eventSourceRoot", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSourceRoot")] [CodeGenProperty("Events", Title = "The URI root for the event source by prepending to all event source URIs.", Description = "The event source is only updated where an `EventSourceKind` is not `None`. This can be extended within the `Entity`(s).")] public string? EventSourceRoot { get; set; } @@ -362,7 +362,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the URI kind for the event source URIs. /// - [JsonProperty("eventSourceKind", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSourceKind")] [CodeGenProperty("Events", Title = "The URI kind for the event source URIs.", Options = new string[] { "None", "Absolute", "Relative", "RelativeOrAbsolute" }, Description = "Defaults to `None` (being the event source is not updated).")] public string? EventSourceKind { get; set; } @@ -370,7 +370,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the root for the event Subject name by prepending to all event subject names. /// - [JsonProperty("eventSubjectRoot", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSubjectRoot")] [CodeGenProperty("Events", Title = "The root for the event Subject name by prepending to all event subject names.", IsImportant = true, Description = "Used to enable the sending of messages to the likes of EventHub, ServiceBus, SignalR, etc. This can be overridden within the `Entity`(s).")] public string? EventSubjectRoot { get; set; } @@ -378,7 +378,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the subject path separator. /// - [JsonProperty("eventSubjectSeparator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSubjectSeparator")] [CodeGenProperty("Event", Title = "The subject path separator.", Description = "Defaults to `.`. Used only where the subject is automatically inferred.")] public string? EventSubjectSeparator { get; set; } @@ -386,7 +386,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the formatting for the Action when an Event is published. /// - [JsonProperty("eventActionFormat", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventActionFormat")] [CodeGenProperty("Event", Title = "The formatting for the Action when an Event is published.", Options = new string[] { "None", "PastTense" }, IsImportant = true, Description = "Defaults to `None` (no formatting required, i.e. as-is)`.")] public string? EventActionFormat { get; set; } @@ -394,7 +394,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether a `System.TransactionScope` should be created and orchestrated at the `DataSvc`-layer whereever generating event publishing logic. /// - [JsonProperty("eventTransaction", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventTransaction")] [CodeGenProperty("Event", Title = "Indicates whether a `System.TransactionScope` should be created and orchestrated at the `DataSvc`-layer whereever generating event publishing logic.", IsImportant = true, Description = "Usage will force a rollback of any underlying data transaction (where the provider supports TransactionScope) on failure, such as an `EventPublish` 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. " + @@ -408,7 +408,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Indicates whether gRPC support (more specifically service-side) is required. /// - [JsonProperty("grpc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpc")] [CodeGenProperty("gRPC", Title = "Indicates whether gRPC support (more specifically service-side) is required.", IsImportant = true, Description = "gRPC support is an explicit opt-in model. Must be set to `true` for any of the subordinate gRPC capabilities to be code-generated. Will require each `Entity`, and corresponding `Property` and `Operation` to be opted-in specifically.")] public bool? Grpc { get; set; } @@ -420,7 +420,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the base path (directory) prefix for the artefacts. /// - [JsonProperty("pathBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathBase")] [CodeGenProperty("Path", Title = "The base path (directory) prefix for the artefacts; other `Path*` properties append to this value when they are not specifically overridden.", Description = "Defaults to `Company` (runtime parameter) + `.` + `AppName` (runtime parameter). For example `Beef.Demo`.")] public string? PathBase { get; set; } @@ -428,7 +428,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the path (directory) for the Common-related artefacts. /// - [JsonProperty("pathCommon", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathCommon")] [CodeGenProperty("Path", Title = "The path (directory) for the Database-related artefacts.", Description = "Defaults to `PathBase` + `.Common` (literal). For example `Beef.Demo.Common`.")] public string? PathCommon { get; set; } @@ -436,7 +436,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the path (directory) for the Business-related (.NET) artefacts. /// - [JsonProperty("pathBusiness", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathBusiness")] [CodeGenProperty("Path", Title = "The path (directory) for the Business-related (.NET) artefacts.", Description = "Defaults to `PathBase` + `.Business` (literal). For example `Beef.Demo.Business`.")] public string? PathBusiness { get; set; } @@ -444,7 +444,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the path (directory) for the API-related (.NET) artefacts. /// - [JsonProperty("pathApi", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("pathApi")] [CodeGenProperty("Path", Title = "The path (directory) for the API-related (.NET) artefacts.", Description = "Defaults to `PathBase` + `.` + `ApiName` (runtime parameter). For example `Beef.Demo.Api`.")] public string? PathApi { get; set; } @@ -456,7 +456,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the base Namespace (root) for the .NET artefacts. /// - [JsonProperty("namespaceBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceBase")] [CodeGenProperty("Namespace", Title = "The base Namespace (root) for the .NET artefacts.", Description = "Defaults to `Company` (runtime parameter) + `.` + `AppName` (runtime parameter). For example `Beef.Demo`.")] public string? NamespaceBase { get; set; } @@ -464,7 +464,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Namespace (root) for the Common-related .NET artefacts. /// - [JsonProperty("namespaceCommon", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceCommon")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Common-related .NET artefacts.", Description = "Defaults to `NamespaceBase` + `.Common` (literal). For example `Beef.Demo.Common`.")] public string? NamespaceCommon { get; set; } @@ -472,7 +472,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Namespace (root) for the Business-related .NET artefacts. /// - [JsonProperty("namespaceBusiness", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceBusiness")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Business-related .NET artefacts.", Description = "Defaults to `NamespaceBase` + `.Business` (literal). For example `Beef.Demo.Business`.")] public string? NamespaceBusiness { get; set; } @@ -480,7 +480,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the Namespace (root) for the Api-related .NET artefacts. /// - [JsonProperty("namespaceApi", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespaceApi")] [CodeGenProperty("Namespace", Title = "The Namespace (root) for the Api-related .NET artefacts.", Description = "Defaults to `NamespaceBase` + `.` + `ApiName` (runtime parameter). For example `Beef.Demo.Api`.")] public string? NamespaceApi { get; set; } @@ -490,7 +490,7 @@ public class CodeGenConfig : ConfigRootBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("entities", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entities")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Entity` collection.", IsImportant = true, Markdown = "An `Entity` object provides the primary configuration for an entity, its properties and operations.")] public List? Entities { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/ConstConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/ConstConfig.cs index 2e292b850..403cca9d0 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/ConstConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/ConstConfig.cs @@ -1,8 +1,8 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp.Config; using OnRamp.Utility; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -10,7 +10,6 @@ namespace Beef.CodeGen.Config.Entity /// /// Represents the Const code-generation configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Const", Title = "'Const' object (entity-driven)", Description = "The `Const` object is used to define a .NET (C#) constant value for an `Entity`.", ExampleMarkdown = @"A YAML configuration example is as follows: @@ -32,14 +31,14 @@ public class ConstConfig : ConfigBase /// /// Gets or sets the unique constant name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The unique constant name.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the C# code for the constant value. /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("value")] [CodeGenProperty("Key", Title = "The .NET (C#) code for the constant value.", IsMandatory = true, IsImportant = true, Description = "The code generation will ensure the value is delimited properly to output correctly formed (delimited) .NET (C#) code.")] public string? Value { get; set; } @@ -47,7 +46,7 @@ public class ConstConfig : ConfigBase /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("text")] [CodeGenProperty("Key", Title = "The overriding text for use in comments.", Description = "By default the `Text` will be the `Name` reformatted as sentence casing. It will be formatted as: `Represents a {text} constant value.` To create a `` within use moustache shorthand (e.g. `{{Xxx}}`).")] public string? Text { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs index 9f62f7be4..cea79c40e 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs @@ -3,13 +3,13 @@ using CoreEx.Caching; using CoreEx.Entities; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -17,7 +17,6 @@ namespace Beef.CodeGen.Config.Entity /// /// Represents the Entity code-generation configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Entity", Title = "'Entity' object (entity-driven)", Description = "The `Entity` is used as the primary configuration for driving the entity-driven code generation.", ExampleMarkdown = @"A YAML configuration [example](../samples/My.Hr/My.Hr.CodeGen/entity.beef.yaml) for a _standard_ entity is as follows: @@ -66,14 +65,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the unique entity name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The unique entity name.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("text")] [CodeGenProperty("Key", Title = "The overriding text for use in comments.", Description = "Overrides the Name (as sentence text) for the summary comments. It will be formatted as: `Represents the {Text} entity.`. To create a `` within use moustache shorthand (e.g. {{Xxx}}).")] public string? Text { get; set; } @@ -81,7 +80,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the overriding file name. /// - [JsonProperty("fileName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("fileName")] [CodeGenProperty("Key", Title = "The overriding file name.", Description = "Overrides the Name as the code-generated file name.")] public string? FileName { get; set; } @@ -89,7 +88,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the overriding private name. /// - [JsonProperty("privateName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("privateName")] [CodeGenProperty("Key", Title = "The overriding private name.", Description = "Overrides the `Name` to be used for private fields. By default reformatted from `Name`; e.g. `FirstName` as `_firstName`.")] public string? PrivateName { get; set; } @@ -97,7 +96,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the overriding argument name. /// - [JsonProperty("argumentName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("argumentName")] [CodeGenProperty("Key", Title = "The overriding argument name.", Description = "Overrides the `Name` to be used for argument parameters. By default reformatted from `Name`; e.g. `FirstName` as `firstName`.")] public string? ArgumentName { get; set; } @@ -105,7 +104,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Const Type option. /// - [JsonProperty("constType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("constType")] [CodeGenProperty("Key", Title = "The Const .NET Type option.", Options = new string[] { "int", "long", "Guid", "string" }, Description = "The .NET Type to be used for the `const` values. Defaults to `string`.")] public string? ConstType { get; set; } @@ -113,7 +112,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether to override the property. /// - [JsonProperty("isInitialOverride", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("isInitialOverride")] [CodeGenProperty("Key", Title = "Indicates whether to override the `IInitial.IsInitial` property.", Description = "Set to either `true` or `false` to override as specified; otherwise, `null` to check each property. Defaults to `null`.")] public bool? IsInitialOverride { get; set; } @@ -121,7 +120,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether to use Results. /// - [JsonProperty("withResult", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("withResult")] [CodeGenProperty("Key", Title = "Indicates whether to use `CoreEx.Results` (aka Railway-oriented programming).", Description = "Defaults to `CodeGeneration.WithResult`. This can be overridden within the Operation`(s).")] public bool? WithResult { get; set; } @@ -133,7 +132,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data identifier Type option. /// - [JsonProperty("refDataType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataType")] [CodeGenProperty("RefData", Title = "The Reference Data identifier Type option.", IsImportant = true, Options = new string[] { "int", "long", "Guid", "string" }, Description = "Required to identify an entity as being Reference Data. Specifies the underlying .NET Type used for the Reference Data identifier.")] public string? RefDataType { get; set; } @@ -141,7 +140,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether a corresponding text property is added when generating a Reference Data property overriding the CodeGeneration.RefDataText selection. /// - [JsonProperty("refDataText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataText")] [CodeGenProperty("RefData", Title = "Indicates whether a corresponding `Text` property is added when generating a Reference Data `Property` overriding the `CodeGeneration.RefDataText` selection.", Description = "This is used where serializing within the Web API`Controller` and the `ExecutionContext.IsRefDataTextSerializationEnabled` is set to `true` (which is automatically set where the url contains `$text=true`). Defaults from `CodeGeneration.RefDataText`.")] public bool? RefDataText { get; set; } @@ -149,7 +148,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data sort order option. /// - [JsonProperty("refDataSortOrder", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataSortOrder")] [CodeGenProperty("RefData", Title = "The Reference Data sort order option.", Options = new string[] { "SortOrder", "Id", "Code", "Text" }, Description = "Specifies the default sort order for the underlying Reference Data collection. Defaults to `SortOrder`.")] public string? RefDataSortOrder { get; set; } @@ -161,7 +160,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the base class that the entity inherits from. /// - [JsonProperty("inherits", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("inherits")] [CodeGenProperty("Entity", Title = "The base class that the entity inherits from.", Description = "Defaults to `EntityBase` for a standard entity. For Reference Data it will default to `ReferenceDataBaseEx` depending on the corresponding `RefDataType` value. " + "See `OmitEntityBase` if the desired outcome is to not inherit from any of the aforementioned base classes.")] @@ -170,14 +169,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the list of comma separated interfaces that are to be declared for the entity class. /// - [JsonProperty("implements", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("implements")] [CodeGenProperty("Entity", Title = "The list of comma separated interfaces that are to be declared for the entity class.")] public string? Implements { get; set; } /// /// Indicates whether to automatically infer the interface implements for the entity from the properties declared. /// - [JsonProperty("implementsAutoInfer", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("implementsAutoInfer")] [CodeGenProperty("Entity", Title = "Indicates whether to automatically infer the interface implements for the entity from the properties declared.", Description = "Will attempt to infer the following: `IIdentifier`, `IIdentifier`, `IIdentifier`, `IIdentifier`, `IETag` and `IChangeLog`. Defaults to `true`.")] public bool? ImplementsAutoInfer { get; set; } @@ -185,21 +184,21 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the class should be defined as abstract. /// - [JsonProperty("abstract", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("abstract")] [CodeGenProperty("Entity", Title = "Indicates whether the class should be defined as abstract.")] public bool? Abstract { get; set; } /// /// Indicates whether the class should be defined as a generic with a single parameter T. /// - [JsonProperty("genericWithT", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("genericWithT")] [CodeGenProperty("Entity", Title = "Indicates whether the class should be defined as a generic with a single parameter `T`.")] public bool? GenericWithT { get; set; } /// /// Gets or sets the entity namespace to be appended. /// - [JsonProperty("namespace", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("namespace")] [CodeGenProperty("Entity", Title = "The entity namespace to be appended.", Description = "Appended to the end of the standard structure as follows: `{Company}.{AppName}.Business.Entities.{Namespace}`.")] public string? Namespace { get; set; } @@ -207,7 +206,7 @@ public class EntityConfig : ConfigBase /// /// Indicates that the entity should not inherit from `EntityBase`. /// - [JsonProperty("omitEntityBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("omitEntityBase")] [CodeGenProperty("Entity", Title = "Indicates that the entity should not inherit from `EntityBase`.", Description = "As such any of the `EntityBase` related capabilites are not supported (are omitted from generation). The intention for this is more for the generation of simple internal entities.")] public bool? OmitEntityBase { get; set; } @@ -215,7 +214,7 @@ public class EntityConfig : ConfigBase /// /// Get or sets the JSON Serializer to use for JSON property attribution. /// - [JsonProperty("jsonSerializer", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("jsonSerializer")] [CodeGenProperty("Entity", Title = "The JSON Serializer to use for JSON property attribution.", Options = new string[] { "SystemText", "Newtonsoft" }, Description = "Defaults to the `CodeGeneration.JsonSerializer` configuration property where specified; otherwise, `SystemText`.")] public string? JsonSerializer { get; set; } @@ -223,7 +222,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the entity is for internal use only; declared in the Business entities only. /// - [JsonProperty("internalOnly", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("internalOnly")] [CodeGenProperty("Entity", Title = "Indicates whether the entity is for internal use only; declared in Business entities only.")] public bool? InternalOnly { get; set; } @@ -234,14 +233,14 @@ public class EntityConfig : ConfigBase /// /// Indicates whether a corresponding entity collection class should be created. /// - [JsonProperty("collection", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collection")] [CodeGenProperty("Collection", Title = "Indicates whether a corresponding entity collection class should be created.", IsImportant = true)] public bool? Collection { get; set; } /// /// Indicates whether a corresponding entity collection result class should be created /// - [JsonProperty("collectionResult", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collectionResult")] [CodeGenProperty("Collection", Title = "Indicates whether a corresponding entity collection result class should be created", IsImportant = true, Description = "Enables the likes of additional paging state to be stored with the underlying collection.")] public bool? CollectionResult { get; set; } @@ -249,14 +248,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the entity collection type used where is not specified. /// - [JsonProperty("collectionType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collectionType")] [CodeGenProperty("Collection", Title = "The entity collection type used where `CollectionInherits` is not specified.", Options = new string[] { "Standard", "Keyed", "Dictionary" })] public string? CollectionType { get; set; } /// /// Gets or sets the base class that a inherits from. /// - [JsonProperty("collectionInherits", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collectionInherits")] [CodeGenProperty("Collection", Title = "The base class that a `Collection` inherits from.", Description = "Defaults to `EntityBaseCollection` or `EntityBaseKeyedCollection` depending on `CollectionKeyed`. For Reference Data it will default to `ReferenceDataCollectionBase`.")] public string? CollectionInherits { get; set; } @@ -264,7 +263,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the base class that a inherits from. /// - [JsonProperty("collectionResultInherits", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("collectionResultInherits")] [CodeGenProperty("Collection", Title = "The base class that a `CollectionResult` inherits from.", Description = "Defaults to `EntityCollectionResult`.")] public string? CollectionResultInherits { get; set; } @@ -276,7 +275,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the key CRUDBA behaviors (operations) will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("behavior", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("behavior")] [CodeGenProperty("Operation", Title = "Defines the key CRUD-style behavior (operation types), being 'C'reate, 'G'et (or 'R'ead), 'U'pdate, 'P'atch and 'D'elete). Additionally, GetByArgs ('B') and GetAll ('A') operations that will be automatically generated where not otherwise explicitly specified.", Description = "Value may only specifiy one or more of the `CGRUDBA` characters (in any order) to define the automatically generated behavior (operations); for example: `CRUPD` or `CRUP` or `rba` (case insensitive). " + "This is shorthand for setting one or more of the following properties: `Get`, `GetByArgs`, `GetAll`, 'Create', `Update`, `Patch` and `Delete`. Where one of these properties is set to either `true` or `false` this will take precedence over the value set for `Behavior`.")] @@ -285,49 +284,49 @@ public class EntityConfig : ConfigBase /// /// Indicates that a `Get` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("get", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("get")] [CodeGenProperty("Operation", Title = "Indicates that a `Get` operation will be automatically generated where not otherwise explicitly specified.")] public bool? Get { get; set; } /// /// Indicates that a `GetByArgs` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("getByArgs", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("getByArgs")] [CodeGenProperty("Operation", Title = "Indicates that a `GetByArgs` operation will be automatically generated where not otherwise explicitly specified.")] public bool? GetByArgs { get; set; } /// /// Indicates that a `GetAll` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("getAll", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("getAll")] [CodeGenProperty("Operation", Title = "Indicates that a `GetAll` operation will be automatically generated where not otherwise explicitly specified.")] public bool? GetAll { get; set; } /// /// Indicates that a `Create` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("create", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("create")] [CodeGenProperty("Operation", Title = "Indicates that a `Create` operation will be automatically generated where not otherwise explicitly specified.")] public bool? Create { get; set; } /// /// Indicates that a `Update` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("update", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("update")] [CodeGenProperty("Operation", Title = "Indicates that a `Update` operation will be automatically generated where not otherwise explicitly specified.")] public bool? Update { get; set; } /// /// Indicates that a `Update` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("patch", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("patch")] [CodeGenProperty("Operation", Title = "Indicates that a `Patch` operation will be automatically generated where not otherwise explicitly specified.")] public bool? Patch { get; set; } /// /// Indicates that a `Delete` operation will be automatically generated where not otherwise explicitly specified. /// - [JsonProperty("delete", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("delete")] [CodeGenProperty("Operation", Title = "Indicates that a `Delete` operation will be automatically generated where not otherwise explicitly specified.")] public bool? Delete { get; set; } @@ -338,7 +337,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the data source auto-implementation option. /// - [JsonProperty("autoImplement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoImplement")] [CodeGenProperty("Data", Title = "The data source auto-implementation option.", IsImportant = true, Options = new string[] { "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" }, Description = "Defaults to `CodeGeneration.AutoImplement` (where `RefDataType` or `EntityFrameworkModel` or `CosmosModel` or `HttpAgent` is not null; otherwise, `None`. " + "Indicates that the implementation for the underlying `Operations` 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). " @@ -348,7 +347,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the access modifier for the generated `Data` constructor. /// - [JsonProperty("dataCtor", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataCtor")] [CodeGenProperty("Data", Title = "The access modifier for the generated `Data` constructor.", Options = new string[] { "Public", "Private", "Protected" }, Description = "Defaults to `Public`.")] public string? DataCtor { get; set; } @@ -356,7 +355,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the list of extended (non-inferred) Dependency Injection (DI) parameters for the generated `Data` constructor. /// - [JsonProperty("dataCtorParams", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataCtorParams")] [CodeGenPropertyCollection("Data", Title = "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated `Data` constructor.", Description = "Each constructor parameter should be formatted as `Type` + `^` + `Name`; e.g. `IConfiguration^Config`. Where the `Name` portion is not specified it will be inferred. " + "Where the `Type` matches an already inferred value it will be ignored.")] @@ -365,7 +364,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the `Data` extensions logic should be generated. /// - [JsonProperty("dataExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataExtensions")] [CodeGenProperty("Data", Title = "Indicates whether the `Data` extensions logic should be generated.", Description = "This can be overridden using `Operation.DataExtensions`.")] public bool? DataExtensions { get; set; } @@ -373,7 +372,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data identifier data name. /// - [JsonProperty("refDataIdDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataIdDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `Id` data name.", Description = "Defaults to `Name` + `Id` (literal).")] public string? RefDataIdDataName { get; set; } @@ -381,7 +380,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data code data name /// - [JsonProperty("refDataCodeDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataCodeDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `Code` data name.", Description = "Defaults to `Code` (literal).")] public string? RefDataCodeDataName { get; set; } @@ -389,7 +388,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data text data name. /// - [JsonProperty("refDataTextDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataTextDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `Text` data name.", Description = "Defaults to `Text` (literal).")] public string? RefDataTextDataName { get; set; } @@ -397,7 +396,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data is active name. /// - [JsonProperty("refDataIsActiveDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataIsActiveDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `IsActive` data name.", Description = "Defaults to `IsActive` (literal).")] public string? RefDataIsActiveDataName { get; set; } @@ -405,7 +404,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data sort order data name. /// - [JsonProperty("refDataSortOrderDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataSortOrderDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `SortOrder` data name.", Description = "Defaults to `SortOrder` (literal).")] public string? RefDataSortOrderDataName { get; set; } @@ -413,7 +412,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data is ETag name. /// - [JsonProperty("refDataETagDataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataETagDataName")] [CodeGenProperty("RefData", Title = "The Reference Data `ETag` data name.", Description = "Defaults to `RowVersion` (literal).")] public string? RefDataETagDataName { get; set; } @@ -421,7 +420,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Reference Data stored procedure name. /// - [JsonProperty("refDataStoredProcedureName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataStoredProcedureName")] [CodeGenProperty("RefData", Title = "The Reference Data database stored procedure name.", Description = "Defaults to `sp` (literal) + `Name` + `GetAll` (literal).")] public string? RefDataStoredProcedureName { get; set; } @@ -433,7 +432,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the .NET database interface name used where `AutoImplement` is `Database`. /// - [JsonProperty("databaseName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseName")] [CodeGenProperty("Database", Title = "The .NET database interface name (used where `AutoImplement` is `Database`).", IsImportant = true, Description = "Defaults to the `CodeGeneration.DatabaseName` configuration property (its default value is `IDatabase`).")] public string? DatabaseName { get; set; } @@ -441,7 +440,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the database schema name (used where `AutoImplement` is `Database`). /// - [JsonProperty("databaseSchema", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseSchema")] [CodeGenProperty("Database", Title = "The database schema name (used where `AutoImplement` is `Database`).", IsImportant = true, Description = "Defaults to `dbo`.")] public string? DatabaseSchema { get; set; } @@ -449,14 +448,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the name of the Mapper that the generated Database Mapper inherits from. /// - [JsonProperty("databaseMapperInheritsFrom", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseMapperInheritsFrom")] [CodeGenProperty("Database", Title = "The name of the `Mapper` that the generated Database `Mapper` inherits from.")] public string? DatabaseMapperInheritsFrom { get; set; } /// /// Indicates that a custom Database Mapper will be used; i.e. not generated. /// - [JsonProperty("databaseCustomerMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseCustomerMapper")] [CodeGenProperty("Database", Title = "Indicates that a custom Database `Mapper` will be used; i.e. not generated.", Description = "Otherwise, by default, a `Mapper` will be generated.")] public bool? DatabaseCustomMapper { get; set; } @@ -468,7 +467,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the .NET Entity Framework interface name used where `AutoImplement` is `EntityFramework`. /// - [JsonProperty("entityFrameworkName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkName")] [CodeGenProperty("EntityFramework", Title = "The .NET Entity Framework interface name used where `AutoImplement` is `EntityFramework`.", IsImportant = true, Description = "Defaults to `CodeGeneration.EntityFrameworkName`.")] public string? EntityFrameworkName { get; set; } @@ -476,14 +475,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding Entity Framework model name required where is EntityFramework. /// - [JsonProperty("entityFrameworkModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkModel")] [CodeGenProperty("EntityFramework", Title = "The corresponding Entity Framework model name (required where `AutoImplement` is `EntityFramework`).", IsImportant = true)] public string? EntityFrameworkModel { get; set; } /// /// Indicates that a custom Entity Framework `Mapper` will be used; i.e. not generated. /// - [JsonProperty("entityFrameworkCustomMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkCustomMapper")] [CodeGenProperty("EntityFramework", Title = "Indicates that a custom Entity Framework `Mapper` will be used; i.e. not generated.", Description = "Otherwise, by default, a `Mapper` will be generated.")] public bool? EntityFrameworkCustomMapper { get; set; } @@ -491,7 +490,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the EntityFramework data-layer name that should be used for base mappings. /// - [JsonProperty("entityFrameworkMapperBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkMapperBase")] [CodeGenProperty("EntityFramework", Title = "The EntityFramework data-layer name that should be used for base mappings.")] public string? EntityFrameworkMapperBase { get; set; } @@ -502,7 +501,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the .NET Cosmos interface name used where `AutoImplement` is `Cosmos`. /// - [JsonProperty("cosmosName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosName")] [CodeGenProperty("Cosmos", Title = "The .NET Cosmos interface name used where `AutoImplement` is `Cosmos`.", IsImportant = true, Description = "Defaults to the `CodeGeneration.CosmosName` configuration property (its default value is `ICosmosDb`).")] public string? CosmosName { get; set; } @@ -510,21 +509,21 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding Cosmos model name required where is Cosmos. /// - [JsonProperty("cosmosModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosModel")] [CodeGenProperty("Cosmos", Title = "The corresponding Cosmos model name (required where `AutoImplement` is `Cosmos`).", IsImportant = true)] public string? CosmosModel { get; set; } /// /// Gets or sets the Cosmos ContainerId required where is Cosmos. /// - [JsonProperty("cosmosContainerId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosContainerId")] [CodeGenProperty("Cosmos", Title = "The Cosmos `ContainerId` required where `AutoImplement` is `Cosmos`.", IsImportant = true)] public string? CosmosContainerId { get; set; } /// /// Gets or sets the C# code to be used for setting the optional Cosmos PartitionKey where is Cosmos. /// - [JsonProperty("cosmosPartitionKey", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosPartitionKey")] [CodeGenProperty("Cosmos", Title = "The C# code to be used for setting the optional Cosmos `PartitionKey` where `AutoImplement` is `Cosmos`.", Description = "The value `PartitionKey.None` can be specified. Literals will need to be quoted.")] public string? CosmosPartitionKey { get; set; } @@ -532,14 +531,14 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the CosmosDbValueContainer is to be used; otherwise, CosmosDbContainer. /// - [JsonProperty("cosmosValueContainer", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosValueContainer")] [CodeGenProperty("Cosmos", Title = "Indicates whether the `CosmosDbValueContainer` is to be used; otherwise, `CosmosDbContainer`.")] public bool? CosmosValueContainer { get; set; } /// /// Indicates that a custom Cosmos Mapper will be used; i.e. not generated. /// - [JsonProperty("cosmosCustomMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosCustomMapper")] [CodeGenProperty("Cosmos", Title = "Indicates that a custom Cosmos `Mapper` will be used; i.e. not generated.", Description = "Otherwise, by default, a `Mapper` will be generated.")] public bool? CosmosCustomMapper { get; set; } @@ -547,7 +546,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the Cosmos data-layer name that should be used for base mappings. /// - [JsonProperty("cosmosMapperBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosMapperBase")] [CodeGenProperty("Cosmos", Title = "The Cosmos data-layer name that should be used for base mappings.")] public string? CosmosMapperBase { get; set; } @@ -558,7 +557,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the .NET OData interface name used where `AutoImplement` is `OData`. /// - [JsonProperty("odataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataName")] [CodeGenProperty("OData", Title = "The .NET OData interface name used where `AutoImplement` is `OData`.", IsImportant = true, Description = "Defaults to the `CodeGeneration.ODataName` configuration property (its default value is `IOData`).")] public string? ODataName { get; set; } @@ -566,14 +565,14 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding OData model name required where is OData. /// - [JsonProperty("odataModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataModel")] [CodeGenProperty("OData", Title = "The corresponding OData model name (required where `AutoImplement` is `OData`).", IsImportant = true)] public string? ODataModel { get; set; } /// /// Gets or sets the name of the underlying OData collection name where is OData. /// - [JsonProperty("odataCollectionName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataCollectionName")] [CodeGenProperty("OData", Title = "The name of the underlying OData collection where `AutoImplement` is `OData`.", IsImportant = true, Description = "The underlying `Simple.OData.Client` will attempt to infer.")] public string? ODataCollectionName { get; set; } @@ -581,7 +580,7 @@ public class EntityConfig : ConfigBase /// /// Indicates that a custom OData Mapper will be used; i.e. not generated. /// - [JsonProperty("odataCustomMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataCustomMapper")] [CodeGenProperty("OData", Title = "Indicates that a custom OData `Mapper` will be used; i.e. not generated.", Description = "Otherwise, by default, a `Mapper` will be generated.")] public bool? ODataCustomMapper { get; set; } @@ -593,7 +592,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the default .NET HTTP Agent interface name used where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentName")] [CodeGenProperty("HttpAgent", Title = "The .NET HTTP Agent interface name used where `Operation.AutoImplement` is `HttpAgent`.", IsImportant = true, Description = "Defaults to `CodeGeneration.HttpAgentName` configuration property (its default value is `IHttpAgent`).")] public string? HttpAgentName { get; set; } @@ -601,7 +600,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the HttpAgent API route prefix where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentRoutePrefix", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentRoutePrefix")] [CodeGenProperty("HttpAgent", Title = "The base HTTP Agent API route where `Operation.AutoImplement` is `HttpAgent`.", Description = "This is the base (prefix) `URI` for the HTTP Agent endpoint and can be further extended when defining the underlying `Operation`(s).")] public string? HttpAgentRoutePrefix { get; set; } @@ -609,7 +608,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding HTTP Agent model name required where is `HttpAgent`. /// - [JsonProperty("httpAgentModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentModel")] [CodeGenProperty("HttpAgent", Title = "The corresponding HTTP Agent model name (required where `AutoImplement` is `HttpAgent`).", IsImportant = true, Description = "This can be overridden within the `Operation`(s).")] public string? HttpAgentModel { get; set; } @@ -617,7 +616,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding HTTP Agent model name required where is `HttpAgent`. /// - [JsonProperty("httpAgentReturnModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentReturnModel")] [CodeGenProperty("HttpAgent", Title = "The corresponding HTTP Agent model name (required where `AutoImplement` is `HttpAgent`).", Description = "This can be overridden within the `Operation`(s).")] public string? HttpAgentReturnModel { get; set; } @@ -625,7 +624,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the fluent-style method-chaining C# HTTP Agent API code to include where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentCode", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentCode")] [CodeGenProperty("HttpAgent", Title = "The fluent-style method-chaining C# HTTP Agent API code to include where `Operation.AutoImplement` is `HttpAgent`.", Description = "Prepended to `Operation.HttpAgentCode` where specified to enable standardized functionality.")] public string? HttpAgentCode { get; set; } @@ -633,7 +632,7 @@ public class EntityConfig : ConfigBase /// /// Indicates that a custom HTTP Agent Mapper will be used; i.e. not generated. /// - [JsonProperty("httpAgentCustomMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentCustomMapper")] [CodeGenProperty("OData", Title = "Indicates that a custom HTTP Agent `Mapper` will be used; i.e. not generated.", Description = "Otherwise, by default, a `Mapper` will be generated.")] public bool? HttpAgentCustomMapper { get; set; } @@ -641,7 +640,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the `HttpAgent` data-layer name that should be used for base mappings. /// - [JsonProperty("httpAgentMapperBase", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentMapperBase")] [CodeGenProperty("Cosmos", Title = "The HTTP Agent data-layer name that should be used for base mappings.")] public string? HttpAgentMapperBase { get; set; } @@ -652,7 +651,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether request-based caching is to be performed at the DataSvc layer to improve performance (i.e. reduce chattiness). /// - [JsonProperty("dataSvcCaching", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcCaching")] [CodeGenProperty("DataSvc", Title = "Indicates whether request-based `IRequestCache` caching is to be performed at the `DataSvc` layer to improve performance (i.e. reduce chattiness).", Description = "Defaults to `true`.")] public bool? DataSvcCaching { get; set; } @@ -660,7 +659,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the access modifier for the generated `DataSvc` constructor. /// - [JsonProperty("dataSvcCtor", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcCtor")] [CodeGenProperty("DataSvc", Title = "The access modifier for the generated `DataSvc` constructor.", Options = new string[] { "Public", "Private", "Protected" }, Description = "Defaults to `Public`.")] public string? DataSvcCtor { get; set; } @@ -668,7 +667,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the list of extended (non-inferred) Dependency Injection (DI) parameters for the generated `DataSvc` constructor. /// - [JsonProperty("dataSvcCtorParams", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcCtorParams")] [CodeGenPropertyCollection("DataSvc", Title = "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated `DataSvc` constructor.", Description = "Each constructor parameter should be formatted as `Type` + `^` + `Name`; e.g. `IConfiguration^Config`. Where the `Name` portion is not specified it will be inferred. " + "Where the `Type` matches an already inferred value it will be ignored.")] @@ -677,7 +676,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the `DataSvc` extensions logic should be generated. /// - [JsonProperty("dataSvcExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcExtensions")] [CodeGenProperty("DataSvc", Title = "Indicates whether the `DataSvc` extensions logic should be generated.", Description = "This can be overridden using `Operation.DataSvcExtensions`.")] public bool? DataSvcExtensions { get; set; } @@ -689,7 +688,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the layer to add logic to publish an event for a Create, Update or Delete operation. /// - [JsonProperty("eventPublish", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventPublish")] [CodeGenProperty("Events", Title = "The layer to add logic to publish an event for a `Create`, `Update` or `Delete` operation.", IsImportant = true, Options = new string[] { "None", "DataSvc", "Data" }, Description = "Defaults to the `CodeGeneration.EventPublish` 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 `Operation`(s).")] public string? EventPublish { get; set; } @@ -697,7 +696,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the URI event source. /// - [JsonProperty("eventSource", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSource")] [CodeGenProperty("Events", Title = "The Event Source.", Description = "Defaults to `Name` (as lowercase) appended with the `/{$key}` placeholder. Note: when used in code-generation the `CodeGeneration.EventSourceRoot` will be prepended where specified. " + "To include the entity id/key include a `{$key}` placeholder (`Create`, `Update` or `Delete` operation only); for example: `person/{$key}`. This can be overridden for the `Operation`.")] @@ -706,7 +705,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether a `System.TransactionScope` should be created and orchestrated whereever generating event publishing logic. /// - [JsonProperty("eventTransaction", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventTransaction")] [CodeGenProperty("Events", Title = "Indicates whether a `System.TransactionScope` should be created and orchestrated whereever generating event publishing logic.", IsImportant = true, Description = "Usage will force a rollback of any underlying data transaction (where the provider supports TransactionScope) on failure, such as an `EventPublish` 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. " + @@ -720,7 +719,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the access modifier for the generated `Manager` constructor. /// - [JsonProperty("managerCtor", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCtor")] [CodeGenProperty("Manager", Title = "The access modifier for the generated `Manager` constructor.", Options = new string[] { "Public", "Private", "Protected" }, Description = "Defaults to `Public`.")] public string? ManagerCtor { get; set; } @@ -728,7 +727,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the list of extended (non-inferred) Dependency Injection (DI) parameters for the generated `Manager` constructor. /// - [JsonProperty("managerCtorParams", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCtorParams")] [CodeGenPropertyCollection("Manager", Title = "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated `Manager` constructor.", IsImportant = true, Description = "Each constructor parameter should be formatted as `Type` + `^` + `Name`; e.g. `IConfiguration^Config`. Where the `Name` portion is not specified it will be inferred. " + "Where the `Type` matches an already inferred value it will be ignored.")] @@ -737,7 +736,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the `Manager` extensions logic should be generated. /// - [JsonProperty("managerExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerExtensions")] [CodeGenProperty("Manager", Title = "Indicates whether the `Manager` extensions logic should be generated.", Description = "This can be overridden using `Operation.ManagerExtensions`.")] public bool? ManagerExtensions { get; set; } @@ -745,7 +744,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the name of the .NET Type that will perform the validation. /// - [JsonProperty("validator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validator")] [CodeGenProperty("Manager", Title = "The name of the .NET implementing `Type` or interface `Type` that will perform the validation.", IsImportant = true, Description = "Only used for defaulting the `Create` and `Update` operation types (`Operation.Type`) where not specified explicitly.")] public string? Validator { get; set; } @@ -753,14 +752,14 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the `IIdentifierGenerator` should be used to generate the `Id` property on `Create`. /// - [JsonProperty("identifierGenerator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("identifierGenerator")] [CodeGenProperty("Manager", Title = "Indicates whether the `IIdentifierGenerator` should be used to generate the `Id` property where the operation types (`Operation.Type`) is `Create`.")] public bool? IdentifierGenerator { get; set; } /// /// Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer. /// - [JsonProperty("managerCleanUp", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCleanUp")] [CodeGenProperty("Manager", Title = "Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer.", Description = "This can be overridden within the `CodeGeneration` and `Operation`(s).")] public bool? ManagerCleanUp { get; set; } @@ -768,7 +767,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the `Validation` framework. /// - [JsonProperty("validationFramework", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validationFramework")] [CodeGenProperty("Manager", Title = "The `Validation` framework to use for the entity-based validation.", Options = new string[] { "CoreEx", "FluentValidation" }, Description = "Defaults to `CodeGeneration.ValidationFramework`. This can be overridden within the `Operation`(s) and `Parameter`(s).")] public string? ValidationFramework { get; set; } @@ -780,7 +779,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the RoutePrefixAtttribute for the corresponding entity Web API controller. /// - [JsonProperty("webApiRoutePrefix", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiRoutePrefix")] [CodeGenProperty("WebApi", Title = "The `RoutePrefixAtttribute` for the corresponding entity Web API controller.", IsImportant = true, Description = "This is the base (prefix) `URI` for the entity and can be further extended when defining the underlying `Operation`(s). The `CodeGeneration.WebApiRoutePrefix` will be prepended where specified. " + "Where not specified will automatically default to the pluralized `Name` (as lowercase).")] @@ -789,7 +788,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the authorize attribute value to be used for the corresponding entity Web API controller; generally either Authorize or AllowAnonynous. /// - [JsonProperty("webApiAuthorize", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAuthorize")] [CodeGenProperty("WebApi", Title = "The authorize attribute value to be used for the corresponding entity Web API controller; generally either `Authorize` or `AllowAnonymous`.", IsImportant = true, Description = "Defaults to the `CodeGeneration.WebApiAuthorize` configuration property (inherits) where not specified; can be overridden at the `Operation` level also.")] public string? WebApiAuthorize { get; set; } @@ -797,7 +796,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the access modifier for the generated Web API `Controller` constructor. /// - [JsonProperty("webApiCtor", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiCtor")] [CodeGenProperty("WebApi", Title = "The access modifier for the generated Web API `Controller` constructor.", Options = new string[] { "Public", "Private", "Protected" }, Description = "Defaults to `Public`.")] public string? WebApiCtor { get; set; } @@ -805,7 +804,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the list of extended (non-inferred) Dependency Injection (DI) parameters for the generated `WebApi` constructor. /// - [JsonProperty("webApiCtorParams", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiCtorParams")] [CodeGenPropertyCollection("WebApi", Title = "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated `WebApi` constructor.", IsImportant = true, Description = "Each constructor parameter should be formatted as `Type` + `^` + `Name`; e.g. `IConfiguration^Config`. Where the `Name` portion is not specified it will be inferred. " + "Where the `Type` matches an already inferred value it will be ignored.")] @@ -814,7 +813,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the HTTP Response Location Header route (`Operation.WebApiLocation`)` is automatically inferred. /// - [JsonProperty("webApiAutoLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAutoLocation")] [CodeGenProperty("WebApi", Title = "Indicates whether the HTTP Response Location Header route (`Operation.WebApiLocation`) is automatically inferred.", Description = "This will automatically set the `Operation.WebApiLocation` for an `Operation` named `Create` where there is a corresponding named `Get`. This is defaulted from the `CodeGen.WebApiAutoLocation`.")] public bool? WebApiAutoLocation { get; set; } @@ -822,7 +821,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether the Web API is responsible for managing concurrency via auto-generated ETag. /// - [JsonProperty("webApiConcurrency", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiConcurrency")] [CodeGenProperty("WebApi", 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 `Operation.Type` is `Update` or `Patch`, the request ETag will " + "be matched against the response for a corresponding `Get` operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the `Get` must be the same as that returned from " + @@ -832,7 +831,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the override for the corresponding `Get` method name (in the `XxxManager`) either where, the `Operation.Type` is `Update` and `WebApiConcurrency` is `true`, or the `Operation.Type` is `Patch`. /// - [JsonProperty("webApiGetOperation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiGetOperation")] [CodeGenProperty("WebApi", Title = "The corresponding `Get` method name (in the `XxxManager`) where the `Operation.Type` is `Update` and `SimulateConcurrency` is `true`.", Description = "Defaults to `Get`. Specify either just the method name (e.g. `OperationName`) or, interface and method name (e.g. `IXxxManager.OperationName`) to be invoked where in a different `YyyManager.OperationName`.")] public string? WebApiGetOperation { get; set; } @@ -844,7 +843,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether a data model version of the entity should also be generated (output to .\Business\Data\Model). /// - [JsonProperty("dataModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataModel")] [CodeGenProperty("Model", Title = "Indicates whether a data `model` version of the entity should also be generated (output to `.\\Business\\Data\\Model`).", Description = "The model will be generated with `OmitEntityBase = true`. Any reference data properties will be defined using their `RefDataType` intrinsic `Type` versus their corresponding (actual) reference data `Type`.")] public bool? DataModel { get; set; } @@ -856,14 +855,14 @@ public class EntityConfig : ConfigBase /// /// Indicates whether to exclude the generation of the Entity class (Xxx.cs). /// - [JsonProperty("excludeEntity", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeEntity")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `Entity` class (`Xxx.cs`).", IsImportant = true)] public bool? ExcludeEntity { get; set; } /// /// Indicates whether to exclude the generation of all Operation related code; excluding the Entity class. /// - [JsonProperty("excludeAll", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeAll")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of all `Operation` related artefacts; excluding the `Entity` class.", IsImportant = true, Description = "Is a shorthand means for setting all of the other `Exclude*` properties (with the exception of `ExcludeEntity`) to exclude.")] public bool? ExcludeAll { get; set; } @@ -871,14 +870,14 @@ public class EntityConfig : ConfigBase /// /// Indicates whether to exclude the generation of the Data interface (IXxxData.cs). /// - [JsonProperty("excludeIData", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIData")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `Data` interface (`IXxxData.cs`).")] public bool? ExcludeIData { get; set; } /// /// Gets or sets the option to exclude the generation of the Data class (XxxData.cs). /// - [JsonProperty("excludeData", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeData")] [CodeGenProperty("Exclude", Title = "The option to exclude the generation of the `Data` class (`XxxData.cs`).", Options = new string[] { "Include", "Exclude", "RequiresMapper" }, Description = "Defaults to `Include` indicating _not_ to exlude. A value of `Exclude` indicates to exclude all output; alternatively, `RequiresMapper` indicates to at least output the corresponding `Mapper` class.")] public string? ExcludeData { get; set; } @@ -886,49 +885,49 @@ public class EntityConfig : ConfigBase /// /// Indicates whether to exclude the generation of the DataSvc interface (IXxxDataSvc.cs). /// - [JsonProperty("excludeIDataSvc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIDataSvc")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `DataSvc` interface (`IXxxDataSvc.cs`).")] public bool? ExcludeIDataSvc { get; set; } /// /// Indicates whether to exclude the generation of the DataSvc class (XxxDataSvc.cs). /// - [JsonProperty("excludeDataSvc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeDataSvc")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `DataSvc` class (`XxxDataSvc.cs`).")] public bool? ExcludeDataSvc { get; set; } /// /// Indicates whether to exclude the generation of the Manager interface (IXxxManager.cs). /// - [JsonProperty("excludeIManager", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIManager")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `Manager` interface (`IXxxManager.cs`).")] public bool? ExcludeIManager { get; set; } /// /// Indicates whether to exclude the generation of the Manager class (XxxManager.cs). /// - [JsonProperty("excludeManager", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeManager")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the `Manager` class (`XxxManager.cs`).")] public bool? ExcludeManager { get; set; } /// /// Indicates whether to exclude the generation of the WebAPI Controller class (XxxController.cs). /// - [JsonProperty("excludeWebApi", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeWebApi")] [CodeGenProperty("Exclude", Title = "The option to exclude the generation of the WebAPI `Controller` class (`XxxController.cs`).")] public bool? ExcludeWebApi { get; set; } /// /// The option to exclude the generation of the WebAPI Agent class (XxxAgent.cs). /// - [JsonProperty("excludeWebApiAgent", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeWebApiAgent")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the WebAPI consuming `Agent` class (`XxxAgent.cs`).")] public bool? ExcludeWebApiAgent { get; set; } /// /// Indicates whether to exclude the generation of the gRPC Agent class (XxxAgent.cs). /// - [JsonProperty("excludeGrpcAgent", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeGrpcAgent")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the gRPC consuming `Agent` class (`XxxAgent.cs`).")] public bool? ExcludeGrpcAgent { get; set; } @@ -939,7 +938,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the role (permission) used by the ExecutionContext.IsInRole(role) for each Operation. /// - [JsonProperty("authRole", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("authRole")] [CodeGenProperty("Auth", Title = "The role (permission) used by the `ExecutionContext.IsInRole(role)` for each `Operation`.", IsImportant = true, Description = "Used where not overridden specifically for an `Operation`; i.e. acts as the default.")] public string? AuthRole { get; set; } @@ -951,7 +950,7 @@ public class EntityConfig : ConfigBase /// /// Indicates whether gRPC support (more specifically service-side) is required for the Entity. /// - [JsonProperty("grpc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpc")] [CodeGenProperty("gRPC", Title = "Indicates whether gRPC support (more specifically service-side) is required for the Entity.", IsImportant = true, Description = "gRPC support is an explicit opt-in model (see `CodeGeneration.Grpc` configuration); therefore, each corresponding `Property` and `Operation` will also need to be opted-in specifically.")] public bool? Grpc { get; set; } @@ -963,7 +962,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("properties", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("properties")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Property` collection.")] public List? Properties { get; set; } @@ -1082,7 +1081,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("operations", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("operations")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Operation` collection.")] public List? Operations { get; set; } @@ -1194,7 +1193,7 @@ public class EntityConfig : ConfigBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("consts", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("consts")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Consts` collection.")] public List? Consts { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/OperationConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/OperationConfig.cs index ee1fc48d1..d5eb0bf06 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/OperationConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/OperationConfig.cs @@ -1,6 +1,5 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; @@ -8,6 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -15,7 +15,6 @@ namespace Beef.CodeGen.Config.Entity /// /// Represents the Operation code-generation configuration. /// - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] [CodeGenClass("Operation", Title = "'CodeGeneration' object (entity-driven)", Description = "The code generation for an `Operation` is primarily driven by the `Type` 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.", Markdown = @"The valid `Type` values are as follows: @@ -71,14 +70,14 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the unique property name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The unique operation name.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the type of operation that is to be code-generated. /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The type of operation that is to be code-generated.", IsImportant = true, Description = "Defaults to `Custom`.", Options = new string[] { "Get", "GetColl", "Create", "Update", "Patch", "Delete", "Custom" })] public string? Type { get; set; } @@ -86,7 +85,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("text")] [CodeGenProperty("Key", Title = "The text for use in comments.", Description = "The `Text` will be defaulted for all the `Operation.Type` options with the exception of `Custom`. To create a `` within use moustache shorthand (e.g. {{Xxx}}).")] public string? Text { get; set; } @@ -94,22 +93,22 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the properties marked as a primary key (`Property.PrimaryKey`) are to be used as the parameters. /// - [JsonProperty("primaryKey", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("primaryKey")] [CodeGenProperty("Key", Title = "Indicates whether the properties marked as a primary key (`Property.PrimaryKey`) are to be used as the parameters.", IsImportant = true, - Description = "This simplifies the specification of these properties versus having to declare each specifically.")] + 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.")] public bool? PrimaryKey { get; set; } /// /// Indicates whether a PagingArgs argument is to be added to the operation to enable paging related logic. /// - [JsonProperty("paging", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("paging")] [CodeGenProperty("Key", Title = "Indicates whether a `PagingArgs` argument is to be added to the operation to enable (standardized) paging related logic.", IsImportant = true)] public bool? Paging { get; set; } /// /// Gets or sets the .NET value parameter for the operation. /// - [JsonProperty("valueType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("valueType")] [CodeGenProperty("Key", Title = "The .NET value parameter `Type` for the operation.", Description = "Defaults to the parent `Entity.Name` where the `Operation.Type` options are `Create` or `Update`.")] public string? ValueType { get; set; } @@ -117,7 +116,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the .NET return for the operation. /// - [JsonProperty("returnType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("returnType")] [CodeGenProperty("Key", Title = "The .NET return `Type` for the operation.", Description = "Defaults to the parent `Entity.Name` where the `Operation.Type` options are `Get`, `GetColl`, `Create` or `Update`; otherwise, defaults to `void`.")] public string? ReturnType { get; set; } @@ -125,7 +124,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the is nullable for the operation. /// - [JsonProperty("returnTypeNullable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("returnTypeNullable")] [CodeGenProperty("Key", Title = "Indicates whether the `ReturnType` is nullable for the operation.", Description = "This is only applicable for an `Operation.Type` of `Custom`. Will be inferred where the `ReturnType` is denoted as nullable; i.e. suffixed by a `?`.")] public bool? ReturnTypeNullable { get; set; } @@ -133,7 +132,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the text for use in comments to describe the . /// - [JsonProperty("returnText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("returnText")] [CodeGenProperty("Key", Title = "The text for use in comments to describe the `ReturnType`.", Description = "A default will be created where not specified. To create a `` within use moustache shorthand (e.g. {{Xxx}}).")] public string? ReturnText { get; set; } @@ -141,7 +140,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the overriding private name. /// - [JsonProperty("privateName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("privateName")] [CodeGenProperty("Key", Title = "The overriding private name.", Description = "Overrides the `Name` to be used for private usage. By default reformatted from `Name`; e.g. `GetByArgs` as `_getByArgs`.")] public string? PrivateName { get; set; } @@ -149,7 +148,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether to use Results. /// - [JsonProperty("withResult", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("withResult")] [CodeGenProperty("Key", Title = "Indicates whether to use `CoreEx.Results` (aka Railway-oriented programming).", Description = "Defaults to `Entity.WilhResult`.")] public bool? WithResult { get; set; } @@ -161,7 +160,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the operation override for the `Entity.AutoImplement`. /// - [JsonProperty("autoImplement", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoImplement")] [CodeGenProperty("Data", Title = "The operation override for the `Entity.AutoImplement`.", IsImportant = true, Options = new string[] { "Database", "EntityFramework", "Cosmos", "OData", "HttpAgent", "None" }, Description = "Defaults to `Entity.AutoImplement`. The corresponding `Entity.AutoImplement` must be defined for this to be enacted. Auto-implementation is applicable for all `Operation.Type` options with the exception of `Custom`.")] public string? AutoImplement { get; set; } @@ -169,7 +168,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the override for the data entity Mapper. /// - [JsonProperty("dataEntityMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataEntityMapper")] [CodeGenProperty("Data", Title = "The override for the data entity `Mapper`.", Description = "Used where the default generated `Mapper` is not applicable.")] public string? DataEntityMapper { get; set; } @@ -177,7 +176,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the `Data` extensions logic should be generated. /// - [JsonProperty("dataExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataExtensions")] [CodeGenProperty("Data", Title = "Indicates whether the `Data` extensions logic should be generated.", Description = "Defaults to `Entity.DataExtensions`.")] public bool? DataExtensions { get; set; } @@ -185,7 +184,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether a `DataInvoker` should orchestrate the `Data`-layer. /// - [JsonProperty("dataInvoker", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataInvoker")] [CodeGenProperty("Data", Title = "Indicates whether a `DataInvoker` should orchestrate the `Data`-layer.", Description = "Where `Dataransaction` or `EventPublish` is `Data` then orchestration will default to `true`.")] public bool? DataInvoker { get; set; } @@ -193,7 +192,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether a `System.TransactionScope` should be created and orchestrated at the `Data`-layer. /// - [JsonProperty("dataTransaction", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataTransaction")] [CodeGenProperty("Data", Title = "Indicates whether a `System.TransactionScope` should be created and orchestrated at the `Data`-layer.", Description = "Where using an `EventOutbox` this is ignored as it is implied through its usage.")] public bool? DataTransaction { get; set; } @@ -205,7 +204,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the database stored procedure name. /// - [JsonProperty("databaseStoredProc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseStoredProc")] [CodeGenProperty("Database", Title = "The database stored procedure name used where `Operation.AutoImplement` is `Database`.", Description = "Defaults to `sp` + `Entity.Name` + `Operation.Name`; e.g. `spPersonCreate`.")] public string? DatabaseStoredProc { get; set; } @@ -217,7 +216,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the corresponding Entity Framework model name required where is EntityFramework. /// - [JsonProperty("entityFrameworkModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkModel")] [CodeGenProperty("EntityFramework", Title = "The corresponding Entity Framework model name (required where `AutoImplement` is `EntityFramework`).", IsImportant = true, Description = "Overrides the `Entity.EntityFrameworkModel`.")] @@ -230,7 +229,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the corresponding Cosmos model name required where is Cosmos. /// - [JsonProperty("cosmosModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosModel")] [CodeGenProperty("Cosmos", Title = "The corresponding Cosmos model name (required where `AutoImplement` is `Cosmos`).", IsImportant = true, Description = "Overrides the `Entity.CosmosModel`.")] public string? CosmosModel { get; set; } @@ -238,7 +237,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the Cosmos ContainerId override. /// - [JsonProperty("cosmosContainerId", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosContainerId")] [CodeGenProperty("Cosmos", Title = "The Cosmos `ContainerId` override used where `Operation.AutoImplement` is `Cosmos`.", Description = "Overrides the `Entity.CosmosContainerId`.")] public string? CosmosContainerId { get; set; } @@ -246,7 +245,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the C# code override to be used for setting the optional Cosmos PartitionKey. /// - [JsonProperty("cosmosPartitionKey", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosPartitionKey")] [CodeGenProperty("Cosmos", Title = "The C# code override to be used for setting the optional Cosmos `PartitionKey` used where `Operation.AutoImplement` is `Cosmos`.", Description = "Overrides the `Entity.CosmosPartitionKey`.")] public string? CosmosPartitionKey { get; set; } @@ -258,7 +257,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the override name of the underlying OData collection name where is OData. /// - [JsonProperty("odataCollectionName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataCollectionName")] [CodeGenProperty("OData", Title = "The override name of the underlying OData collection where `Operation.AutoImplement` is `OData`.", IsImportant = true, Description = "Overriddes the `Entity.ODataCollectionName`; otherwise, the underlying `Simple.OData.Client` will attempt to infer.")] public string? ODataCollectionName { get; set; } @@ -270,7 +269,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the HTTP Agent API route prefix where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentRoute", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentRoute")] [CodeGenProperty("HttpAgent", Title = "The HTTP Agent API route where `Operation.AutoImplement` is `HttpAgent`.", Description = "This is appended to the `Entity.HttpAgentRoutePrefix`.")] public string? HttpAgentRoute { get; set; } @@ -278,7 +277,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the HTTP Agent API Method for the operation. /// - [JsonProperty("httpAgentMethod", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentMethod")] [CodeGenProperty("HttpAgent", Title = "The HTTP Agent Method for the operation.", IsImportant = true, Options = new string[] { "HttpGet", "HttpPost", "HttpPut", "HttpDelete", "HttpPatch" }, Description = "Defaults to `Operation.WebApiMethod`.")] public string? HttpAgentMethod { get; set; } @@ -286,7 +285,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the corresponding HTTP Agent model name required where is `HttpAgent`. /// - [JsonProperty("httpAgentModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentModel")] [CodeGenProperty("HttpAgent", Title = "The corresponding HTTP Agent model name (required where `AutoImplement` is `HttpAgent`).", IsImportant = true, Description = "This can be overridden within the `Operation`(s).")] public string? HttpAgentModel { get; set; } @@ -294,7 +293,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the corresponding HTTP Agent model name required where is `HttpAgent`. /// - [JsonProperty("httpAgentReturnModel", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentReturnModel")] [CodeGenProperty("HttpAgent", Title = "The corresponding HTTP Agent model name (required where `AutoImplement` is `HttpAgent`).", Description = "Defaults to `Operation.HttpAgentModel` where the `Operation.ReturnType` is equal to `Entity.Name` (same type). This can be overridden within the `Operation`(s).")] public string? HttpAgentReturnModel { get; set; } @@ -302,7 +301,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the fluent-style method-chaining C# HTTP Agent API code to include where `Operation.AutoImplement` is `HttpAgent`. /// - [JsonProperty("httpAgentCode", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentCode")] [CodeGenProperty("HttpAgent", Title = "The fluent-style method-chaining C# HTTP Agent API code to include where `Operation.AutoImplement` is `HttpAgent`.", Description = "Appended to `Entity.HttpAgentCode` where specified to extend.")] public string? HttpAgentCode { get; set; } @@ -314,21 +313,21 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the `Manager`-layer is a custom implementation; i.e. no auto-`DataSvc` invocation logic is to be generated. /// - [JsonProperty("managerCustom", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCustom")] [CodeGenProperty("Manager", Title = "Indicates whether the `Manager` logic is a custom implementation; i.e. no auto-`DataSvc` invocation logic is to be generated.", IsImportant = true)] public bool? ManagerCustom { get; set; } /// /// Indicates whether a `System.TransactionScope` should be created and orchestrated at the `Manager`-layer. /// - [JsonProperty("managerTransaction", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerTransaction")] [CodeGenProperty("Manager", Title = "Indicates whether a `System.TransactionScope` should be created and orchestrated at the `Manager`-layer.")] public bool? ManagerTransaction { get; set; } /// /// Indicates whether the `Manager` extensions logic should be generated. /// - [JsonProperty("managerExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerExtensions")] [CodeGenProperty("Data", Title = "Indicates whether the `Manager` extensions logic should be generated.", Description = "Defaults to `Entity.ManagerExtensions`.")] public bool? ManagerExtensions { get; set; } @@ -336,7 +335,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the name of the .NET Type that will perform the validation. /// - [JsonProperty("validator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validator")] [CodeGenProperty("Manager", Title = "The name of the .NET implementing `Type` or interface `Type` that will perform the validation.", IsImportant = true, Description = "Defaults to the `Entity.Validator` where not specified explicitly (where `Operation.Type` options `Create` or `Update`).")] public string? Validator { get; set; } @@ -344,7 +343,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the `Validation` framework. /// - [JsonProperty("validationFramework", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validationFramework")] [CodeGenProperty("Manager", Title = "The `Validation` framework to use for the entity-based validation.", Options = new string[] { "CoreEx", "FluentValidation" }, Description = "Defaults to `Entity.ValidationFramework`. This can be overridden within the `Parameter`(s).")] public string? ValidationFramework { get; set; } @@ -352,7 +351,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the `ExecutionContext.OperationType` (CRUD denotation) defined at the `Manager`-layer. /// - [JsonProperty("managerOperationType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerOperationType")] [CodeGenProperty("Manager", Title = "The `ExecutionContext.OperationType` (CRUD denotation) defined at the `Manager`-layer.", Options = new string[] { "Create", "Read", "Update", "Delete", "Unspecified" }, Description = "The default will be inferred from the `Operation.Type`; however, where the `Operation.Type` is `Custom` it will default to `Unspecified`.")] public string? ManagerOperationType { get; set; } @@ -360,7 +359,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer. /// - [JsonProperty("managerCleanUp", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("managerCleanUp")] [CodeGenProperty("Manager", Title = "Indicates whether a `Cleaner.Cleanup` is performed for the operation parameters within the Manager-layer.", Description = "This can be overridden within the `CodeGeneration` and `Entity`.")] public bool? ManagerCleanUp { get; set; } @@ -372,21 +371,21 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the `DataSvc`-layer is a custom implementation; i.e. no auto-`DataSvc` invocation logic is to be generated. /// - [JsonProperty("dataSvcCustom", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcCustom")] [CodeGenProperty("DataSvc", Title = "Indicates whether the `DataSvc` logic is a custom implementation; i.e. no auto-`DataSvc` invocation logic is to be generated.", IsImportant = true)] public bool? DataSvcCustom { get; set; } /// /// Indicates whether a `System.TransactionScope` should be created and orchestrated at the `DataSvc`-layer. /// - [JsonProperty("dataSvcTransaction", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcTransaction")] [CodeGenProperty("DataSvc", Title = "Indicates whether a `System.TransactionScope` should be created and orchestrated at the `DataSvc`-layer.")] public bool? DataSvcTransaction { get; set; } /// /// Indicates whether a `DataSvcInvoker` should orchestrate the `DataSvc`-layer. /// - [JsonProperty("dataSvcInvoker", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcInvoker")] [CodeGenProperty("DataSvc", Title = "Indicates whether a `DataSvcInvoker` should orchestrate the `DataSvc`-layer.", Description = "Where `DataSvcTransaction` or `EventPublish` is `DataSvc` then orchestration will default to `true`.")] public bool? DataSvcInvoker { get; set; } @@ -394,7 +393,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether the `DataSvc` extensions logic should be generated. /// - [JsonProperty("dataSvcExtensions", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataSvcExtensions")] [CodeGenProperty("DataSvc", Title = "Indicates whether the `DataSvc` extensions logic should be generated.", Description = "Defaults to `Entity.ManagerExtensions`.")] public bool? DataSvcExtensions { get; set; } @@ -406,7 +405,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the layer to add logic to publish an event for a Create, Update or Delete operation. /// - [JsonProperty("eventPublish", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventPublish")] [CodeGenProperty("Events", Title = "The layer to add logic to publish an event for a `Create`, `Update` or `Delete` operation.", IsImportant = true, Options = new string[] { "None", "DataSvc", "Data" }, Description = "Defaults to the `Entity.EventPublish` configuration property (inherits) where not specified. Used to enable the sending of messages to the likes of EventGrid, Service Broker, SignalR, etc.")] public string? EventPublish { get; set; } @@ -414,7 +413,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the URI event source. /// - [JsonProperty("eventSource", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSource")] [CodeGenProperty("Events", Title = "The Event Source.", Description = "Defaults to `Entity.EventSource`. Note: when used in code-generation the `CodeGeneration.EventSourceRoot` will be prepended where specified. " + "To include the entity id/key include a `{$key}` placeholder (`Create`, `Update` or `Delete` operation only); for example: `person/{$key}`. Otherwise, specify the C# string interpolation expression; for example: `person/{r.Id}`.")] @@ -423,7 +422,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the event subject template and corresponding event action pair (separated by a colon). /// - [JsonProperty("eventSubject", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("eventSubject")] [CodeGenProperty("Events", Title = "The event subject template and corresponding event action pair (separated by a colon).", Description = "The event subject template defaults to `{AppName}.{Entity.Name}`, plus each of the unique key placeholders comma separated; e.g. `Domain.Entity.{id1},{id2}` (depending on whether `Entity.EventSubjectFormat` is `NameAndKey` or `NameOnly`). " + "The event action defaults to `WebApiOperationType` or `Operation.Type` where not specified. Multiple events can be raised by specifying more than one subject/action pair separated by a semicolon. " + @@ -437,7 +436,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the Web API `RouteAtttribute` to be appended to the `Entity.WebApiRoutePrefix`. /// - [JsonProperty("webApiRoute", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiRoute")] [CodeGenProperty("WebApi", Title = "The Web API `RouteAtttribute` to be appended to the `Entity.WebApiRoutePrefix`.", IsImportant = true, Description = "Where the value is specified with a leading `!` character this indicates that the `Entity.WebApiRoutePrefix` should not be used, and the value should be used as-is (with the `!` removed).")] public string? WebApiRoute { get; set; } @@ -445,7 +444,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the authorize attribute value to be used for the corresponding entity Web API controller; generally either Authorize or AllowAnonynous. /// - [JsonProperty("webApiAuthorize", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAuthorize")] [CodeGenProperty("WebApi", Title = "The authorize attribute value to be used for the corresponding entity Web API controller; generally either `Authorize` or `AllowAnonymous`.", Description = "Where not specified no attribute output will occur; it will then inherit as supported by .NET.")] public string? WebApiAuthorize { get; set; } @@ -453,7 +452,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the HTTP Method for the operation. /// - [JsonProperty("webApiMethod", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiMethod")] [CodeGenProperty("WebApi", Title = "The HTTP Method for the operation.", IsImportant = true, Options = new string[] { "HttpGet", "HttpPost", "HttpPut", "HttpDelete" }, Description = "The value defaults as follows: `HttpGet` for `Operation.Type` value `Get` or `GetColl`, `HttpPost` for `Operation.Type` value `Create` or `Custom`, " + "`HttpPut` for `Operation.Type` value `Update`, and `HttpDelete` for `Operation.Type` value `Delete`. An `Operation.Type` value `Patch` can not be specified and will always default to `HttpPatch`.")] @@ -462,7 +461,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the primary HTTP Status Code that will be returned for the operation where there is a non-null return value. /// - [JsonProperty("webApiStatus", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiStatus")] [CodeGenProperty("WebApi", Title = "The primary HTTP Status Code that will be returned for the operation where there is a non-`null` return value.", Options = new string[] { "OK", "Accepted", "Created", "NoContent", "NotFound" }, Description = "The value defaults as follows: `OK` for `Operation.Type` value `Get`, `GetColl`, `Update`, `Delete` or `Custom`, `Created` for `Operation.Type` value `Create`.")] public string? WebApiStatus { get; set; } @@ -470,7 +469,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the alternate HTTP Status Code that will be returned for the operation where there is a null return value. /// - [JsonProperty("webApiAlternateStatus", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiAlternateStatus")] [CodeGenProperty("WebApi", Title = "The primary HTTP Status Code that will be returned for the operation where there is a `null` return value.", Options = new string[] { "OK", "Accepted", "Created", "NoContent", "NotFound" }, Description = "The value defaults as follows: `NotFound` for `Operation.Type` value `Get` and `NoContent` for `Operation.Type` value `GetColl`; otherwise, `null`.")] public string? WebApiAlternateStatus { get; set; } @@ -478,7 +477,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the HTTP Response Location Header route. /// - [JsonProperty("webApiLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiLocation")] [CodeGenProperty("WebApi", Title = "The HTTP Response Location Header route.", Description = "This uses similar formatting to the `WebApiRoute`. The response value is accessed using `r.` notation to access underlying properties; for example `{r.Id}` or `person/{r.Id}`. The `Entity.WebApiRoutePrefix` will be prepended automatically; however, to disable set the first character to `!`, e.g. `!person/{r.Id}`. " + "The URI can be inferred from another `Operation` by using a lookup `^`; for example `^Get` indicates to infer from the named `Get` operation (where only `^` is specified this is shorthand for `^Get` as this is the most common value). The Location URI will ensure the first character is a `/` so it acts a 'relative URL absolute path'.")] @@ -491,13 +490,13 @@ public class OperationConfig : ConfigBase 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 `Operation.Type` is `Update` or `Patch`, the request ETag will " + "be matched against the response for a corresponding `Get` operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the `Get` must be the same as that returned from " + "the corresponding `Create`, `Update` and `Patch` (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. Defaults to `Entity.WebApiConcurrency`.")] - [JsonProperty("webApiConcurrency", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiConcurrency")] public bool? WebApiConcurrency { get; set; } /// /// Gets or sets the override for the corresponding `Get` method name (in the `XxxManager`) either where, the `Operation.Type` is `Update` and `WebApiConcurrency` is `true`, or the `Operation.Type` is `Patch`. /// - [JsonProperty("webApiGetOperation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiGetOperation")] [CodeGenProperty("WebApi", Title = "The corresponding `Get` method name (in the `XxxManager`) where the `Operation.Type` is `Update` and `SimulateConcurrency` is `true`.", Description = "Defaults to `Get`. Specify either just the method name (e.g. `OperationName`) or, interface and method name (e.g. `IXxxManager.OperationName`) to be invoked where in a different `YyyManager.OperationName`.")] public string? WebApiGetOperation { get; set; } @@ -505,11 +504,26 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the override for the corresponding `Update` method name (in the `XxxManager`) where the `Operation.Type` is `Patch`. /// - [JsonProperty("webApiUpdateOperation", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiUpdateOperation")] [CodeGenProperty("WebApi", Title = "The corresponding `Update` method name (in the `XxxManager`) where the `Operation.Type` is `Patch`.", Description = "Defaults to `Update`. Specify either just the method name (e.g. `OperationName`) or, interface and method name (e.g. `IXxxManager.OperationName`) to be invoked where in a different `YyyManager.OperationName`.")] public string? WebApiUpdateOperation { get; set; } + /// + /// Gets or sets the value(s) for the optional [Produces()] attribute for the operation within the Web Api Controller. + /// + [JsonPropertyName("webApiProduces")] + [CodeGenPropertyCollection("WebApi", Title = "The value(s) for the optional `[Produces()]` attribute for the operation within the Web Api Controller for the Swagger/OpenAPI documentation.")] + public List? WebApiProduces { get; set; } + + /// + /// Gets or sets the [ProducesResponseType()] attribute typeof definition. + /// + [JsonPropertyName("webApiProducesResponseType")] + [CodeGenProperty("WebApi", Title = "The `[ProducesResponseType()]` attribute `typeof` for the operation within the Web Api Controller for the Swagger/OpenAPI documentation.", + Description = "Defaults to the _Common_ type. A value of `None`, `none` or `` will ensure no type is emitted.")] + public string? WebApiProducesResponseType { get; set; } + #endregion #region Auth @@ -517,14 +531,14 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the permission used by the `ExecutionContext.IsAuthorized(AuthPermission)` to determine whether the user is authorized. /// - [JsonProperty("authPermission", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("authPermission")] [CodeGenProperty("Auth", Title = "The permission used by the `ExecutionContext.IsAuthorized(AuthPermission)` to determine whether the user is authorized.")] public string? AuthPermission { get; set; } /// /// Gets or sets the permission used by the `ExecutionContext.IsInRole(AuthRole)` to determine whether the user is authorized. /// - [JsonProperty("authRole", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("authRole")] [CodeGenProperty("Auth", Title = "The permission used by the `ExecutionContext.IsInRole(AuthRole)` to determine whether the user is authorized.")] public string? AuthRole { get; set; } @@ -535,7 +549,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether to exclude the generation of all Operation related output. /// - [JsonProperty("excludeAll", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeAll")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of all `Operation` related output.", IsImportant = true, Description = "Is a shorthand means for setting all of the other `Exclude*` properties to `true`.")] public bool? ExcludeAll { get; set; } @@ -543,63 +557,63 @@ public class OperationConfig : ConfigBase /// /// Indicates whether to exclude the generation of the operation within the Data interface (IXxxData.cs). /// - [JsonProperty("excludeIData", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIData")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `Data` interface (`IXxxData.cs`) output.")] public bool? ExcludeIData { get; set; } /// /// Indicates whether to exclude the generation of the operation within the Data class (XxxData.cs). /// - [JsonProperty("excludeData", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeData")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `Data` class (`XxxData.cs`) output.")] public bool? ExcludeData { get; set; } /// /// Indicates whether to exclude the generation of the operation within the DataSvc interface (IXxxDataSvc.cs). /// - [JsonProperty("excludeIDataSvc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIDataSvc")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `DataSvc` interface (`IXxxDataSvc.cs`) output.")] public bool? ExcludeIDataSvc { get; set; } /// /// Indicates whether to exclude the generation of the operation within the DataSvc class (XxxDataSvc.cs). /// - [JsonProperty("excludeDataSvc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeDataSvc")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `DataSvc` class (`XxxDataSvc.cs`) output.")] public bool? ExcludeDataSvc { get; set; } /// /// Indicates whether to exclude the generation of the operation within the Manager interface (IXxxManager.cs). /// - [JsonProperty("excludeIManager", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeIManager")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `Manager` interface (`IXxxManager.cs`) output.")] public bool? ExcludeIManager { get; set; } /// /// Indicates whether to exclude the generation of the operation within the Manager class (XxxManager.cs). /// - [JsonProperty("excludeManager", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeManager")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the `Manager` class (`XxxManager.cs`) output.")] public bool? ExcludeManager { get; set; } /// /// Indicates whether to exclude the generation of the operation within the WebAPI Controller class (XxxController.cs). /// - [JsonProperty("excludeWebApi", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeWebApi")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the WebAPI `Controller` class (`XxxController.cs`) output.")] public bool? ExcludeWebApi { get; set; } /// /// Indicates whether to exclude the generation of the operation within the WebAPI Agent class (XxxAgent.cs). /// - [JsonProperty("excludeWebApiAgent", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeWebApiAgent")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the WebAPI consuming `Agent` class (`XxxAgent.cs`) output.")] public bool? ExcludeWebApiAgent { get; set; } /// /// Indicates whether to exclude the generation of the operation within the gRPC Agent class (XxxAgent.cs). /// - [JsonProperty("excludeGrpcAgent", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("excludeGrpcAgent")] [CodeGenProperty("Exclude", Title = "Indicates whether to exclude the generation of the operation within the gRPC consuming `Agent` class (`XxxAgent.cs`) output.")] public bool? ExcludeGrpcAgent { get; set; } @@ -610,7 +624,7 @@ public class OperationConfig : ConfigBase /// /// Indicates whether gRPC support (more specifically service-side) is required for the Operation. /// - [JsonProperty("grpc", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpc")] [CodeGenProperty("gRPC", Title = "Indicates whether gRPC support (more specifically service-side) is required for the Operation.", IsImportant = true, Description = "gRPC support is an explicit opt-in model (see `CodeGeneration.Grpc` configuration); therefore, each corresponding `Entity`, `Property` and `Operation` will also need to be opted-in specifically.")] public bool? Grpc { get; set; } @@ -622,7 +636,7 @@ public class OperationConfig : ConfigBase /// /// Gets or sets the corresponding collection. /// - [JsonProperty("parameters", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("parameters")] [CodeGenPropertyCollection("Collections", Title = "The corresponding `Parameter` collection.")] public List? Parameters { get; set; } @@ -788,6 +802,11 @@ public class OperationEvent /// public string OperationReturnType => CompareValue(ReturnTypeNullable, true) ? ReturnType + "?" : ReturnType!; + /// + /// Indicates whether the is none. + /// + public bool IsWebApiProducesResponseTypeNone => CompareValue(WebApiProducesResponseType, "None") || CompareValue(WebApiProducesResponseType, "none") || CompareValue(WebApiProducesResponseType, ""); + /// /// Gets the . /// @@ -796,7 +815,7 @@ public class OperationEvent /// /// Gets the for an agent. /// - public string AgentOperationTaskReturnType => HasReturnValue ? $"Task>" : "Task"; + public string AgentOperationTaskReturnType => HasReturnValue && !IsWebApiProducesResponseTypeNone ? $"Task>" : "Task"; /// /// Gets the controller operation method call/invoke statement. @@ -966,6 +985,11 @@ public class OperationEvent /// public bool HasResultTypeChange => (HasValue && HasReturnValue && ValueType != ReturnType) || (HasValue && !HasReturnValue) || (!HasValue && HasReturnValue); + /// + /// Gets the WebApiProduces generated content. + /// + public string? WebApiProducesContentType => WebApiProduces is not null && WebApiProduces.Count > 0 ? string.Join(", ", WebApiProduces.Select(x => $"\"{x}\"")) : null; + /// /// /// @@ -1232,7 +1256,7 @@ private async Task PrepareParametersAsync() if (Parameters.Any(x => x.Name == pc.Name)) continue; - Parameters.Insert(i++, new ParameterConfig { Name = pc.Name, Text = pc.Text, IsMandatory = new string[] { "Get", "Delete" }.Contains(Type) || (Type == "Update" && CompareValue(WithResult, true)), LayerPassing = isCreateUpdate ? "ToManagerSet" : "All", Property = pc.Name }); + Parameters.Insert(i++, new ParameterConfig { Name = pc.Name, Text = pc.Text, IsMandatory = true, LayerPassing = isCreateUpdate ? "ToManagerSet" : "All", Property = pc.Name }); } } @@ -1531,21 +1555,24 @@ private string CreateAgentOperationHttpMethod() var sb = new StringBuilder(WebApiMethod![4..]); sb.Append("Async"); - if (HasReturnValue || (ValueType != null && WebApiMethod != "HttpPatch")) - sb.Append('<'); - - if (ValueType != null && WebApiMethod != "HttpPatch") + if (!IsWebApiProducesResponseTypeNone) { - sb.Append(ValueType); - if (HasReturnValue) - sb.Append(", "); - } + if (HasReturnValue || (ValueType != null && WebApiMethod != "HttpPatch")) + sb.Append('<'); - if (HasReturnValue) - sb.Append(OperationReturnType); + if (ValueType != null && WebApiMethod != "HttpPatch") + { + sb.Append(ValueType); + if (HasReturnValue) + sb.Append(", "); + } - if (HasReturnValue || (ValueType != null && WebApiMethod != "HttpPatch")) - sb.Append('>'); + if (HasReturnValue) + sb.Append(OperationReturnType); + + if (HasReturnValue || (ValueType != null && WebApiMethod != "HttpPatch")) + sb.Append('>'); + } return sb.ToString(); } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/ParameterConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/ParameterConfig.cs index 977f795c9..44d54e473 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/ParameterConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/ParameterConfig.cs @@ -2,12 +2,12 @@ using CoreEx; using CoreEx.Entities; -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Linq; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -43,14 +43,14 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the unique parameter name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The unique parameter name.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("text")] [CodeGenProperty("Key", Title = "The overriding text for use in comments.", Description = "By default the `Text` will be the `Name` reformatted as sentence casing.")] public string? Text { get; set; } @@ -58,7 +58,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the .NET . /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The .NET `Type`.", IsImportant = true, Description = "Defaults to `string`. To reference a Reference Data `Type` always prefix with `RefDataNamespace` (e.g. `RefDataNamespace.Gender`) or shortcut `^` (e.g. `^Gender`). This will ensure that the appropriate Reference Data " + "`using` statement is used. _Shortcut:_ Where the `Type` starts with (prefix) `RefDataNamespace.` or `^`, and the correspondong `RefDataType` attribute is not specified it will automatically default the `RefDataType` to `string.`")] @@ -67,14 +67,14 @@ public class ParameterConfig : ConfigBase /// /// Indicates whether the .NET should be declared as nullable. /// - [JsonProperty("nullable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("nullable")] [CodeGenProperty("Key", Title = "Indicates whether the .NET Type should be declared as nullable; e.g. `int?`. Will be inferred where the `Type` is denoted as nullable; i.e. suffixed by a `?`. Where the .NET Type is not considered as an intrinsic type then will default to `true`.", IsImportant = true)] public bool? Nullable { get; set; } /// /// Gets or sets the C# code to default the value. /// - [JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("default")] [CodeGenProperty("Key", Title = "The C# code to default the value.", Description = "Where the `Type` is `string` then the specified default value will need to be delimited. Any valid value assignment C# code can be used.")] public string? Default { get; set; } @@ -82,7 +82,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the overriding private name. /// - [JsonProperty("privateName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("privateName")] [CodeGenProperty("Key", Title = "The overriding private name.", Description = "Overrides the `Name` to be used for private fields. By default reformatted from `Name`; e.g. `FirstName` as `_firstName`.")] public string? PrivateName { get; set; } @@ -90,7 +90,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the overriding argument name. /// - [JsonProperty("argumentName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("argumentName")] [CodeGenProperty("Key", Title = "The overriding argument name.", Description = "Overrides the `Name` to be used for argument parameters. By default reformatted from `Name`; e.g. `FirstName` as `firstName`.")] public string? ArgumentName { get; set; } @@ -102,7 +102,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the `Property.Name` within the parent `Entity` to copy (set) the configuration/characteristics from where not already defined. /// - [JsonProperty("property", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("property")] [CodeGenProperty("Property", Title = "The `Property.Name` within the parent `Entity` to copy (set) the configuration/characteristics from where not already defined.")] public string? Property { get; set; } @@ -113,7 +113,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID). /// - [JsonProperty("refDataType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataType")] [CodeGenProperty("RefData", Title = "The underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID).", Options = new string[] { "string", "int", "Guid" }, Description = "Defaults to `string` where not specified and the corresponding `Type` starts with (prefix) `RefDataNamespace.`.")] public string? RefDataType { get; set; } @@ -121,7 +121,7 @@ public class ParameterConfig : ConfigBase /// /// Indicates that the Reference Data property is to be a serializable list (ReferenceDataSidList). /// - [JsonProperty("refDataList", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataList")] [CodeGenProperty("RefData", Title = "Indicates that the Reference Data property is to be a serializable list (`ReferenceDataSidList`).", Description = "This is required to enable a list of Reference Data values (as per `RefDataType`) to be passed as an argument for example.")] public bool? RefDataList { get; set; } @@ -133,21 +133,21 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the name of the .NET `Type` that will perform the validation. /// - [JsonProperty("validator", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validator")] [CodeGenProperty("Manager", Title = "The name of the .NET `Type` that will perform the validation.", IsImportant = true)] public string? Validator { get; set; } /// /// Gets or sets the fluent-style method-chaining C# validator code to append to `IsMandatory` and `Validator` (where specified). /// - [JsonProperty("validatorCode", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validatorCode")] [CodeGenProperty("Manager", Title = "The fluent-style method-chaining C# validator code to append to `IsMandatory` and `Validator` (where specified).")] public string? ValidatorCode { get; set; } /// /// Gets or sets the `Validation` framework. /// - [JsonProperty("validationFramework", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("validationFramework")] [CodeGenProperty("Manager", Title = "The `Validation` framework to use for the entity-based validation.", Options = new string[] { "CoreEx", "FluentValidation" }, Description = "Defaults to `Operation.ValidationFramework`.")] public string? ValidationFramework { get; set; } @@ -155,14 +155,14 @@ public class ParameterConfig : ConfigBase /// /// Indicates whether a should be thrown when the parameter value has its default value (null, zero, etc). /// - [JsonProperty("isMandatory", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("isMandatory")] [CodeGenProperty("Manager", Title = "Indicates whether a `ValidationException` should be thrown when the parameter value has its default value (null, zero, etc).")] public bool? IsMandatory { get; set; } /// /// Gets or sets the option that determines the layers in which the parameter is passed. /// - [JsonProperty("layerPassing", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("layerPassing")] [CodeGenProperty("Manager", Title = "The option that determines the layers in which the parameter is passed.", Options = new string[] { "All", "ToManagerSet", "ToManagerCollSet" }, Description = "Defaults to `All`. To further describe, `All` passes the parameter through all layeys, `ToManagerSet` only passes the parameter to the `Manager` layer and overrides the same named property within the corresponding `value` parameter, " + "`ToManagerCollSet` only passes the parameter to the `Manager` layer and overrides the same named property within the corresponding `value` collection parameter. " + @@ -176,7 +176,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the data `Converter` class name where specific data conversion is required. /// - [JsonProperty("dataConverter", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataConverter")] [CodeGenProperty("Data", Title = "The data `Converter` class name where specific data conversion is required.", Description = "A `Converter` is used to convert a data source value to/from a .NET `Type` where no standard data conversion can be applied. Where this value is suffixed by `` or `{T}` this will automatically set `Type`.")] public string? DataConverter { get; set; } @@ -188,7 +188,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the option for how the parameter will be delcared within the Web API Controller. /// - [JsonProperty("webApiFrom", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiFrom")] [CodeGenProperty("WebApi", Title = "The option for how the parameter will be delcared within the Web API Controller.", Options = new string[] { "FromQuery", "FromBody", "FromRoute", "FromEntityProperties" }, Description = "Defaults to `FromQuery`; unless the parameter `Type` has also been defined as an `Entity` within the code-gen config file then it will default to `FromEntityProperties`. Specifies that the parameter will be declared with corresponding `FromQueryAttribute`, `FromBodyAttribute` or `FromRouteAttribute` for the Web API method. The `FromEntityProperties` will declare all properties of the `Entity` as query parameters.")] public string? WebApiFrom { get; set; } @@ -196,7 +196,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("webApiText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("webApiText")] [CodeGenProperty("WebApi", Title = "The overriding text for use in the Web API comments.", Description = "By default the `Text` will be the `Name` reformatted as sentence casing.")] public string? WebApiText { get; set; } @@ -208,7 +208,7 @@ public class ParameterConfig : ConfigBase /// /// Gets or sets the underlying gRPC data type. /// - [JsonProperty("grpcType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpcType")] [CodeGenProperty("gRPC", Title = "The underlying gRPC data type; will be inferred where not specified.")] public string? GrpcType { get; set; } diff --git a/tools/Beef.CodeGen.Core/Config/Entity/PropertyConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/PropertyConfig.cs index 962a307be..fff873a2b 100644 --- a/tools/Beef.CodeGen.Core/Config/Entity/PropertyConfig.cs +++ b/tools/Beef.CodeGen.Core/Config/Entity/PropertyConfig.cs @@ -1,12 +1,12 @@ // Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef -using Newtonsoft.Json; using OnRamp; using OnRamp.Config; using OnRamp.Utility; using System; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Beef.CodeGen.Config.Entity @@ -53,14 +53,14 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the unique property name. /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("name")] [CodeGenProperty("Key", Title = "The unique property name.", IsMandatory = true, IsImportant = true)] public string? Name { get; set; } /// /// Gets or sets the overriding text for use in comments. /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("text")] [CodeGenProperty("Key", Title = "The overriding text for use in comments.", Description = "By default the `Text` will be the `Name` reformatted as sentence casing. Depending on whether the `Type` is `bool`, will appear in one of the two generated sentences. Where not `bool` it will be: Gets or sets a value indicating whether {text}.'. " + "Otherwise, it will be: Gets or sets the {text}.'. To create a `` within use moustache shorthand (e.g. {{Xxx}}).")] @@ -69,7 +69,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the overriding model text for use in comments. /// - [JsonProperty("modelText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("modelText")] [CodeGenProperty("Key", Title = "The overriding model text for use in comments.", Description = "By default the `ModelText` will be the `Name` reformatted as sentence casing. Depending on whether the `Type` is `bool`, will appear in one of the two generated sentences. Where not `bool` it will be: Gets or sets a value indicating whether {text}.'. " + "Otherwise, it will be: Gets or sets the {text}.'. To create a `` within use moustache shorthand (e.g. {{Xxx}}).")] @@ -78,7 +78,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the .NET . /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("type")] [CodeGenProperty("Key", Title = "The .NET `Type`.", IsImportant = true, Description = "Defaults to `string`. To reference a Reference Data `Type` always prefix with `RefDataNamespace` (e.g. `RefDataNamespace.Gender`) or shortcut `^` (e.g. `^Gender`). This will ensure that the appropriate Reference Data " + "`using` statement is used. _Shortcut:_ Where the `Type` starts with (prefix) `RefDataNamespace.` or `^`, and the correspondong `RefDataType` attribute is not specified it will automatically default the `RefDataType` to `string.`")] @@ -87,21 +87,21 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the .NET should be declared as nullable. /// - [JsonProperty("nullable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("nullable")] [CodeGenProperty("Key", Title = "Indicates whether the .NET `Type` should be declared as nullable; e.g. `string?`. Will be inferred where the `Type` is denoted as nullable; i.e. suffixed by a `?`.", IsImportant = true)] public bool? Nullable { get; set; } /// /// Indicates whether the property is inherited and therefore should not be output within the generated Entity class. /// - [JsonProperty("inherited", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("inherited")] [CodeGenProperty("Key", Title = "Indicates whether the property is inherited and therefore should not be output within the generated Entity class.")] public bool? Inherited { get; set; } /// /// Gets or sets the overriding private name. /// - [JsonProperty("privateName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("privateName")] [CodeGenProperty("Key", Title = "The overriding private name.", Description = "Overrides the `Name` to be used for private fields. By default reformatted from `Name`; e.g. `FirstName` as `_firstName`.")] public string? PrivateName { get; set; } @@ -109,7 +109,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the overriding argument name. /// - [JsonProperty("argumentName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("argumentName")] [CodeGenProperty("Key", Title = "The overriding argument name.", Description = "Overrides the `Name` to be used for argument parameters. By default reformatted from `Name`; e.g. `FirstName` as `firstName`.")] public string? ArgumentName { get; set; } @@ -121,7 +121,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property is considered part of the primary (unique) key. /// - [JsonProperty("primaryKey", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("primaryKey")] [CodeGenProperty("Property", Title = "Indicates whether the property is considered part of the primary (unique) key.", IsImportant = true, Description = "This is also used to simplify the parameter specification for an Entity Operation by inferrence.")] public bool? PrimaryKey { get; set; } @@ -129,7 +129,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates that the property Type is another generated entity / collection and therefore specific capabilities can be assumed (e.g. CopyFrom and Clone). /// - [JsonProperty("isEntity", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("isEntity")] [CodeGenProperty("Property", Title = "Indicates that the property `Type` is another generated entity / collection and therefore specific capabilities can be assumed (e.g. `CopyFrom` and `Clone`).", IsImportant = true, Description = "Will be inferred (default to `true`) where the `Type` is `ChangeLog` or the `Type` is found as another `Entity` within the code-generation configuration file.")] public bool? IsEntity { get; set; } @@ -137,14 +137,14 @@ public class PropertyConfig : ConfigBase /// /// Indicates that the value is immutable and therefore cannot be changed once set. /// - [JsonProperty("immutable", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("immutable")] [CodeGenProperty("Property", Title = "Indicates that the value is immutable and therefore cannot be changed once set.")] public bool? Immutable { get; set; } /// /// Gets or sets the transformation to be performed on Set and CleanUp. /// - [JsonProperty("dateTimeTransform", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dateTimeTransform")] [CodeGenProperty("Property", Title = "The `DateTime` transformation to be performed on `Set` and `CleanUp`.", Options = new string[] { "UseDefault", "None", "DateOnly", "DateTimeLocal", "DateTimeUtc", "DateTimeUnspecified" }, Description = "Defaults to `UseDefault`. This is only applied where the `Type` is `DateTime`.")] public string? DateTimeTransform { get; set; } @@ -152,7 +152,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the trimming of white space characters to be performed on Set and CleanUp. /// - [JsonProperty("stringTrim", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("stringTrim")] [CodeGenProperty("Property", Title = "The `string` trimming of white space characters to be performed on `Set` and `CleanUp`.", Options = new string[] { "UseDefault", "None", "Start", "End", "Both" }, Description = "Defaults to `UseDefault`. This is only applied where the `Type` is `string`.")] public string? StringTrim { get; set; } @@ -160,7 +160,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the transformation to be performed on Set and CleanUp. /// - [JsonProperty("stringTransform", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("stringTransform")] [CodeGenProperty("Property", Title = "The `string` transformation to be performed on `Set` and `CleanUp`.", Options = new string[] { "UseDefault", "None", "NullToEmpty", "EmptyToNull" }, Description = "Defaults to `UseDefault`. This is only applied where the `Type` is `string`.")] public string? StringTransform { get; set; } @@ -168,7 +168,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the casing to be performed on Set and CleanUp. /// - [JsonProperty("stringCasing", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("stringCasing")] [CodeGenProperty("Property", Title = "The `string` casing to be performed on `Set` and `CleanUp`.", Options = new string[] { "UseDefault", "None", "Lower", "Upper", "Title" }, Description = "Defaults to `UseDefault`. This is only applied where the `Type` is `string`.")] public string? StringCasing { get; set; } @@ -176,14 +176,14 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether an instance of the is to be automatically created/instantiated when the property is first accessed (i.e. lazy instantiation). /// - [JsonProperty("autoCreate", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("autoCreate")] [CodeGenProperty("Property", Title = "Indicates whether an instance of the `Type` is to be automatically created/instantiated when the property is first accessed (i.e. lazy instantiation).")] public bool? AutoCreate { get; set; } /// /// Gets or sets the C# code to default the value. /// - [JsonProperty("default", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("default")] [CodeGenProperty("Property", Title = "The C# code to default the value.", Description = "Where the `Type` is `string` then the specified default value will need to be delimited. Any valid value assignment C# code can be used.")] public string? Default { get; set; } @@ -191,7 +191,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property is considered part of the Partition Key. /// - [JsonProperty("partitionKey", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("partitionKey")] [CodeGenProperty("Property", Title = "Indicates whether the property is considered part of the Partition Key.", Description = "This will implement `IPartitionKey` for the generated entity.")] public bool? PartitionKey { get; set; } @@ -199,7 +199,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property is for internal use only; declared in the Business entities only. /// - [JsonProperty("internalOnly", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("internalOnly")] [CodeGenProperty("Property", Title = "Indicates whether the property is for internal use only; declared in Business entities only.", Description = "In this instance the `Property` will be excluded from the `Common` entity declaration and `Business` JSON serialization.")] public bool? InternalOnly { get; set; } @@ -211,7 +211,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID). /// - [JsonProperty("refDataType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataType")] [CodeGenProperty("RefData", Title = "The underlying Reference Data Type that is also used as the Reference Data serialization identifier (SID).", Options = new string[] { "string", "int", "Guid" }, Description = "Defaults to `string` (being the `ReferenceDataBase.Code`) where not specified and the corresponding `Type` starts with (prefix) `RefDataNamespace.` or `^`. Note: an `Id` of type `string` is currently not supported; the use of the `Code` is the recommended approach.")] public string? RefDataType { get; set; } @@ -219,7 +219,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates that the Reference Data property is to be a serializable list (ReferenceDataSidList). /// - [JsonProperty("refDataList", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataList")] [CodeGenProperty("RefData", Title = "Indicates that the Reference Data property is to be a serializable list (`ReferenceDataSidList`).", Description = "This is required to enable a list of Reference Data values (as per `RefDataType`) to be passed as an argument for example.")] public bool? RefDataList { get; set; } @@ -227,7 +227,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether a corresponding text property is added when generating a Reference Data property overriding the CodeGeneration.RefDataText selection. /// - [JsonProperty("refDataText", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataText")] [CodeGenProperty("RefData", Title = "Indicates whether a corresponding `Text` property is added when generating a Reference Data property, overriding the `Entity.RefDataText` selection.", Options = new string[] { "Optional", "Always", "Never" }, Description = "This is used where serializing within the Web API `Controller` and the `ExecutionContext.IsRefDataTextSerializationEnabled` is set to `true` (which is automatically set where the url contains `$text=true`)." + "`Optional` indicates when `ExecutionContext.IsRefDataTextSerializationEnabled` is set to `true` then a value is output, `Always` indicates that the value is _always_ output, and `Never` indicates that feature is turned off.")] @@ -236,14 +236,14 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the corresponding text property name. /// - [JsonProperty("refDataTextName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataTextName")] [CodeGenProperty("RefData", Title = "The corresponding reference data `Text` property name; defaults to `Name` + 'Text'.")] public string? RefDataTextName { get; set; } /// /// Indicates whether the property should use the underlying Reference Data mapping capabilities. /// - [JsonProperty("refDataMapping", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("refDataMapping")] [CodeGenProperty("RefData", 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.")] public bool? RefDataMapping { get; set; } @@ -255,7 +255,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the JSON property name. /// - [JsonProperty("jsonName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("jsonName")] [CodeGenProperty("Serialization", Title = "The JSON property name.", Description = "Defaults to `ArgumentName` where not specified (i.e. camelCase); however, where the property is `ETag` it will default to the `Config.ETagJsonName`.")] public string? JsonName { get; set; } @@ -263,7 +263,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the JSON property name for the corresponding data model. /// - [JsonProperty("jsonDataModelName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("jsonDataModelName")] [CodeGenProperty("Serialization", Title = "The JSON property name for the corresponding data model (see `Entity.DataModel`).", Description = "Defaults to `JsonName` where not specified.")] public string? JsonDataModelName { get; set; } @@ -271,7 +271,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property is not to be serialized. /// - [JsonProperty("serializationIgnore", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("serializationIgnore")] [CodeGenProperty("Serialization", Title = "Indicates whether the property is not to be serialized.", Description = "All properties are serialized by default.")] public bool? SerializationIgnore { get; set; } @@ -279,14 +279,14 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether to always include the value (default or otherwise) when serializing. /// - [JsonProperty("serializationAlwaysInclude", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("serializationAlwaysInclude")] [CodeGenProperty("Serialization", Title = "Indicates whether to include the value (default or otherwise) when serializing.")] public bool? SerializationAlwaysInclude { get; set; } /// /// Indicates whether the property is not to be serialized. /// - [JsonProperty("dataModelIgnore", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataModelIgnore")] [CodeGenProperty("Serialization", Title = "Indicates whether the property is to be included within the data model.", Description = "All properties are included in the data model by default.")] public bool? DataModelIgnore { get; set; } @@ -294,7 +294,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property is not to be serialized where outputting as a data model. /// - [JsonProperty("dataModelSerializationIgnore", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataModelSerializationIgnore")] [CodeGenProperty("Serialization", 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.")] public bool? DataModelSerializationIgnore { get; set; } @@ -306,7 +306,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the data name where `Entity.AutoImplement` is selected. /// - [JsonProperty("dataName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataName")] [CodeGenProperty("Data", Title = "The data name where Entity.AutoImplement is selected.", IsImportant = true, Description = "Defaults to the property `Name`. Represents the column name for a `Database`, or the correspinding property name for the other options.")] public string? DataName { get; set; } @@ -314,7 +314,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the data `Converter` class name where `Entity.AutoImplement` is selected. /// - [JsonProperty("dataConverter", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataConverter")] [CodeGenProperty("Data", Title = "The data `Converter` class name where `Entity.AutoImplement` is selected.", IsImportant = true, Description = "A `Converter` is used to convert a data source value to/from a .NET `Type` where no standard data conversion can be applied. Where this value is suffixed by `` or `{T}` this will automatically set `Type`.")] public string? DataConverter { get; set; } @@ -322,7 +322,7 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property should be ignored (excluded) from the Data / DataMapper generated output. /// - [JsonProperty("dataMapperIgnore", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataMapperIgnore")] [CodeGenProperty("Data", Title = "Indicates whether the property should be ignored (excluded) from the `Data`-layer / data `Mapper` generated output.", Description = "All properties are included by default.")] public bool? DataMapperIgnore { get; set; } @@ -330,14 +330,14 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the `PrimaryKey` property value is automatically generated by the data source on `Create`. /// - [JsonProperty("dataAutoGenerated", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataAutoGenerated")] [CodeGenProperty("Data", Title = "Indicates whether the `PrimaryKey` property value is automatically generated by the data source on `Create`.")] public bool? DataAutoGenerated { get; set; } /// /// Gets or sets the operations types (`ExecutionContext.OperationType`) selection to enable inclusion and exclusion of property mapping. /// - [JsonProperty("dataOperationTypes", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("dataOperationTypes")] [CodeGenProperty("Data", Title = "The operations types (`ExecutionContext.OperationType`) selection to enable inclusion and exclusion of property mapping.", Options = new string[] { "Any", "AnyExceptCreate", "AnyExceptUpdate", "AnyExceptGet", "Get", "Create", "Update", "Delete" }, Description = "Defaults to `Any`.")] @@ -350,7 +350,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the database property `Mapper` class name where `Entity.AutoImplement` is selected. /// - [JsonProperty("databaseMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseMapper")] [CodeGenProperty("Database", Title = "The database property `Mapper` class name where `Entity.AutoImplement` is selected.", Description = "A `Mapper` is used to map a data source value to/from a .NET complex `Type` (i.e. class with one or more properties).")] public string? DatabaseMapper { get; set; } @@ -358,14 +358,14 @@ public class PropertyConfig : ConfigBase /// /// Indicates whether the property should be ignored (excluded) from the database `Mapper` generated output. /// - [JsonProperty("databaseIgnore", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseIgnore")] [CodeGenProperty("Database", Title = "Indicates whether the property should be ignored (excluded) from the database `Mapper` generated output.")] public bool? DatabaseIgnore { get; set; } /// /// Gets or sets the database DbType override (versus inferring from the corresponding .NET Type). /// - [JsonProperty("databaseDbType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("databaseDbType")] [CodeGenProperty("Database", Title = "The database `DbType` override (versus inferring from the corresponding .NET Type).", IsImportant = true, Description = "Overrides the inferred database type; i.e. can specify `Date` or `DateTime2`, for .NET Type `System.DateTime`.")] public string? DatabaseDbType { get; set; } @@ -377,7 +377,7 @@ public class PropertyConfig : ConfigBase /// /// The Entity Framework `Mapper` approach for the property. /// - [JsonProperty("entityFrameworkMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("entityFrameworkMapper")] [CodeGenProperty("EntityFramework", Title = "The Entity Framework `Mapper` approach for the property.", Options = new string[] { "Set", "Ignore", "Map", "Flatten" }, Description = "Defaults to `Set`.")] public string? EntityFrameworkMapper { get; set; } @@ -389,7 +389,7 @@ public class PropertyConfig : ConfigBase /// /// The Cosmos `Mapper` approach for the property. /// - [JsonProperty("cosmosMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("cosmosMapper")] [CodeGenProperty("Cosmos", Title = "The Cosmos `Mapper` approach for the property.", Options = new string[] { "Set", "Ignore", "Map", "Flatten" }, Description = "Defaults to `Set`.")] public string? CosmosMapper { get; set; } @@ -401,7 +401,7 @@ public class PropertyConfig : ConfigBase /// /// The OData `Mapper` approach for the property. /// - [JsonProperty("odataMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("odataMapper")] [CodeGenProperty("OData", Title = "The OData `Mapper` approach for the property.", Options = new string[] { "Map", "Ignore", "Skip" }, Description = "Defaults to `Map` which indicates the property will be explicitly mapped. A value of `Ignore` will explicitly `Ignore`, whilst a value of `Skip` will skip code-generated mapping altogether.")] public string? ODataMapper { get; set; } @@ -413,7 +413,7 @@ public class PropertyConfig : ConfigBase /// /// The HttpAgent `Mapper` approach for the property. /// - [JsonProperty("httpAgentMapper", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("httpAgentMapper")] [CodeGenProperty("HttpAgent", Title = "The HttpAgent `Mapper` approach for the property.", Options = new string[] { "Set", "Ignore", "Map", "Flatten" }, Description = "Defaults to `Set`.")] public string? HttpAgentMapper { get; set; } @@ -425,7 +425,7 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the display name used in the likes of error messages for the property. /// - [JsonProperty("displayName", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("displayName")] [CodeGenProperty("Annotation", Title = "The display name used in the likes of error messages for the property.", Description = "Defaults to the `Name` as sentence case.")] public string? DisplayName { get; set; } @@ -433,21 +433,21 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the property annotation (e.g. attribute) declaration code. /// - [JsonProperty("annotation1", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("annotation1")] [CodeGenProperty("Annotation", Title = "The property annotation (e.g. attribute) declaration code.")] public string? Annotation1 { get; set; } /// /// Gets or sets the property annotation (e.g. attribute) declaration code. /// - [JsonProperty("annotation2", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("annotation2")] [CodeGenProperty("Annotation", Title = "The property annotation (e.g. attribute) declaration code.")] public string? Annotation2 { get; set; } /// /// Gets or sets the property annotation (e.g. attribute) declaration code. /// - [JsonProperty("annotation3", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("annotation3")] [CodeGenProperty("Annotation", Title = "The property annotation (e.g. attribute) declaration code.")] public string? Annotation3 { get; set; } @@ -458,14 +458,14 @@ public class PropertyConfig : ConfigBase /// /// Gets or sets the unique (immutable) field number required to enable gRPC support. /// - [JsonProperty("grpcFieldNo", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpcFieldNo")] [CodeGenProperty("gRPC", Title = "The unique (immutable) field number required to enable gRPC support.", IsImportant = true)] public int? GrpcFieldNo { get; set; } /// /// Gets or sets the underlying gRPC data type. /// - [JsonProperty("grpcType", DefaultValueHandling = DefaultValueHandling.Ignore)] + [JsonPropertyName("grpcType")] [CodeGenProperty("gRPC", Title = "The underlying gRPC data type; will be inferred where not specified.")] public string? GrpcType { get; set; } diff --git a/tools/Beef.CodeGen.Core/Schema/database.beef-5.json b/tools/Beef.CodeGen.Core/Schema/database.beef-5.json index 1d661c7a7..44d609428 100644 --- a/tools/Beef.CodeGen.Core/Schema/database.beef-5.json +++ b/tools/Beef.CodeGen.Core/Schema/database.beef-5.json @@ -4,83 +4,83 @@ "definitions": { "CodeGeneration": { "type": "object", - "title": "'CodeGeneration' object (database-driven)", - "description": "The 'CodeGeneration' object defines global properties that are used to drive the underlying database-driven code generation.", + "title": "\u0027CodeGeneration\u0027 object (database-driven)", + "description": "The \u0060CodeGeneration\u0060 object defines global properties that are used to drive the underlying database-driven code generation.", "properties": { "schema": { "type": "string", - "title": "The name of the 'Schema' where the artefacts are defined in, or should be created in, the database.", - "description": "This is used as the default 'Schema' for all child objects." + "title": "The name of the \u0060Schema\u0060 where the artefacts are defined in, or should be created in, the database.", + "description": "This is used as the default \u0060Schema\u0060 for all child objects." }, "columnNameIsDeleted": { "type": "string", - "title": "The column name for the 'IsDeleted' capability.", - "description": "Defaults to 'IsDeleted'." + "title": "The column name for the \u0060IsDeleted\u0060 capability.", + "description": "Defaults to \u0060IsDeleted\u0060." }, "columnNameTenantId": { "type": "string", - "title": "The column name for the 'TenantId' capability.", - "description": "Defaults to 'TenantId'." + "title": "The column name for the \u0060TenantId\u0060 capability.", + "description": "Defaults to \u0060TenantId\u0060." }, "columnNameOrgUnitId": { "type": "string", - "title": "The column name for the 'OrgUnitId' capability.", - "description": "Defaults to 'OrgUnitId'." + "title": "The column name for the \u0060OrgUnitId\u0060 capability.", + "description": "Defaults to \u0060OrgUnitId\u0060." }, "columnNameRowVersion": { "type": "string", - "title": "The column name for the 'RowVersion' capability.", - "description": "Defaults to 'RowVersion'." + "title": "The column name for the \u0060RowVersion\u0060 capability.", + "description": "Defaults to \u0060RowVersion\u0060." }, "columnNameCreatedBy": { "type": "string", - "title": "The column name for the 'CreatedBy' capability.", - "description": "Defaults to 'CreatedBy'." + "title": "The column name for the \u0060CreatedBy\u0060 capability.", + "description": "Defaults to \u0060CreatedBy\u0060." }, "columnNameCreatedDate": { "type": "string", - "title": "The column name for the 'CreatedDate' capability.", - "description": "Defaults to 'CreatedDate'." + "title": "The column name for the \u0060CreatedDate\u0060 capability.", + "description": "Defaults to \u0060CreatedDate\u0060." }, "columnNameUpdatedBy": { "type": "string", - "title": "The column name for the 'UpdatedBy' capability.", - "description": "Defaults to 'UpdatedBy'." + "title": "The column name for the \u0060UpdatedBy\u0060 capability.", + "description": "Defaults to \u0060UpdatedBy\u0060." }, "columnNameUpdatedDate": { "type": "string", - "title": "The column name for the 'UpdatedDate' capability.", - "description": "Defaults to 'UpdatedDate'." + "title": "The column name for the \u0060UpdatedDate\u0060 capability.", + "description": "Defaults to \u0060UpdatedDate\u0060." }, "columnNameDeletedBy": { "type": "string", - "title": "The column name for the 'DeletedBy' capability.", - "description": "Defaults to 'UpdatedBy'." + "title": "The column name for the \u0060DeletedBy\u0060 capability.", + "description": "Defaults to \u0060UpdatedBy\u0060." }, "columnNameDeletedDate": { "type": "string", - "title": "The column name for the 'DeletedDate' capability.", - "description": "Defaults to 'UpdatedDate'." + "title": "The column name for the \u0060DeletedDate\u0060 capability.", + "description": "Defaults to \u0060UpdatedDate\u0060." }, "orgUnitJoinSql": { "type": "string", - "title": "The SQL table or function that is to be used to join against for security-based 'OrgUnitId' verification.", - "description": "Defaults to '[Sec].[fnGetUserOrgUnits]()'." + "title": "The SQL table or function that is to be used to join against for security-based \u0060OrgUnitId\u0060 verification.", + "description": "Defaults to \u0060[Sec].[fnGetUserOrgUnits]()\u0060." }, "checkUserPermissionSql": { "type": "string", - "title": "The SQL stored procedure that is to be used for 'Permission' verification.", - "description": "Defaults to '[Sec].[spCheckUserHasPermission]'." + "title": "The SQL stored procedure that is to be used for \u0060Permission\u0060 verification.", + "description": "Defaults to \u0060[Sec].[spCheckUserHasPermission]\u0060." }, "getUserPermissionSql": { "type": "string", - "title": "The SQL function that is to be used for 'Permission' verification.", - "description": "Defaults to '[Sec].[fnGetUserHasPermission]'." + "title": "The SQL function that is to be used for \u0060Permission\u0060 verification.", + "description": "Defaults to \u0060[Sec].[fnGetUserHasPermission]\u0060." }, "autoDotNetRename": { "type": "string", "title": "The option to automatically rename the SQL Tables and Columns for use in .NET.", - "description": "Defaults 'SnakeKebabToPascalCase' that will remove any underscores or hyphens separating each word and capitalize the first character of each; e.g. 'internal-customer_id' would be renamed as 'InternalCustomerId'. The 'PascalCase' option will capatilize the first character only.", + "description": "Defaults \u0060SnakeKebabToPascalCase\u0060 that will remove any underscores or hyphens separating each word and capitalize the first character of each; e.g. \u0060internal-customer_id\u0060 would be renamed as \u0060InternalCustomerId\u0060. The \u0060PascalCase\u0060 option will capatilize the first character only.", "enum": [ "None", "PascalCase", @@ -93,94 +93,94 @@ }, "efModel": { "type": "boolean", - "title": "Indicates whether an 'Entity Framework' .NET (C#) model is to be generated for all tables.", - "description": "This can be overridden within the 'Table'(s)." + "title": "Indicates whether an \u0060Entity Framework\u0060 .NET (C#) model is to be generated for all tables.", + "description": "This can be overridden within the \u0060Table\u0060(s)." }, "outbox": { "type": "boolean", "title": "Indicates whether to generate the event outbox SQL and .NET artefacts.", - "description": "Defaults to 'false'." + "description": "Defaults to \u0060false\u0060." }, "outboxSchema": { "type": "string", "title": "The schema name of the event outbox table.", - "description": "Defaults to 'Outbox' (literal)." + "description": "Defaults to \u0060Outbox\u0060 (literal)." }, "outboxSchemaCreate": { "type": "boolean", - "title": "Indicates whether to create the 'OutboxSchema' within the database.", - "description": "Defaults to 'true'." + "title": "Indicates whether to create the \u0060OutboxSchema\u0060 within the database.", + "description": "Defaults to \u0060true\u0060." }, "outboxTable": { "type": "string", "title": "The name of the event outbox table.", - "description": "Defaults to 'EventOutbox' (literal)." + "description": "Defaults to \u0060EventOutbox\u0060 (literal)." }, "outboxEnqueueStoredProcedure": { "type": "string", "title": "The stored procedure name for the event outbox enqueue.", - "description": "Defaults to 'spEventOutboxEnqueue' (literal)." + "description": "Defaults to \u0060spEventOutboxEnqueue\u0060 (literal)." }, "outboxDequeueStoredProcedure": { "type": "string", "title": "The stored procedure name for the event outbox dequeue.", - "description": "Defaults to 'spEventOutboxDequeue' (literal)." + "description": "Defaults to \u0060spEventOutboxDequeue\u0060 (literal)." }, "pathBase": { "type": "string", - "title": "The base path (directory) prefix for the Database-related artefacts; other 'Path*' properties append to this value when they are not specifically overridden.", - "description": "Defaults to 'Company' (runtime parameter) + '.' + 'AppName' (runtime parameter). For example 'Beef.Demo'." + "title": "The base path (directory) prefix for the Database-related 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." }, "pathDatabaseSchema": { "type": "string", "title": "The path (directory) for the Schema Database-related artefacts.", - "description": "Defaults to 'PathBase' + '.Database/Schema' (literal). For example 'Beef.Demo.Database/Schema'." + "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Database/Schema\u0060 (literal). For example \u0060Beef.Demo.Database/Schema\u0060." }, "pathDatabaseMigrations": { "type": "string", "title": "The path (directory) for the Schema Database-related artefacts.", - "description": "Defaults to 'PathBase' + '.Database/Migrations' (literal). For example 'Beef.Demo.Database/Migrations'." + "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Database/Migrations\u0060 (literal). For example \u0060Beef.Demo.Database/Migrations\u0060." }, "pathBusiness": { "type": "string", "title": "The path (directory) for the Business-related (.NET) artefacts.", - "description": "Defaults to 'PathBase' + '.Business' (literal). For example 'Beef.Demo.Business'." + "description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060." }, "orgUnitImmutable": { "type": "boolean", - "title": "Indicates whether the 'OrgUnitId' column is considered immutable, in that it can not be changed once set.", + "title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.", "description": "This is only applicable for stored procedures." }, "namespaceBase": { "type": "string", "title": "The base Namespace (root) for the .NET artefacts.", - "description": "Defaults to 'Company' (runtime parameter) + '.' + 'AppName' (runtime parameter). For example 'Beef.Demo'." + "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 'NamespaceBase' + '.Common' (literal). For example 'Beef.Demo.Common'." + "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 'NamespaceBase' + '.Business' (literal). For example 'Beef.Demo.Business'." + "description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060." }, "namespaceOutbox": { "type": "string", "title": "The Namespace (root) for the Outbox-related Publisher .NET artefacts.", - "description": "Defaults to 'NamespaceBusiness'." + "description": "Defaults to \u0060NamespaceBusiness\u0060." }, "tables": { "type": "array", - "title": "The corresponding 'Table' collection.", + "title": "The corresponding \u0060Table\u0060 collection.", "items": { "$ref": "#/definitions/Table" } }, "queries": { "type": "array", - "title": "The corresponding 'Query' collection.", + "title": "The corresponding \u0060Query\u0060 collection.", "items": { "$ref": "#/definitions/Query" } @@ -189,180 +189,180 @@ }, "Table": { "type": "object", - "title": "'Table' object (entity-driven)", - "description": "The 'Table' object identifies an existing database 'Table' (or 'View') and defines its code-generation characteristics.", + "title": "\u0027Table\u0027 object (entity-driven)", + "description": "The \u0060Table\u0060 object identifies an existing database \u0060Table\u0060 (or \u0060View\u0060) and defines its code-generation characteristics.", "properties": { "name": { "type": "string", - "title": "The name of the 'Table' in the database." + "title": "The name of the \u0060Table\u0060 in the database." }, "schema": { "type": "string", - "title": "The name of the 'Schema' where the 'Table' is defined in the database.", - "description": "Defaults to 'CodeGeneration.Schema'." + "title": "The name of the \u0060Schema\u0060 where the \u0060Table\u0060 is defined in the database.", + "description": "Defaults to \u0060CodeGeneration.Schema\u0060." }, "alias": { "type": "string", - "title": "The 'Schema.Table' alias name.", + "title": "The \u0060Schema.Table\u0060 alias name.", "description": "Will automatically default where not specified." }, "includeColumns": { "type": "array", - "title": "The list of 'Column' names to be included in the underlying generated output.", - "description": "Where not specified this indicates that all 'Columns' are to be included.", + "title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.", + "description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.", "items": { "type": "string" } }, "excludeColumns": { "type": "array", - "title": "The list of 'Column' names to be excluded from the underlying generated output.", - "description": "Where not specified this indicates no 'Columns' are to be excluded.", + "title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.", + "description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.", "items": { "type": "string" } }, "aliasColumns": { "type": "array", - "title": "The list of 'Column' and 'Alias' pairs (split by a '^' lookup character) to enable column aliasing/renaming.", - "description": "Each alias value should be formatted as 'Column' + '^' + 'Alias'; e.g. 'PCODE^ProductCode'.", + "title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.", + "description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060.", "items": { "type": "string" } }, "get": { "type": "boolean", - "title": "Indicates whether a 'Get' stored procedure is to be automatically generated where not otherwise explicitly specified." + "title": "Indicates whether a \u0060Get\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified." }, "getAll": { "type": "boolean", - "title": "Indicates whether a 'GetAll' stored procedure is to be automatically generated where not otherwise explicitly specified.", - "description": "The 'GetAllOrderBy' is used to specify the 'GetAll' query sort order." + "title": "Indicates whether a \u0060GetAll\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified.", + "description": "The \u0060GetAllOrderBy\u0060 is used to specify the \u0060GetAll\u0060 query sort order." }, "getAllOrderBy": { "type": "array", - "title": "The list of 'Column' names (including sort order 'ASC'/'DESC' literal) to be used as the 'GetAll' query sort order.", - "description": "This relates to the 'GetAll' selection.", + "title": "The list of \u0060Column\u0060 names (including sort order \u0060ASC\u0060/\u0060DESC\u0060 literal) to be used as the \u0060GetAll\u0060 query sort order.", + "description": "This relates to the \u0060GetAll\u0060 selection.", "items": { "type": "string" } }, "create": { "type": "boolean", - "title": "Indicates whether a 'Create' stored procedure is to be automatically generated where not otherwise explicitly specified." + "title": "Indicates whether a \u0060Create\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified." }, "update": { "type": "boolean", - "title": "Indicates whether a 'Update' stored procedure is to be automatically generated where not otherwise explicitly specified." + "title": "Indicates whether a \u0060Update\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified." }, "upsert": { "type": "boolean", - "title": "Indicates whether a 'Upsert' stored procedure is to be automatically generated where not otherwise explicitly specified." + "title": "Indicates whether a \u0060Upsert\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified." }, "delete": { "type": "boolean", - "title": "Indicates whether a 'Delete' stored procedure is to be automatically generated where not otherwise explicitly specified." + "title": "Indicates whether a \u0060Delete\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified." }, "merge": { "type": "boolean", - "title": "Indicates whether a 'Merge' (insert/update/delete of 'Udt' list) stored procedure is to be automatically generated where not otherwise explicitly specified.", - "description": "This will also require a 'Udt' (SQL User Defined Table) and 'Tvp' (.NET Table-Valued Parameter) to function." + "title": "Indicates whether a \u0060Merge\u0060 (insert/update/delete of \u0060Udt\u0060 list) stored procedure is to be automatically generated where not otherwise explicitly specified.", + "description": "This will also require a \u0060Udt\u0060 (SQL User Defined Table) and \u0060Tvp\u0060 (.NET Table-Valued Parameter) to function." }, "efModel": { "type": "boolean", - "title": "Indicates whether an 'Entity Framework' .NET (C#) model is to be generated.", - "description": "Defaults to 'CodeGeneration.EfModel'." + "title": "Indicates whether an \u0060Entity Framework\u0060 .NET (C#) model is to be generated.", + "description": "Defaults to \u0060CodeGeneration.EfModel\u0060." }, "efModelName": { "type": "string", "title": "The .NET (C#) EntityFramework (EF) model name.", - "description": "Defaults to 'Name' applying the 'CodeGeneration.AutoDotNetRename'." + "description": "Defaults to \u0060Name\u0060 applying the \u0060CodeGeneration.AutoDotNetRename\u0060." }, "udt": { "type": "boolean", - "title": "Indicates whether a 'User Defined Table (UDT)' type should be created." + "title": "Indicates whether a \u0060User Defined Table (UDT)\u0060 type should be created." }, "udtExcludeColumns": { "type": "array", - "title": "The list of 'Column' names to be excluded from the 'User Defined Table (UDT)'.", - "description": "Where not specified this indicates that no 'Columns' are to be excluded.", + "title": "The list of \u0060Column\u0060 names to be excluded from the \u0060User Defined Table (UDT)\u0060.", + "description": "Where not specified this indicates that no \u0060Columns\u0060 are to be excluded.", "items": { "type": "string" } }, "tvp": { "type": "string", - "title": "The name of the .NET entity associated with the 'Udt' so that it can be expressed (created) as a Table-Valued Parameter for usage within the corresponding 'DbMapper'." + "title": "The name of the .NET entity associated with the \u0060Udt\u0060 so that it can be expressed (created) as a Table-Valued Parameter for usage within the corresponding \u0060DbMapper\u0060." }, "permission": { "type": "string", - "title": "The permission (prefix) to be used for security permission checking (suffix defaults to 'Read', 'Write' or 'Delete' and can be overridden in the underlying stored procedure)." + "title": "The permission (prefix) to be used for security permission checking (suffix defaults to \u0060Read\u0060, \u0060Write\u0060 or \u0060Delete\u0060 and can be overridden in the underlying stored procedure)." }, "orgUnitImmutable": { "type": "boolean", - "title": "Indicates whether the 'OrgUnitId' column is considered immutable, in that it can not be changed once set.", - "description": "Defaults to 'CodeGeneration.OrgUnitImmutable'. This is only applicable for stored procedures." + "title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.", + "description": "Defaults to \u0060CodeGeneration.OrgUnitImmutable\u0060. This is only applicable for stored procedures." }, "columnNameIsDeleted": { "type": "string", - "title": "The column name for the 'IsDeleted' capability.", - "description": "Defaults to 'CodeGeneration.IsDeleted'." + "title": "The column name for the \u0060IsDeleted\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060." }, "columnNameTenantId": { "type": "string", - "title": "The column name for the 'TenantId' capability.", - "description": "Defaults to 'CodeGeneration.TenantId'." + "title": "The column name for the \u0060TenantId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.TenantId\u0060." }, "columnNameOrgUnitId": { "type": "string", - "title": "The column name for the 'OrgUnitId' capability.", - "description": "Defaults to 'CodeGeneration.OrgUnitId'." + "title": "The column name for the \u0060OrgUnitId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060." }, "columnNameRowVersion": { "type": "string", - "title": "The column name for the 'RowVersion' capability.", - "description": "Defaults to 'CodeGeneration.RowVersion'." + "title": "The column name for the \u0060RowVersion\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.RowVersion\u0060." }, "columnNameCreatedBy": { "type": "string", - "title": "The column name for the 'CreatedBy' capability.", - "description": "Defaults to 'CodeGeneration.CreatedBy'." + "title": "The column name for the \u0060CreatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060." }, "columnNameCreatedDate": { "type": "string", - "title": "The column name for the 'CreatedDate' capability.", - "description": "Defaults to 'CodeGeneration.CreatedDate'." + "title": "The column name for the \u0060CreatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060." }, "columnNameUpdatedBy": { "type": "string", - "title": "The column name for the 'UpdatedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060UpdatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameUpdatedDate": { "type": "string", - "title": "The column name for the 'UpdatedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060UpdatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "columnNameDeletedBy": { "type": "string", - "title": "The column name for the 'DeletedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060DeletedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameDeletedDate": { "type": "string", - "title": "The column name for the 'DeletedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060DeletedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "storedProcedures": { "type": "array", - "title": "The corresponding 'StoredProcedure' collection.", + "title": "The corresponding \u0060StoredProcedure\u0060 collection.", "items": { "$ref": "#/definitions/StoredProcedure" } }, "relationships": { "type": "array", - "title": "The corresponding Entity Frameworrk (EF) 'Relationship' collection.", + "title": "The corresponding Entity Frameworrk (EF) \u0060Relationship\u0060 collection.", "items": { "$ref": "#/definitions/Relationship" } @@ -374,18 +374,18 @@ }, "StoredProcedure": { "type": "object", - "title": "'StoredProcedure' object (database-driven)", - "description": "The code generation for an 'StoredProcedure' is primarily driven by the 'Type' property. This encourages (enforces) a consistent implementation for the standardised **CRUD** (Create, Read, Update and Delete) actions, as well as supporting 'Upsert', 'Merge' and ad-hoc queries as required.", + "title": "\u0027StoredProcedure\u0027 object (database-driven)", + "description": "The code generation for an \u0060StoredProcedure\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 \u0060Upsert\u0060, \u0060Merge\u0060 and ad-hoc queries as required.", "properties": { "name": { "type": "string", - "title": "The name of the 'StoredProcedure'; generally the verb/action, i.e. 'Get', 'Update', etc.", - "description": "See 'StoredProcedureName' for the actual name used in the database." + "title": "The name of the \u0060StoredProcedure\u0060; generally the verb/action, i.e. \u0060Get\u0060, \u0060Update\u0060, etc.", + "description": "See \u0060StoredProcedureName\u0060 for the actual name used in the database." }, "type": { "type": "string", "title": "The stored procedure operation type.", - "description": "Defaults to 'GetColl'.", + "description": "Defaults to \u0060GetColl\u0060.", "enum": [ "Get", "GetColl", @@ -399,30 +399,30 @@ "paging": { "type": "boolean", "title": "Indicates whether standardized paging support should be added.", - "description": "This only applies where the stored procedure operation 'Type' is 'GetColl'." + "description": "This only applies where the stored procedure operation \u0060Type\u0060 is \u0060GetColl\u0060." }, "storedProcedureName": { "type": "string", - "title": "The 'StoredProcedure' name in the database.", - "description": "Defaults to 'sp' + 'Table.Name' + 'Name'; e.g. 'spTableName' or 'spPersonGet'." + "title": "The \u0060StoredProcedure\u0060 name in the database.", + "description": "Defaults to \u0060sp\u0060 \u002B \u0060Table.Name\u0060 \u002B \u0060Name\u0060; e.g. \u0060spTableName\u0060 or \u0060spPersonGet\u0060." }, "reselectStatement": { "type": "string", - "title": "The SQL statement to perform the reselect after a 'Create', 'Update' or 'Upsert' stored procedure operation 'Type'.", - "description": "Defaults to '[{{Table.Schema}}].[sp{{Table.Name}}Get]' passing the primary key column(s)." + "title": "The SQL statement to perform the reselect after a \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060 stored procedure operation \u0060Type\u0060.", + "description": "Defaults to \u0060[{{Table.Schema}}].[sp{{Table.Name}}Get]\u0060 passing the primary key column(s)." }, "intoTempTable": { "type": "boolean", - "title": "Indicates whether to select into a '#TempTable' to allow other statements access to the selected data.", - "description": "A 'Select * from #TempTable' is also performed (code-generated) where the stored procedure operation 'Type' is 'GetColl'." + "title": "Indicates whether to select into a \u0060#TempTable\u0060 to allow other statements access to the selected data.", + "description": "A \u0060Select * from #TempTable\u0060 is also performed (code-generated) where the stored procedure operation \u0060Type\u0060 is \u0060GetColl\u0060." }, "withHints": { "type": "string", - "title": "the table hints using the SQL Server 'WITH()' statement; the value specified will be used as-is; e.g. 'NOLOCK' will result in 'WITH(NOLOCK)'." + "title": "the table hints using the SQL Server \u0060WITH()\u0060 statement; the value specified will be used as-is; e.g. \u0060NOLOCK\u0060 will result in \u0060WITH(NOLOCK)\u0060." }, "mergeOverrideIdentityColumns": { "type": "array", - "title": "The list of 'Column' names to be used in the 'Merge' statement to determine whether to _insert_, _update_ or _delete_.", + "title": "The list of \u0060Column\u0060 names to be used in the \u0060Merge\u0060 statement to determine whether to _insert_, _update_ or _delete_.", "description": "This is used to override the default behaviour of using the primary key column(s).", "items": { "type": "string" @@ -430,53 +430,53 @@ }, "permission": { "type": "string", - "title": "The name of the 'StoredProcedure' in the database." + "title": "The name of the \u0060StoredProcedure\u0060 in the database." }, "orgUnitImmutable": { "type": "boolean", - "title": "Indicates whether the 'OrgUnitId' column is considered immutable, in that it can not be changed once set.", - "description": "Defaults to 'Table.OrgUnitImmutable'." + "title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.", + "description": "Defaults to \u0060Table.OrgUnitImmutable\u0060." }, "includeColumns": { "type": "array", - "title": "The list of 'Column' names to be included in the underlying generated _settable_ output (further filters 'Table.IncludeColumns').", - "description": "Where not specified this indicates that all 'Columns' are to be included. Only filters the columns where 'Type' is 'Get', 'GetColl', 'Create', 'Update' or 'Upsert'.", + "title": "The list of \u0060Column\u0060 names to be included in the underlying generated _settable_ output (further filters \u0060Table.IncludeColumns\u0060).", + "description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included. Only filters the columns where \u0060Type\u0060 is \u0060Get\u0060, \u0060GetColl\u0060, \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060.", "items": { "type": "string" } }, "excludeColumns": { "type": "array", - "title": "The list of 'Column' names to be excluded from the underlying generated _settable_ output (further filters 'Table.ExcludeColumns').", - "description": "Where not specified this indicates no 'Columns' are to be excluded. Only filters the columns where 'Type' is 'Get', 'GetColl', 'Create', 'Update' or 'Upsert'.", + "title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated _settable_ output (further filters \u0060Table.ExcludeColumns\u0060).", + "description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded. Only filters the columns where \u0060Type\u0060 is \u0060Get\u0060, \u0060GetColl\u0060, \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060.", "items": { "type": "string" } }, "parameters": { "type": "array", - "title": "The corresponding 'Parameter' collection.", + "title": "The corresponding \u0060Parameter\u0060 collection.", "items": { "$ref": "#/definitions/Parameter" } }, "where": { "type": "array", - "title": "The corresponding 'Where' collection.", + "title": "The corresponding \u0060Where\u0060 collection.", "items": { "$ref": "#/definitions/Where" } }, "orderby": { "type": "array", - "title": "The corresponding 'OrderBy' collection.", + "title": "The corresponding \u0060OrderBy\u0060 collection.", "items": { "$ref": "#/definitions/OrderBy" } }, "execute": { "type": "array", - "title": "The corresponding 'Execute' collection.", + "title": "The corresponding \u0060Execute\u0060 collection.", "items": { "$ref": "#/definitions/Execute" } @@ -488,17 +488,17 @@ }, "Parameter": { "type": "object", - "title": "'Parameter' object (database-driven)", - "description": "The 'Parameter' is used to define a stored procedure parameter and its charateristics. These are in addition to those that are automatically inferred (added) by the selected 'StoredProcedure.Type'.", + "title": "\u0027Parameter\u0027 object (database-driven)", + "description": "The \u0060Parameter\u0060 is used to define a stored procedure parameter and its charateristics. These are in addition to those that are automatically inferred (added) by the selected \u0060StoredProcedure.Type\u0060.", "properties": { "name": { "type": "string", - "title": "The parameter name (without the '@' prefix)." + "title": "The parameter name (without the \u0060@\u0060 prefix)." }, "column": { "type": "string", "title": "The corresponding column name; used to infer characteristics.", - "description": "Defaults to 'Name'." + "description": "Defaults to \u0060Name\u0060." }, "sqlType": { "type": "string", @@ -507,20 +507,20 @@ "nullable": { "type": "boolean", "title": "Indicates whether the parameter is nullable.", - "description": "Note that when the parameter value is 'NULL' it will not be included in the query." + "description": "Note that when the parameter value is \u0060NULL\u0060 it will not be included in the query." }, "treatColumnNullAs": { "type": "boolean", - "title": "Indicates whether the column value where NULL should be treated as the specified value; results in: 'ISNULL([x].[col], value)'." + "title": "Indicates whether the column value where NULL should be treated as the specified value; results in: \u0060ISNULL([x].[col], value)\u0060." }, "collection": { "type": "boolean", - "title": "Indicates whether the parameter is a collection (one or more values to be included 'IN' the query)." + "title": "Indicates whether the parameter is a collection (one or more values to be included \u0060IN\u0060 the query)." }, "operator": { "type": "string", "title": "The where clause equality operator", - "description": "Defaults to 'EQ'.", + "description": "Defaults to \u0060EQ\u0060.", "enum": [ "EQ", "NE", @@ -538,8 +538,8 @@ }, "Where": { "type": "object", - "title": "'Where' object (database-driven)", - "description": "The 'Where' object defines an additional where 'Statement' to be added. This is in addition to those automatically added based on the 'StoredProcedure.Type'.", + "title": "\u0027Where\u0027 object (database-driven)", + "description": "The \u0060Where\u0060 object defines an additional where \u0060Statement\u0060 to be added. This is in addition to those automatically added based on the \u0060StoredProcedure.Type\u0060.", "properties": { "statement": { "type": "string", @@ -552,17 +552,17 @@ }, "OrderBy": { "type": "object", - "title": "'OrderBy' object (database-driven)", - "description": "The 'OrderBy' object defines the query order. Only valid for 'StoredProcedure.Type' of 'GetAll'.", + "title": "\u0027OrderBy\u0027 object (database-driven)", + "description": "The \u0060OrderBy\u0060 object defines the query order. Only valid for \u0060StoredProcedure.Type\u0060 of \u0060GetAll\u0060.", "properties": { "name": { "type": "string", - "title": "The name of the 'Column' to order by." + "title": "The name of the \u0060Column\u0060 to order by." }, "order": { "type": "string", "title": "The corresponding sort order.", - "description": "Defaults to 'Ascending'.", + "description": "Defaults to \u0060Ascending\u0060.", "enum": [ "Ascending", "Descending" @@ -575,7 +575,7 @@ }, "Execute": { "type": "object", - "title": "'Execute' object (database-driven)", + "title": "\u0027Execute\u0027 object (database-driven)", "description": "The _Execute_ object enables additional TSQL statements to be embedded within the stored procedure.", "properties": { "statement": { @@ -585,7 +585,7 @@ "location": { "type": "string", "title": "The location of the statement in relation to the underlying primary stored procedure statement.", - "description": "Defaults to 'After'.", + "description": "Defaults to \u0060After\u0060.", "enum": [ "Before", "After" @@ -598,8 +598,8 @@ }, "Relationship": { "type": "object", - "title": "'Relationship' object (database-driven)", - "description": "The 'Relationship' object enables the definition of an entity framework (EF) model relationship.", + "title": "\u0027Relationship\u0027 object (database-driven)", + "description": "The \u0060Relationship\u0060 object enables the definition of an entity framework (EF) model relationship.", "properties": { "name": { "type": "string", @@ -608,12 +608,12 @@ "schema": { "type": "string", "title": "The schema name of the primary table of the view.", - "description": "Defaults to 'CodeGeneration.Schema'." + "description": "Defaults to \u0060CodeGeneration.Schema\u0060." }, "type": { "type": "string", "title": "The relationship type between the parent and child (self).", - "description": "Defaults to 'OneToMany'.", + "description": "Defaults to \u0060OneToMany\u0060.", "enum": [ "OneToMany", "ManyToOne" @@ -621,14 +621,14 @@ }, "foreignKeyColumns": { "type": "array", - "title": "The list of 'Column' names from the related table that reference the parent.", + "title": "The list of \u0060Column\u0060 names from the related table that reference the parent.", "items": { "type": "string" } }, "principalKeyColumns": { "type": "array", - "title": "The list of 'Column' names from the principal table that reference the child.", + "title": "The list of \u0060Column\u0060 names from the principal table that reference the child.", "description": " Typically this is only used where referencing property(s) other than the primary key as the principal property(s).", "items": { "type": "string" @@ -637,7 +637,7 @@ "onDelete": { "type": "string", "title": "The operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.", - "description": "Defaults to 'NoAction'. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.deletebehavior for more information.", + "description": "Defaults to \u0060NoAction\u0060. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.deletebehavior for more information.", "enum": [ "NoAction", "Cascade", @@ -651,17 +651,17 @@ "autoInclude": { "type": "boolean", "title": "Indicates whether to automatically include navigation to the property.", - "description": "Defaults to 'false'." + "description": "Defaults to \u0060false\u0060." }, "propertyName": { "type": "string", "title": "The corresponding property name within the entity framework (EF) model.", - "description": "Defaults to 'Name' using the 'CodeGeneration.AutoDotNetRename' option." + "description": "Defaults to \u0060Name\u0060 using the \u0060CodeGeneration.AutoDotNetRename\u0060 option." }, "efModelName": { "type": "string", "title": "The corresponding entity framework (EF) model name (.NET Type).", - "description": "Defaults to 'Name' using the 'CodeGeneration.AutoDotNetRename' option." + "description": "Defaults to \u0060Name\u0060 using the \u0060CodeGeneration.AutoDotNetRename\u0060 option." } }, "required": [ @@ -670,8 +670,8 @@ }, "Query": { "type": "object", - "title": "'Query' object (database-driven)", - "description": "The 'Query' object enables the definition of more complex multi-table queries ('Joins') that would primarily result in a database _View_. The primary table 'Name' for the query is required to be specified. Multiple queries can be specified for the same table(s). The 'IncludeColumns' and 'ExcludeColumns' provide a shorthand to include or exclude selected columns; with the 'AliasColumns' providing a means to rename where required (for example duplicate name). Additional 'Where' and 'Order' configuration can also be added as required.", + "title": "\u0027Query\u0027 object (database-driven)", + "description": "The \u0060Query\u0060 object enables the definition of more complex multi-table queries (\u0060Joins\u0060) that would primarily result in a database _View_. The primary table \u0060Name\u0060 for the query is required to be specified. Multiple queries can be specified for the same table(s). The \u0060IncludeColumns\u0060 and \u0060ExcludeColumns\u0060 provide a shorthand to include or exclude selected columns; with the \u0060AliasColumns\u0060 providing a means to rename where required (for example duplicate name). Additional \u0060Where\u0060 and \u0060Order\u0060 configuration can also be added as required.", "properties": { "name": { "type": "string", @@ -680,123 +680,123 @@ "schema": { "type": "string", "title": "The schema name of the primary table of the view.", - "description": "Defaults to 'CodeGeneration.Schema'." + "description": "Defaults to \u0060CodeGeneration.Schema\u0060." }, "alias": { "type": "string", - "title": "The 'Schema.Table' alias name.", + "title": "The \u0060Schema.Table\u0060 alias name.", "description": "Will automatically default where not specified." }, "includeColumns": { "type": "array", - "title": "The list of 'Column' names to be included in the underlying generated output.", - "description": "Where not specified this indicates that all 'Columns' are to be included.", + "title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.", + "description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.", "items": { "type": "string" } }, "excludeColumns": { "type": "array", - "title": "The list of 'Column' names to be excluded from the underlying generated output.", - "description": "Where not specified this indicates no 'Columns' are to be excluded.", + "title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.", + "description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.", "items": { "type": "string" } }, "aliasColumns": { "type": "array", - "title": "The list of 'Column' and 'Alias' pairs (split by a '^' lookup character) to enable column aliasing/renaming.", - "description": "Each alias value should be formatted as 'Column' + '^' + 'Alias'; e.g. 'PCODE^ProductCode'", + "title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.", + "description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060", "items": { "type": "string" } }, "view": { "type": "boolean", - "title": "Indicates whether a 'View' is to be generated." + "title": "Indicates whether a \u0060View\u0060 is to be generated." }, "viewName": { "type": "string", - "title": "The 'View' name.", - "description": "Defaults to 'vw' + 'Name'; e.g. 'vwTableName'." + "title": "The \u0060View\u0060 name.", + "description": "Defaults to \u0060vw\u0060 \u002B \u0060Name\u0060; e.g. \u0060vwTableName\u0060." }, "viewSchema": { "type": "string", - "title": "The schema name for the 'View'.", - "description": "Defaults to 'Schema'." + "title": "The schema name for the \u0060View\u0060.", + "description": "Defaults to \u0060Schema\u0060." }, "permission": { "type": "string", "title": "The permission to be used for security permission checking.", - "description": "The suffix is optional, and where not specified will default to '.READ'." + "description": "The suffix is optional, and where not specified will default to \u0060.READ\u0060." }, "columnNameIsDeleted": { "type": "string", - "title": "The column name for the 'IsDeleted' capability.", - "description": "Defaults to 'CodeGeneration.IsDeleted'." + "title": "The column name for the \u0060IsDeleted\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060." }, "columnNameTenantId": { "type": "string", - "title": "The column name for the 'TenantId' capability.", - "description": "Defaults to 'CodeGeneration.TenantId'." + "title": "The column name for the \u0060TenantId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.TenantId\u0060." }, "columnNameOrgUnitId": { "type": "string", - "title": "The column name for the 'OrgUnitId' capability.", - "description": "Defaults to 'CodeGeneration.OrgUnitId'." + "title": "The column name for the \u0060OrgUnitId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060." }, "columnNameRowVersion": { "type": "string", - "title": "The column name for the 'RowVersion' capability.", - "description": "Defaults to 'CodeGeneration.RowVersion'." + "title": "The column name for the \u0060RowVersion\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.RowVersion\u0060." }, "columnNameCreatedBy": { "type": "string", - "title": "The column name for the 'CreatedBy' capability.", - "description": "Defaults to 'CodeGeneration.CreatedBy'." + "title": "The column name for the \u0060CreatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060." }, "columnNameCreatedDate": { "type": "string", - "title": "The column name for the 'CreatedDate' capability.", - "description": "Defaults to 'CodeGeneration.CreatedDate'." + "title": "The column name for the \u0060CreatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060." }, "columnNameUpdatedBy": { "type": "string", - "title": "The column name for the 'UpdatedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060UpdatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameUpdatedDate": { "type": "string", - "title": "The column name for the 'UpdatedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060UpdatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "columnNameDeletedBy": { "type": "string", - "title": "The column name for the 'DeletedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060DeletedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameDeletedDate": { "type": "string", - "title": "The column name for the 'DeletedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060DeletedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "joins": { "type": "array", - "title": "The corresponding 'Join' collection.", + "title": "The corresponding \u0060Join\u0060 collection.", "items": { "$ref": "#/definitions/QueryJoin" } }, "order": { "type": "array", - "title": "The corresponding 'Order' collection.", + "title": "The corresponding \u0060Order\u0060 collection.", "items": { "$ref": "#/definitions/QueryOrder" } }, "where": { "type": "array", - "title": "The corresponding 'Where' collection.", + "title": "The corresponding \u0060Where\u0060 collection.", "items": { "$ref": "#/definitions/QueryWhere" } @@ -808,8 +808,8 @@ }, "QueryJoin": { "type": "object", - "title": "'QueryJoin' object (database-driven)", - "description": "The 'QueryJoin' object defines a join to another (or same) table within a query. The 'Type' defines the join type, such as inner join, etc. The 'IncludeColumns' and 'ExcludeColumns' provide a shorthand to include or exclude selected columns; with the 'AliasColumns' providing a means to rename where required (for example duplicate name).", + "title": "\u0027QueryJoin\u0027 object (database-driven)", + "description": "The \u0060QueryJoin\u0060 object defines a join to another (or same) table within a query. The \u0060Type\u0060 defines the join type, such as inner join, etc. The \u0060IncludeColumns\u0060 and \u0060ExcludeColumns\u0060 provide a shorthand to include or exclude selected columns; with the \u0060AliasColumns\u0060 providing a means to rename where required (for example duplicate name).", "properties": { "name": { "type": "string", @@ -818,17 +818,17 @@ "schema": { "type": "string", "title": "The schema name of the table to join.", - "description": "Defaults to 'Table.Schema'; i.e. same schema." + "description": "Defaults to \u0060Table.Schema\u0060; i.e. same schema." }, "alias": { "type": "string", - "title": "The 'Schema.Table' alias name.", + "title": "The \u0060Schema.Table\u0060 alias name.", "description": "Will automatically default where not specified." }, "type": { "type": "string", "title": "The SQL join type.", - "description": "Defaults to 'Inner'.", + "description": "Defaults to \u0060Inner\u0060.", "enum": [ "Inner", "Left", @@ -838,81 +838,81 @@ }, "includeColumns": { "type": "array", - "title": "The list of 'Column' names to be included in the underlying generated output.", - "description": "Where not specified this indicates that all 'Columns' are to be included.", + "title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.", + "description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.", "items": { "type": "string" } }, "excludeColumns": { "type": "array", - "title": "The list of 'Column' names to be excluded from the underlying generated output.", - "description": "Where not specified this indicates no 'Columns' are to be excluded.", + "title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.", + "description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.", "items": { "type": "string" } }, "aliasColumns": { "type": "array", - "title": "The list of 'Column' and 'Alias' pairs (split by a '^' lookup character) to enable column renaming.", - "description": "Each alias value should be formatted as 'Column' + '^' + 'Alias'; e.g. 'PCODE^ProductCode'", + "title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column renaming.", + "description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060", "items": { "type": "string" } }, "columnNameIsDeleted": { "type": "string", - "title": "The column name for the 'IsDeleted' capability.", - "description": "Defaults to 'CodeGeneration.IsDeleted'." + "title": "The column name for the \u0060IsDeleted\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060." }, "columnNameTenantId": { "type": "string", - "title": "The column name for the 'TenantId' capability.", - "description": "Defaults to 'CodeGeneration.TenantId'." + "title": "The column name for the \u0060TenantId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.TenantId\u0060." }, "columnNameOrgUnitId": { "type": "string", - "title": "The column name for the 'OrgUnitId' capability.", - "description": "Defaults to 'CodeGeneration.OrgUnitId'." + "title": "The column name for the \u0060OrgUnitId\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060." }, "columnNameRowVersion": { "type": "string", - "title": "The column name for the 'RowVersion' capability.", - "description": "Defaults to 'CodeGeneration.RowVersion'." + "title": "The column name for the \u0060RowVersion\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.RowVersion\u0060." }, "columnNameCreatedBy": { "type": "string", - "title": "The column name for the 'CreatedBy' capability.", - "description": "Defaults to 'CodeGeneration.CreatedBy'." + "title": "The column name for the \u0060CreatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060." }, "columnNameCreatedDate": { "type": "string", - "title": "The column name for the 'CreatedDate' capability.", - "description": "Defaults to 'CodeGeneration.CreatedDate'." + "title": "The column name for the \u0060CreatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060." }, "columnNameUpdatedBy": { "type": "string", - "title": "The column name for the 'UpdatedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060UpdatedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameUpdatedDate": { "type": "string", - "title": "The column name for the 'UpdatedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060UpdatedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "columnNameDeletedBy": { "type": "string", - "title": "The column name for the 'DeletedBy' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedBy'." + "title": "The column name for the \u0060DeletedBy\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060." }, "columnNameDeletedDate": { "type": "string", - "title": "The column name for the 'DeletedDate' capability.", - "description": "Defaults to 'CodeGeneration.UpdatedDate'." + "title": "The column name for the \u0060DeletedDate\u0060 capability.", + "description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060." }, "on": { "type": "array", - "title": "The corresponding 'JoinOn' collection.", + "title": "The corresponding \u0060JoinOn\u0060 collection.", "items": { "$ref": "#/definitions/QueryJoinOn" } @@ -924,31 +924,31 @@ }, "QueryJoinOn": { "type": "object", - "title": "'QueryJoinOn' object (database-driven)", - "description": "The 'QueryJoinOn' object defines the join on characteristics for a join within a query.", + "title": "\u0027QueryJoinOn\u0027 object (database-driven)", + "description": "The \u0060QueryJoinOn\u0060 object defines the join on characteristics for a join within a query.", "properties": { "name": { "type": "string", - "title": "The name of the join column (from the 'Join' table)." + "title": "The name of the join column (from the \u0060Join\u0060 table)." }, "toSchema": { "type": "string", "title": "The name of the other join to table schema.", - "description": "Defaults to 'Table.Schema'; i.e. same schema. See also 'ToTable' and 'ToColumn' as these all relate." + "description": "Defaults to \u0060Table.Schema\u0060; i.e. same schema. See also \u0060ToTable\u0060 and \u0060ToColumn\u0060 as these all relate." }, "toTable": { "type": "string", "title": "The name of the other join to table.", - "description": "Defaults to 'Table.Name'; i.e. primary table. See also 'ToSchema' and 'ToColumn' as these all relate." + "description": "Defaults to \u0060Table.Name\u0060; i.e. primary table. See also \u0060ToSchema\u0060 and \u0060ToColumn\u0060 as these all relate." }, "toColumn": { "type": "string", "title": "The name of the other join to column.", - "description": "Defaults to 'Name'; i.e. assumes same name. See also 'ToSchema' and 'ToTable' as these all relate." + "description": "Defaults to \u0060Name\u0060; i.e. assumes same name. See also \u0060ToSchema\u0060 and \u0060ToTable\u0060 as these all relate." }, "toStatement": { "type": "string", - "title": "The fully qualified name ('Alias.Name') of the other column being joined to or other valid SQL (e.g. function) bypassing the corresponding 'Schema', 'Table' and 'Column' logic." + "title": "The fully qualified name (\u0060Alias.Name\u0060) of the other column being joined to or other valid SQL (e.g. function) bypassing the corresponding \u0060Schema\u0060, \u0060Table\u0060 and \u0060Column\u0060 logic." } }, "required": [ @@ -957,28 +957,28 @@ }, "QueryOrder": { "type": "object", - "title": "'QueryOrder' object (database-driven)", - "description": "The 'QueryOrder' object that defines the query order.", + "title": "\u0027QueryOrder\u0027 object (database-driven)", + "description": "The \u0060QueryOrder\u0060 object that defines the query order.", "properties": { "name": { "type": "string", - "title": "The name of the 'Column' to order by.", - "description": "See also 'Schema' and 'Table' as these all relate." + "title": "The name of the \u0060Column\u0060 to order by.", + "description": "See also \u0060Schema\u0060 and \u0060Table\u0060 as these all relate." }, "schema": { "type": "string", - "title": "The name of order by table schema. See also 'Name' and 'Column' as these all relate.", - "description": "Defaults to 'Query.Schema'." + "title": "The name of order by table schema. See also \u0060Name\u0060 and \u0060Column\u0060 as these all relate.", + "description": "Defaults to \u0060Query.Schema\u0060." }, "table": { "type": "string", "title": "The name of the order by table.", - "description": "Defaults to 'Table.Name'; i.e. primary table. See also 'Schema' and 'Column' as these all relate." + "description": "Defaults to \u0060Table.Name\u0060; i.e. primary table. See also \u0060Schema\u0060 and \u0060Column\u0060 as these all relate." }, "order": { "type": "string", "title": "The corresponding sort order.", - "description": "Defaults to 'Ascending'.", + "description": "Defaults to \u0060Ascending\u0060.", "enum": [ "Ascending", "Descending" @@ -991,8 +991,8 @@ }, "QueryWhere": { "type": "object", - "title": "'QueryWhere' object (database-driven)", - "description": "The 'QueryWhere' object defines an additional where 'Statement' to be added.", + "title": "\u0027QueryWhere\u0027 object (database-driven)", + "description": "The \u0060QueryWhere\u0060 object defines an additional where \u0060Statement\u0060 to be added.", "properties": { "statement": { "type": "string", diff --git a/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json b/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json index 2adcf94e3..86391b15b 100644 --- a/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json +++ b/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json @@ -4,13 +4,13 @@ "definitions": { "CodeGeneration": { "type": "object", - "title": "'CodeGeneration' object (entity-driven)", - "description": "The 'CodeGeneration' object defines global properties that are used to drive the underlying entity-driven code generation.", + "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 'CoreEx.Results' (aka Railway-oriented programming).", - "description": "Defaults to 'true'. This can be overridden within the 'Entity'(s) and/or 'Operation'(s)." + "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", @@ -18,18 +18,18 @@ }, "refDataNamespace": { "type": "string", - "title": "The namespace for the Reference Data entities (adds as a c# 'using' statement).", - "description": "Defaults to 'Company' + '.' (literal) + AppName + '.Business.Entities' (literal)." + "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# 'using' statement).", - "description": "Defaults to 'Company' + '.' (literal) + AppName + '.Common.Entities' (literal)." + "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 'Text' property is added when generating a Reference Data 'Property' for an 'Entity'.", - "description": "This is used where serializing within the Web API 'Controller' and the 'ExecutionContext.IsRefDataTextSerializationEnabled' is set to 'true' (which is automatically set where the url contains '$text=true'). This can be further configured on the 'Entity' and for each 'Property'." + "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", @@ -44,12 +44,12 @@ }, "refDataWebApiRoute": { "type": "string", - "title": "The 'RouteAtttribute' for the Reference Data Web API controller required for named pre-fetching. The 'WebApiRoutePrefix' will be prepended where specified." + "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 'ReferenceDataData' constructor.", - "description": "Each constructor parameter should be formatted as 'Type' + '^' + 'Name'; e.g. 'IConfiguration^Config'. Where the 'Name' portion is not specified it will be inferred. Where the 'Type' matches an already inferred value it will be ignored.", + "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" } @@ -57,7 +57,7 @@ "jsonSerializer": { "type": "string", "title": "The JSON Serializer to use for JSON property attribution.", - "description": "Defaults to 'SystemText'. This can be overridden within the 'Entity'(s).", + "description": "Defaults to \u0060SystemText\u0060. This can be overridden within the \u0060Entity\u0060(s).", "enum": [ "SystemText", "Newtonsoft" @@ -65,8 +65,8 @@ }, "etagJsonName": { "type": "string", - "title": "The default JSON name for the 'ETag' property.", - "description": "Defaults to 'etag'. Note that the 'JsonName' can be set individually per property where required.", + "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", @@ -78,42 +78,42 @@ }, "usingNamespace1": { "type": "string", - "title": "The additional Namespace using statement to be added to the generated 'Entity' code.", - "description": "Typically used where referening a 'Type' from a Namespace that is not generated by default." + "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 'Entity' code.", - "description": "Typically used where referening a 'Type' from a Namespace that is not generated by default." + "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 'Entity' code.", - "description": "Typically used where referening a 'Type' from a Namespace that is not generated by default." + "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 'Authorize' or 'AllowAnonymous'.", - "description": "This can be overridden within the 'Entity'(s) and/or their corresponding 'Operation'(s)." + "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 ('Operation.WebApiLocation') is automatically inferred.", - "description": "This will automatically set the 'Operation.WebApiLocation' for an 'Operation' named 'Create' where there is a corresponding named 'Get'. This can be overridden within the 'Entity'(s)." + "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) 'URI' prepended to all 'Operation.WebApiRoute' values." + "title": "The base (prefix) \u0060URI\u0060 prepended to all \u0060Operation.WebApiRoute\u0060 values." }, "managerCleanUp": { "type": "boolean", - "title": "Indicates whether a 'Cleaner.Cleanup' is performed for the operation parameters within the Manager-layer.", - "description": "This can be overridden within the 'Entity'(s) and 'Operation'(s)." + "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 'Validation' framework to use for the entity-based validation.", - "description": "Defaults to 'CoreEx' (literal). This can be overridden within the 'Entity'(s), 'Operation'(s) and 'Parameter'(s).", + "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" @@ -122,7 +122,7 @@ "autoImplement": { "type": "string", "title": "The data source auto-implementation option.", - "description": "Defaults to 'None'. Indicates that the implementation for the underlying 'Operations' 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 'AutoImplement' can be further specified/overridden per 'Operation'.", + "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", @@ -134,18 +134,18 @@ }, "databaseName": { "type": "string", - "title": "The .NET database interface name (used where 'Operation.AutoImplement' is 'Database').", - "description": "Defaults to 'IDatabase'. This can be overridden within the 'Entity'(s)." + "title": "The .NET database interface name (used where \u0060Operation.AutoImplement\u0060 is \u0060Database\u0060).", + "description": "Defaults to \u0060IDatabase\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "databaseSchema": { "type": "string", "title": "The default database schema name.", - "description": "Defaults to 'dbo'." + "description": "Defaults to \u0060dbo\u0060." }, "databaseProvider": { "type": "string", "title": "The default database schema name.", - "description": "Defaults to 'SqlServer'. Enables specific database provider functionality/formatting/etc. where applicable.", + "description": "Defaults to \u0060SqlServer\u0060. Enables specific database provider functionality/formatting/etc. where applicable.", "enum": [ "SqlServer", "MySQL" @@ -153,98 +153,98 @@ }, "entityFrameworkName": { "type": "string", - "title": "The .NET Entity Framework interface name used where 'Operation.AutoImplement' is 'EntityFramework'.", - "description": "Defaults to 'IEfDb'. This can be overridden within the 'Entity'(s)." + "title": "The .NET Entity Framework interface name used where \u0060Operation.AutoImplement\u0060 is \u0060EntityFramework\u0060.", + "description": "Defaults to \u0060IEfDb\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "cosmosName": { "type": "string", - "title": "The .NET Entity Framework interface name used where 'Operation.AutoImplement' is 'Cosmos'.", - "description": "Defaults to 'ICosmosDb'. This can be overridden within the 'Entity'(s)." + "title": "The .NET Entity Framework interface name used where \u0060Operation.AutoImplement\u0060 is \u0060Cosmos\u0060.", + "description": "Defaults to \u0060ICosmosDb\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "odataName": { "type": "string", - "title": "The .NET OData interface name used where 'Operation.AutoImplement' is 'OData'.", - "description": "Defaults to 'IOData'. This can be overridden within the 'Entity'(s)." + "title": "The .NET OData interface name used where \u0060Operation.AutoImplement\u0060 is \u0060OData\u0060.", + "description": "Defaults to \u0060IOData\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "httpAgentName": { "type": "string", - "title": "The default .NET HTTP Agent interface name used where 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "Defaults to 'IHttpAgent'. This can be overridden within the 'Entity'(s)." + "title": "The default .NET HTTP Agent interface name used where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", + "description": "Defaults to \u0060IHttpAgent\u0060. This can be overridden within the \u0060Entity\u0060(s)." }, "etagDefaultMapperConverter": { "type": "string", - "title": "The default ETag to/from RowVersion column Mapping Converter used where 'Operation.AutoImplement' is 'Database' or 'EntityFramework'.", - "description": "Defaults to 'StringToBase64Converter'." + "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 'Converter' used by the generated 'Mapper'(s) where not specifically defined.", - "description": "Defaults to 'ReferenceDataCodeConverter'. Where this value is suffixed by '' or '{T}' this will automatically be set to the 'Type'.", + "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", + "ReferenceDataCodeConverter\u003CT\u003E", "ReferenceDataIdConverter{T, int}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, int\u003E", "ReferenceDataIdConverter{T, int?}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, int?\u003E", "ReferenceDataIdConverter{T, long}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, long\u003E", "ReferenceDataIdConverter{T, long?}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, long?\u003E", "ReferenceDataIdConverter{T, Guid}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, Guid\u003E", "ReferenceDataIdConverter{T, Guid?}", - "ReferenceDataIdConverter", + "ReferenceDataIdConverter\u003CT, Guid?\u003E", "ReferenceDataInt32IdConverter", "ReferenceDataInt32IdConverter{T}", - "ReferenceDataInt32IdConverter", + "ReferenceDataInt32IdConverter\u003CT\u003E", "ReferenceDataNullableInt32IdConverter", "ReferenceDataNullableInt32IdConverter{T}", - "ReferenceDataNullableInt32IdConverter", + "ReferenceDataNullableInt32IdConverter\u003CT\u003E", "ReferenceDataInt64IdConverter", "ReferenceDataInt64IdConverter{T}", - "ReferenceDataInt64IdConverter", + "ReferenceDataInt64IdConverter\u003CT\u003E", "ReferenceDataNullableInt64IdConverter", "ReferenceDataNullableInt64IdConverter{T}", - "ReferenceDataNullableInt64IdConverter", + "ReferenceDataNullableInt64IdConverter\u003CT\u003E", "ReferenceDataGuidIdConverter", "ReferenceDataGuidIdConverter{T}", - "ReferenceDataGuidIdConverter", + "ReferenceDataGuidIdConverter\u003CT\u003E", "ReferenceDataNullableGuidIdConverter", "ReferenceDataNullableGuidIdConverter{T}", - "ReferenceDataNullableGuidIdConverter" + "ReferenceDataNullableGuidIdConverter\u003CT\u003E" ] }, "refDataCodeDataName": { "type": "string", - "title": "The Reference Data 'Code' data name.", - "description": "Defaults to 'Code' (literal)." + "title": "The Reference Data \u0060Code\u0060 data name.", + "description": "Defaults to \u0060Code\u0060 (literal)." }, "refDataTextDataName": { "type": "string", - "title": "The Reference Data 'Text' data name.", - "description": "Defaults to 'Text' (literal)." + "title": "The Reference Data \u0060Text\u0060 data name.", + "description": "Defaults to \u0060Text\u0060 (literal)." }, "refDataIsActiveDataName": { "type": "string", - "title": "The Reference Data 'IsActive' data name.", - "description": "Defaults to 'IsActive' (literal)." + "title": "The Reference Data \u0060IsActive\u0060 data name.", + "description": "Defaults to \u0060IsActive\u0060 (literal)." }, "refDataSortOrderDataName": { "type": "string", - "title": "The Reference Data 'SortOrder' data name.", - "description": "Defaults to 'SortOrder' (literal)." + "title": "The Reference Data \u0060SortOrder\u0060 data name.", + "description": "Defaults to \u0060SortOrder\u0060 (literal)." }, "refDataETagDataName": { "type": "string", - "title": "The Reference Data 'ETag' data name.", - "description": "Defaults to 'RowVersion' (literal)." + "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 'Create', 'Update' or 'Delete' operation.", - "description": "Defaults to 'DataSvc'. Used to enable the sending of messages to the likes of EventHub, ServiceBus, SignalR, etc. This can be overridden within the 'Entity'(s).", + "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", @@ -254,12 +254,12 @@ "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 'EventSourceKind' is not 'None'. This can be extended within the 'Entity'(s)." + "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 'None' (being the event source is not updated).", + "description": "Defaults to \u0060None\u0060 (being the event source is not updated).", "enum": [ "None", "Absolute", @@ -270,17 +270,17 @@ "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 'Entity'(s)." + "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 '.'. Used only where the subject is automatically inferred." + "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 'None' (no formatting required, i.e. as-is)'.", + "description": "Defaults to \u0060None\u0060 (no formatting required, i.e. as-is)\u0060.", "enum": [ "None", "PastTense" @@ -288,57 +288,57 @@ }, "eventTransaction": { "type": "boolean", - "title": "Indicates whether a 'System.TransactionScope' should be created and orchestrated at the 'DataSvc'-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 'EventPublish' 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 'false'. This essentially defaults the 'Entity.EventTransaction' where not otherwise specified. This should only be used where 'EventPublish' is 'DataSvc' and a transactionally-aware data source is being used." + "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 'true' for any of the subordinate gRPC capabilities to be code-generated. Will require each 'Entity', and corresponding 'Property' and 'Operation' to be opted-in specifically." + "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 'Path*' properties append to this value when they are not specifically overridden.", - "description": "Defaults to 'Company' (runtime parameter) + '.' + 'AppName' (runtime parameter). For example 'Beef.Demo'." + "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 'PathBase' + '.Common' (literal). For example 'Beef.Demo.Common'." + "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 'PathBase' + '.Business' (literal). For example 'Beef.Demo.Business'." + "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 'PathBase' + '.' + 'ApiName' (runtime parameter). For example 'Beef.Demo.Api'." + "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 'Company' (runtime parameter) + '.' + 'AppName' (runtime parameter). For example 'Beef.Demo'." + "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 'NamespaceBase' + '.Common' (literal). For example 'Beef.Demo.Common'." + "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 'NamespaceBase' + '.Business' (literal). For example 'Beef.Demo.Business'." + "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 'NamespaceBase' + '.' + 'ApiName' (runtime parameter). For example 'Beef.Demo.Api'." + "description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.\u0060 \u002B \u0060ApiName\u0060 (runtime parameter). For example \u0060Beef.Demo.Api\u0060." }, "entities": { "type": "array", - "title": "The corresponding 'Entity' collection.", + "title": "The corresponding \u0060Entity\u0060 collection.", "items": { "$ref": "#/definitions/Entity" } @@ -347,8 +347,8 @@ }, "Entity": { "type": "object", - "title": "'Entity' object (entity-driven)", - "description": "The 'Entity' is used as the primary configuration for driving the entity-driven code generation.", + "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", @@ -357,7 +357,7 @@ "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: 'Represents the {Text} entity.'. To create a '' within use moustache shorthand (e.g. {{Xxx}})." + "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}})." }, "fileName": { "type": "string", @@ -367,17 +367,17 @@ "privateName": { "type": "string", "title": "The overriding private name.", - "description": "Overrides the 'Name' to be used for private fields. By default reformatted from 'Name'; e.g. 'FirstName' as '_firstName'." + "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 'Name' to be used for argument parameters. By default reformatted from 'Name'; e.g. 'FirstName' as 'firstName'." + "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 'const' values. Defaults to 'string'.", + "description": "The .NET Type to be used for the \u0060const\u0060 values. Defaults to \u0060string\u0060.", "enum": [ "int", "long", @@ -387,13 +387,13 @@ }, "isInitialOverride": { "type": "boolean", - "title": "Indicates whether to override the 'IInitial.IsInitial' property.", - "description": "Set to either 'true' or 'false' to override as specified; otherwise, 'null' to check each property. Defaults to 'null'." + "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 'CoreEx.Results' (aka Railway-oriented programming).", - "description": "Defaults to 'CodeGeneration.WithResult'. This can be overridden within the Operation'(s)." + "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", @@ -408,13 +408,13 @@ }, "refDataText": { "type": "boolean", - "title": "Indicates whether a corresponding 'Text' property is added when generating a Reference Data 'Property' overriding the 'CodeGeneration.RefDataText' selection.", - "description": "This is used where serializing within the Web API'Controller' and the 'ExecutionContext.IsRefDataTextSerializationEnabled' is set to 'true' (which is automatically set where the url contains '$text=true'). Defaults from 'CodeGeneration.RefDataText'." + "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 'SortOrder'.", + "description": "Specifies the default sort order for the underlying Reference Data collection. Defaults to \u0060SortOrder\u0060.", "enum": [ "SortOrder", "Id", @@ -425,7 +425,7 @@ "inherits": { "type": "string", "title": "The base class that the entity inherits from.", - "description": "Defaults to 'EntityBase' for a standard entity. For Reference Data it will default to 'ReferenceDataBaseEx' depending on the corresponding 'RefDataType' value. See 'OmitEntityBase' if the desired outcome is to not inherit from any of the aforementioned base classes." + "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", @@ -434,7 +434,7 @@ "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: 'IIdentifier', 'IIdentifier', 'IIdentifier', 'IIdentifier', 'IETag' and 'IChangeLog'. Defaults to 'true'." + "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", @@ -442,22 +442,22 @@ }, "genericWithT": { "type": "boolean", - "title": "Indicates whether the class should be defined as a generic with a single parameter 'T'." + "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: '{Company}.{AppName}.Business.Entities.{Namespace}'." + "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 'EntityBase'.", - "description": "As such any of the 'EntityBase' related capabilites are not supported (are omitted from generation). The intention for this is more for the generation of simple internal entities." + "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 'CodeGeneration.JsonSerializer' configuration property where specified; otherwise, 'SystemText'.", + "description": "Defaults to the \u0060CodeGeneration.JsonSerializer\u0060 configuration property where specified; otherwise, \u0060SystemText\u0060.", "enum": [ "SystemText", "Newtonsoft" @@ -478,7 +478,7 @@ }, "collectionType": { "type": "string", - "title": "The entity collection type used where 'CollectionInherits' is not specified.", + "title": "The entity collection type used where \u0060CollectionInherits\u0060 is not specified.", "enum": [ "Standard", "Keyed", @@ -487,51 +487,51 @@ }, "collectionInherits": { "type": "string", - "title": "The base class that a 'Collection' inherits from.", - "description": "Defaults to 'EntityBaseCollection' or 'EntityBaseKeyedCollection' depending on 'CollectionKeyed'. For Reference Data it will default to 'ReferenceDataCollectionBase'." + "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 'CollectionResult' inherits from.", - "description": "Defaults to 'EntityCollectionResult'." + "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 'C'reate, 'G'et (or 'R'ead), 'U'pdate, 'P'atch and 'D'elete). Additionally, GetByArgs ('B') and GetAll ('A') operations that will be automatically generated where not otherwise explicitly specified.", - "description": "Value may only specifiy one or more of the 'CGRUDBA' characters (in any order) to define the automatically generated behavior (operations); for example: 'CRUPD' or 'CRUP' or 'rba' (case insensitive). This is shorthand for setting one or more of the following properties: 'Get', 'GetByArgs', 'GetAll', 'Create', 'Update', 'Patch' and 'Delete'. Where one of these properties is set to either 'true' or 'false' this will take precedence over the value set for 'Behavior'." + "title": "Defines the key CRUD-style behavior (operation types), being \u0027C\u0027reate, \u0027G\u0027et (or \u0027R\u0027ead), \u0027U\u0027pdate, \u0027P\u0027atch and \u0027D\u0027elete). Additionally, GetByArgs (\u0027B\u0027) and GetAll (\u0027A\u0027) operations that will be automatically generated where not otherwise explicitly specified.", + "description": "Value may only specifiy one or more of the \u0060CGRUDBA\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 'Get' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060Get\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "getByArgs": { "type": "boolean", - "title": "Indicates that a 'GetByArgs' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060GetByArgs\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "getAll": { "type": "boolean", - "title": "Indicates that a 'GetAll' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060GetAll\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "create": { "type": "boolean", - "title": "Indicates that a 'Create' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060Create\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "update": { "type": "boolean", - "title": "Indicates that a 'Update' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060Update\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "patch": { "type": "boolean", - "title": "Indicates that a 'Patch' operation will be automatically generated where not otherwise explicitly specified." + "title": "Indicates that a \u0060Patch\u0060 operation will be automatically generated where not otherwise explicitly specified." }, "delete": { "type": "boolean", - "title": "Indicates that a 'Delete' operation will be automatically generated where not otherwise explicitly specified." + "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 'CodeGeneration.AutoImplement' (where 'RefDataType' or 'EntityFrameworkModel' or 'CosmosModel' or 'HttpAgent' is not null; otherwise, 'None'. Indicates that the implementation for the underlying 'Operations' 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 'AutoImplement' can be further specified/overridden per 'Operation'.", + "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", @@ -543,8 +543,8 @@ }, "dataCtor": { "type": "string", - "title": "The access modifier for the generated 'Data' constructor.", - "description": "Defaults to 'Public'.", + "title": "The access modifier for the generated \u0060Data\u0060 constructor.", + "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", @@ -553,84 +553,84 @@ }, "dataCtorParams": { "type": "array", - "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated 'Data' constructor.", - "description": "Each constructor parameter should be formatted as 'Type' + '^' + 'Name'; e.g. 'IConfiguration^Config'. Where the 'Name' portion is not specified it will be inferred. Where the 'Type' matches an already inferred value it will be ignored.", + "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 'Data' extensions logic should be generated.", - "description": "This can be overridden using 'Operation.DataExtensions'." + "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 'Id' data name.", - "description": "Defaults to 'Name' + 'Id' (literal)." + "title": "The Reference Data \u0060Id\u0060 data name.", + "description": "Defaults to \u0060Name\u0060 \u002B \u0060Id\u0060 (literal)." }, "refDataCodeDataName": { "type": "string", - "title": "The Reference Data 'Code' data name.", - "description": "Defaults to 'Code' (literal)." + "title": "The Reference Data \u0060Code\u0060 data name.", + "description": "Defaults to \u0060Code\u0060 (literal)." }, "refDataTextDataName": { "type": "string", - "title": "The Reference Data 'Text' data name.", - "description": "Defaults to 'Text' (literal)." + "title": "The Reference Data \u0060Text\u0060 data name.", + "description": "Defaults to \u0060Text\u0060 (literal)." }, "refDataIsActiveDataName": { "type": "string", - "title": "The Reference Data 'IsActive' data name.", - "description": "Defaults to 'IsActive' (literal)." + "title": "The Reference Data \u0060IsActive\u0060 data name.", + "description": "Defaults to \u0060IsActive\u0060 (literal)." }, "refDataSortOrderDataName": { "type": "string", - "title": "The Reference Data 'SortOrder' data name.", - "description": "Defaults to 'SortOrder' (literal)." + "title": "The Reference Data \u0060SortOrder\u0060 data name.", + "description": "Defaults to \u0060SortOrder\u0060 (literal)." }, "refDataETagDataName": { "type": "string", - "title": "The Reference Data 'ETag' data name.", - "description": "Defaults to 'RowVersion' (literal)." + "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 'sp' (literal) + 'Name' + 'GetAll' (literal)." + "description": "Defaults to \u0060sp\u0060 (literal) \u002B \u0060Name\u0060 \u002B \u0060GetAll\u0060 (literal)." }, "databaseName": { "type": "string", - "title": "The .NET database interface name (used where 'AutoImplement' is 'Database').", - "description": "Defaults to the 'CodeGeneration.DatabaseName' configuration property (its default value is 'IDatabase')." + "title": "The .NET database interface name (used where \u0060AutoImplement\u0060 is \u0060Database\u0060).", + "description": "Defaults to the \u0060CodeGeneration.DatabaseName\u0060 configuration property (its default value is \u0060IDatabase\u0060)." }, "databaseSchema": { "type": "string", - "title": "The database schema name (used where 'AutoImplement' is 'Database').", - "description": "Defaults to 'dbo'." + "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 'Mapper' that the generated Database 'Mapper' inherits from." + "title": "The name of the \u0060Mapper\u0060 that the generated Database \u0060Mapper\u0060 inherits from." }, "databaseCustomerMapper": { "type": "boolean", - "title": "Indicates that a custom Database 'Mapper' will be used; i.e. not generated.", - "description": "Otherwise, by default, a 'Mapper' will be generated." + "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." }, "entityFrameworkName": { "type": "string", - "title": "The .NET Entity Framework interface name used where 'AutoImplement' is 'EntityFramework'.", - "description": "Defaults to 'CodeGeneration.EntityFrameworkName'." + "title": "The .NET Entity Framework interface name used where \u0060AutoImplement\u0060 is \u0060EntityFramework\u0060.", + "description": "Defaults to \u0060CodeGeneration.EntityFrameworkName\u0060." }, "entityFrameworkModel": { "type": "string", - "title": "The corresponding Entity Framework model name (required where 'AutoImplement' is 'EntityFramework')." + "title": "The corresponding Entity Framework model name (required where \u0060AutoImplement\u0060 is \u0060EntityFramework\u0060)." }, "entityFrameworkCustomMapper": { "type": "boolean", - "title": "Indicates that a custom Entity Framework 'Mapper' will be used; i.e. not generated.", - "description": "Otherwise, by default, a 'Mapper' will be generated." + "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", @@ -638,30 +638,30 @@ }, "cosmosName": { "type": "string", - "title": "The .NET Cosmos interface name used where 'AutoImplement' is 'Cosmos'.", - "description": "Defaults to the 'CodeGeneration.CosmosName' configuration property (its default value is 'ICosmosDb')." + "title": "The .NET Cosmos interface name used where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060.", + "description": "Defaults to the \u0060CodeGeneration.CosmosName\u0060 configuration property (its default value is \u0060ICosmosDb\u0060)." }, "cosmosModel": { "type": "string", - "title": "The corresponding Cosmos model name (required where 'AutoImplement' is 'Cosmos')." + "title": "The corresponding Cosmos model name (required where \u0060AutoImplement\u0060 is \u0060Cosmos\u0060)." }, "cosmosContainerId": { "type": "string", - "title": "The Cosmos 'ContainerId' required where 'AutoImplement' is 'Cosmos'." + "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 'PartitionKey' where 'AutoImplement' is 'Cosmos'.", - "description": "The value 'PartitionKey.None' can be specified. Literals will need to be quoted." + "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 'CosmosDbValueContainer' is to be used; otherwise, 'CosmosDbContainer'." + "title": "Indicates whether the \u0060CosmosDbValueContainer\u0060 is to be used; otherwise, \u0060CosmosDbContainer\u0060." }, "cosmosCustomMapper": { "type": "boolean", - "title": "Indicates that a custom Cosmos 'Mapper' will be used; i.e. not generated.", - "description": "Otherwise, by default, a 'Mapper' will be generated." + "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", @@ -669,52 +669,52 @@ }, "odataName": { "type": "string", - "title": "The .NET OData interface name used where 'AutoImplement' is 'OData'.", - "description": "Defaults to the 'CodeGeneration.ODataName' configuration property (its default value is 'IOData')." + "title": "The .NET OData interface name used where \u0060AutoImplement\u0060 is \u0060OData\u0060.", + "description": "Defaults to the \u0060CodeGeneration.ODataName\u0060 configuration property (its default value is \u0060IOData\u0060)." }, "odataModel": { "type": "string", - "title": "The corresponding OData model name (required where 'AutoImplement' is 'OData')." + "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 'AutoImplement' is 'OData'.", - "description": "The underlying 'Simple.OData.Client' will attempt to infer." + "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 'Mapper' will be used; i.e. not generated.", - "description": "Otherwise, by default, a 'Mapper' will be generated." + "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." }, "httpAgentName": { "type": "string", - "title": "The .NET HTTP Agent interface name used where 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "Defaults to 'CodeGeneration.HttpAgentName' configuration property (its default value is 'IHttpAgent')." + "title": "The .NET HTTP Agent interface name used where \u0060Operation.AutoImplement\u0060 is \u0060HttpAgent\u0060.", + "description": "Defaults to \u0060CodeGeneration.HttpAgentName\u0060 configuration property (its default value is \u0060IHttpAgent\u0060)." }, "httpAgentRoutePrefix": { "type": "string", - "title": "The base HTTP Agent API route where 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "This is the base (prefix) 'URI' for the HTTP Agent endpoint and can be further extended when defining the underlying 'Operation'(s)." + "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 'AutoImplement' is 'HttpAgent').", - "description": "This can be overridden within the 'Operation'(s)." + "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 'AutoImplement' is 'HttpAgent').", - "description": "This can be overridden within the 'Operation'(s)." + "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 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "Prepended to 'Operation.HttpAgentCode' where specified to enable standardized functionality." + "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 'Mapper' will be used; i.e. not generated.", - "description": "Otherwise, by default, a 'Mapper' will be generated." + "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", @@ -722,13 +722,13 @@ }, "dataSvcCaching": { "type": "boolean", - "title": "Indicates whether request-based 'IRequestCache' caching is to be performed at the 'DataSvc' layer to improve performance (i.e. reduce chattiness).", - "description": "Defaults to 'true'." + "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 'DataSvc' constructor.", - "description": "Defaults to 'Public'.", + "title": "The access modifier for the generated \u0060DataSvc\u0060 constructor.", + "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", @@ -737,21 +737,21 @@ }, "dataSvcCtorParams": { "type": "array", - "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated 'DataSvc' constructor.", - "description": "Each constructor parameter should be formatted as 'Type' + '^' + 'Name'; e.g. 'IConfiguration^Config'. Where the 'Name' portion is not specified it will be inferred. Where the 'Type' matches an already inferred value it will be ignored.", + "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 'DataSvc' extensions logic should be generated.", - "description": "This can be overridden using 'Operation.DataSvcExtensions'." + "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 'Create', 'Update' or 'Delete' operation.", - "description": "Defaults to the 'CodeGeneration.EventPublish' 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 'Operation'(s).", + "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", @@ -761,17 +761,17 @@ "eventSource": { "type": "string", "title": "The Event Source.", - "description": "Defaults to 'Name' (as lowercase) appended with the '/{$key}' placeholder. Note: when used in code-generation the 'CodeGeneration.EventSourceRoot' will be prepended where specified. To include the entity id/key include a '{$key}' placeholder ('Create', 'Update' or 'Delete' operation only); for example: 'person/{$key}'. This can be overridden for the 'Operation'." + "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 'System.TransactionScope' 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 'EventPublish' 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 'CodeGeneration.EventTransaction'. This essentially defaults the 'Operation.DataSvcTransaction' where not otherwise specified. This should only be used where a transactionally-aware data source is being used." + "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." }, "managerCtor": { "type": "string", - "title": "The access modifier for the generated 'Manager' constructor.", - "description": "Defaults to 'Public'.", + "title": "The access modifier for the generated \u0060Manager\u0060 constructor.", + "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", @@ -780,35 +780,35 @@ }, "managerCtorParams": { "type": "array", - "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated 'Manager' constructor.", - "description": "Each constructor parameter should be formatted as 'Type' + '^' + 'Name'; e.g. 'IConfiguration^Config'. Where the 'Name' portion is not specified it will be inferred. Where the 'Type' matches an already inferred value it will be ignored.", + "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 'Manager' extensions logic should be generated.", - "description": "This can be overridden using 'Operation.ManagerExtensions'." + "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 'Type' or interface 'Type' that will perform the validation.", - "description": "Only used for defaulting the 'Create' and 'Update' operation types ('Operation.Type') where not specified explicitly." + "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 'IIdentifierGenerator' should be used to generate the 'Id' property where the operation types ('Operation.Type') is 'Create'." + "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 'Cleaner.Cleanup' is performed for the operation parameters within the Manager-layer.", - "description": "This can be overridden within the 'CodeGeneration' and 'Operation'(s)." + "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 'Validation' framework to use for the entity-based validation.", - "description": "Defaults to 'CodeGeneration.ValidationFramework'. This can be overridden within the 'Operation'(s) and 'Parameter'(s).", + "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" @@ -816,18 +816,18 @@ }, "webApiRoutePrefix": { "type": "string", - "title": "The 'RoutePrefixAtttribute' for the corresponding entity Web API controller.", - "description": "This is the base (prefix) 'URI' for the entity and can be further extended when defining the underlying 'Operation'(s). The 'CodeGeneration.WebApiRoutePrefix' will be prepended where specified. Where not specified will automatically default to the pluralized 'Name' (as lowercase)." + "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 'Authorize' or 'AllowAnonymous'.", - "description": "Defaults to the 'CodeGeneration.WebApiAuthorize' configuration property (inherits) where not specified; can be overridden at the 'Operation' level also." + "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 'Controller' constructor.", - "description": "Defaults to 'Public'.", + "title": "The access modifier for the generated Web API \u0060Controller\u0060 constructor.", + "description": "Defaults to \u0060Public\u0060.", "enum": [ "Public", "Private", @@ -836,49 +836,49 @@ }, "webApiCtorParams": { "type": "array", - "title": "The list of additional (non-inferred) Dependency Injection (DI) parameters for the generated 'WebApi' constructor.", - "description": "Each constructor parameter should be formatted as 'Type' + '^' + 'Name'; e.g. 'IConfiguration^Config'. Where the 'Name' portion is not specified it will be inferred. Where the 'Type' matches an already inferred value it will be ignored.", + "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 ('Operation.WebApiLocation') is automatically inferred.", - "description": "This will automatically set the 'Operation.WebApiLocation' for an 'Operation' named 'Create' where there is a corresponding named 'Get'. This is defaulted from the 'CodeGen.WebApiAutoLocation'." + "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 'Operation.Type' is 'Update' or 'Patch', the request ETag will be matched against the response for a corresponding 'Get' operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the 'Get' must be the same as that returned from the corresponding 'Create', 'Update' and 'Patch' (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. This defaults the 'Operation.WebApiConcurrency'." + "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 'Get' method name (in the 'XxxManager') where the 'Operation.Type' is 'Update' and 'SimulateConcurrency' is 'true'.", - "description": "Defaults to 'Get'. Specify either just the method name (e.g. 'OperationName') or, interface and method name (e.g. 'IXxxManager.OperationName') to be invoked where in a different 'YyyManager.OperationName'." + "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." }, "dataModel": { "type": "boolean", - "title": "Indicates whether a data 'model' version of the entity should also be generated (output to '.\\Business\\Data\\Model').", - "description": "The model will be generated with 'OmitEntityBase = true'. Any reference data properties will be defined using their 'RefDataType' intrinsic 'Type' versus their corresponding (actual) reference data 'Type'." + "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." }, "excludeEntity": { "type": "boolean", - "title": "Indicates whether to exclude the generation of the 'Entity' class ('Xxx.cs')." + "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 'Operation' related artefacts; excluding the 'Entity' class.", - "description": "Is a shorthand means for setting all of the other 'Exclude*' properties (with the exception of 'ExcludeEntity') to exclude." + "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 'Data' interface ('IXxxData.cs')." + "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 'Data' class ('XxxData.cs').", - "description": "Defaults to 'Include' indicating _not_ to exlude. A value of 'Exclude' indicates to exclude all output; alternatively, 'RequiresMapper' indicates to at least output the corresponding 'Mapper' class.", + "title": "The option to exclude the generation of the \u0060Data\u0060 class (\u0060XxxData.cs\u0060).", + "description": "Defaults to \u0060Include\u0060 indicating _not_ to exlude. 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", @@ -887,59 +887,59 @@ }, "excludeIDataSvc": { "type": "boolean", - "title": "Indicates whether to exclude the generation of the 'DataSvc' interface ('IXxxDataSvc.cs')." + "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 'DataSvc' class ('XxxDataSvc.cs')." + "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 'Manager' interface ('IXxxManager.cs')." + "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 'Manager' class ('XxxManager.cs')." + "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 'Controller' class ('XxxController.cs')." + "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 'Agent' class ('XxxAgent.cs')." + "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 'Agent' class ('XxxAgent.cs')." + "title": "Indicates whether to exclude the generation of the gRPC consuming \u0060Agent\u0060 class (\u0060XxxAgent.cs\u0060)." }, "authRole": { "type": "string", - "title": "The role (permission) used by the 'ExecutionContext.IsInRole(role)' for each 'Operation'.", - "description": "Used where not overridden specifically for an 'Operation'; i.e. acts as the default." + "title": "The role (permission) used by the \u0060ExecutionContext.IsInRole(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 'CodeGeneration.Grpc' configuration); therefore, each corresponding 'Property' and 'Operation' will also need to be opted-in specifically." + "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 'Property' collection.", + "title": "The corresponding \u0060Property\u0060 collection.", "items": { "$ref": "#/definitions/Property" } }, "operations": { "type": "array", - "title": "The corresponding 'Operation' collection.", + "title": "The corresponding \u0060Operation\u0060 collection.", "items": { "$ref": "#/definitions/Operation" } }, "consts": { "type": "array", - "title": "The corresponding 'Consts' collection.", + "title": "The corresponding \u0060Consts\u0060 collection.", "items": { "$ref": "#/definitions/Const" } @@ -951,8 +951,8 @@ }, "Property": { "type": "object", - "title": "'Property' object (entity-driven)", - "description": "The 'Property' object defines an 'Entity' property and its charateristics.", + "title": "\u0027Property\u0027 object (entity-driven)", + "description": "The \u0060Property\u0060 object defines an \u0060Entity\u0060 property and its charateristics.", "properties": { "name": { "type": "string", @@ -961,21 +961,21 @@ "text": { "type": "string", "title": "The overriding text for use in comments.", - "description": "By default the 'Text' will be the 'Name' reformatted as sentence casing. Depending on whether the 'Type' is 'bool', will appear in one of the two generated sentences. Where not 'bool' it will be: Gets or sets a value indicating whether {text}.'. Otherwise, it will be: Gets or sets the {text}.'. To create a '' within use moustache shorthand (e.g. {{Xxx}})." + "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}})." }, "modelText": { "type": "string", "title": "The overriding model text for use in comments.", - "description": "By default the 'ModelText' will be the 'Name' reformatted as sentence casing. Depending on whether the 'Type' is 'bool', will appear in one of the two generated sentences. Where not 'bool' it will be: Gets or sets a value indicating whether {text}.'. Otherwise, it will be: Gets or sets the {text}.'. To create a '' within use moustache shorthand (e.g. {{Xxx}})." + "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}})." }, "type": { "type": "string", - "title": "The .NET 'Type'.", - "description": "Defaults to 'string'. To reference a Reference Data 'Type' always prefix with 'RefDataNamespace' (e.g. 'RefDataNamespace.Gender') or shortcut '^' (e.g. '^Gender'). This will ensure that the appropriate Reference Data 'using' statement is used. _Shortcut:_ Where the 'Type' starts with (prefix) 'RefDataNamespace.' or '^', and the correspondong 'RefDataType' attribute is not specified it will automatically default the 'RefDataType' to '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. 'string?'. Will be inferred where the 'Type' is denoted as nullable; i.e. suffixed by a '?'." + "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", @@ -984,12 +984,12 @@ "privateName": { "type": "string", "title": "The overriding private name.", - "description": "Overrides the 'Name' to be used for private fields. By default reformatted from 'Name'; e.g. 'FirstName' as '_firstName'." + "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 'Name' to be used for argument parameters. By default reformatted from 'Name'; e.g. 'FirstName' as 'firstName'." + "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", @@ -998,8 +998,8 @@ }, "isEntity": { "type": "boolean", - "title": "Indicates that the property 'Type' is another generated entity / collection and therefore specific capabilities can be assumed (e.g. 'CopyFrom' and 'Clone').", - "description": "Will be inferred (default to 'true') where the 'Type' is 'ChangeLog' or the 'Type' is found as another 'Entity' within the code-generation configuration file." + "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", @@ -1007,8 +1007,8 @@ }, "dateTimeTransform": { "type": "string", - "title": "The 'DateTime' transformation to be performed on 'Set' and 'CleanUp'.", - "description": "Defaults to 'UseDefault'. This is only applied where the 'Type' is 'DateTime'.", + "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", @@ -1020,8 +1020,8 @@ }, "stringTrim": { "type": "string", - "title": "The 'string' trimming of white space characters to be performed on 'Set' and 'CleanUp'.", - "description": "Defaults to 'UseDefault'. This is only applied where the 'Type' is '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", @@ -1032,8 +1032,8 @@ }, "stringTransform": { "type": "string", - "title": "The 'string' transformation to be performed on 'Set' and 'CleanUp'.", - "description": "Defaults to 'UseDefault'. This is only applied where the 'Type' is '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", @@ -1043,8 +1043,8 @@ }, "stringCasing": { "type": "string", - "title": "The 'string' casing to be performed on 'Set' and 'CleanUp'.", - "description": "Defaults to 'UseDefault'. This is only applied where the 'Type' is '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", @@ -1055,27 +1055,27 @@ }, "autoCreate": { "type": "boolean", - "title": "Indicates whether an instance of the 'Type' is to be automatically created/instantiated when the property is first accessed (i.e. lazy instantiation)." + "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 'Type' is 'string' then the specified default value will need to be delimited. Any valid value assignment C# code can be used." + "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 'IPartitionKey' for the generated entity." + "description": "This will implement \u0060IPartitionKey\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 'Property' will be excluded from the 'Common' entity declaration and 'Business' JSON serialization." + "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 'string' (being the 'ReferenceDataBase.Code') where not specified and the corresponding 'Type' starts with (prefix) 'RefDataNamespace.' or '^'. Note: an 'Id' of type 'string' is currently not supported; the use of the 'Code' is the recommended approach.", + "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", @@ -1084,13 +1084,13 @@ }, "refDataList": { "type": "boolean", - "title": "Indicates that the Reference Data property is to be a serializable list ('ReferenceDataSidList').", - "description": "This is required to enable a list of Reference Data values (as per 'RefDataType') to be passed as an argument for example." + "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 'Text' property is added when generating a Reference Data property, overriding the 'Entity.RefDataText' selection.", - "description": "This is used where serializing within the Web API 'Controller' and the 'ExecutionContext.IsRefDataTextSerializationEnabled' is set to 'true' (which is automatically set where the url contains '$text=true').'Optional' indicates when 'ExecutionContext.IsRefDataTextSerializationEnabled' is set to 'true' then a value is output, 'Always' indicates that the value is _always_ output, and 'Never' indicates that feature is turned off.", + "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", @@ -1099,7 +1099,7 @@ }, "refDataTextName": { "type": "string", - "title": "The corresponding reference data 'Text' property name; defaults to 'Name' + 'Text'." + "title": "The corresponding reference data \u0060Text\u0060 property name; defaults to \u0060Name\u0060 \u002B \u0027Text\u0027." }, "refDataMapping": { "type": "boolean", @@ -1109,12 +1109,12 @@ "jsonName": { "type": "string", "title": "The JSON property name.", - "description": "Defaults to 'ArgumentName' where not specified (i.e. camelCase); however, where the property is 'ETag' it will default to the 'Config.ETagJsonName'." + "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 'Entity.DataModel').", - "description": "Defaults to 'JsonName' where not specified." + "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", @@ -1138,26 +1138,26 @@ "dataName": { "type": "string", "title": "The data name where Entity.AutoImplement is selected.", - "description": "Defaults to the property 'Name'. Represents the column name for a 'Database', or the correspinding property name for the other options." + "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 'Converter' class name where 'Entity.AutoImplement' is selected.", - "description": "A 'Converter' is used to convert a data source value to/from a .NET 'Type' where no standard data conversion can be applied. Where this value is suffixed by '' or '{T}' this will automatically set 'Type'." + "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 'Data'-layer / data 'Mapper' generated output.", + "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 'PrimaryKey' property value is automatically generated by the data source on 'Create'." + "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 ('ExecutionContext.OperationType') selection to enable inclusion and exclusion of property mapping.", - "description": "Defaults to 'Any'.", + "title": "The operations types (\u0060ExecutionContext.OperationType\u0060) selection to enable inclusion and exclusion of property mapping.", + "description": "Defaults to \u0060Any\u0060.", "enum": [ "Any", "AnyExceptCreate", @@ -1171,22 +1171,22 @@ }, "databaseMapper": { "type": "string", - "title": "The database property 'Mapper' class name where 'Entity.AutoImplement' is selected.", - "description": "A 'Mapper' is used to map a data source value to/from a .NET complex 'Type' (i.e. class with one or more properties)." + "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 'Mapper' generated output." + "title": "Indicates whether the property should be ignored (excluded) from the database \u0060Mapper\u0060 generated output." }, "databaseDbType": { "type": "string", - "title": "The database 'DbType' override (versus inferring from the corresponding .NET Type).", - "description": "Overrides the inferred database type; i.e. can specify 'Date' or 'DateTime2', for .NET Type 'System.DateTime'." + "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 'Mapper' approach for the property.", - "description": "Defaults to 'Set'.", + "title": "The Entity Framework \u0060Mapper\u0060 approach for the property.", + "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", @@ -1196,8 +1196,8 @@ }, "cosmosMapper": { "type": "string", - "title": "The Cosmos 'Mapper' approach for the property.", - "description": "Defaults to 'Set'.", + "title": "The Cosmos \u0060Mapper\u0060 approach for the property.", + "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", @@ -1207,8 +1207,8 @@ }, "odataMapper": { "type": "string", - "title": "The OData 'Mapper' approach for the property.", - "description": "Defaults to 'Map' which indicates the property will be explicitly mapped. A value of 'Ignore' will explicitly 'Ignore', whilst a value of 'Skip' will skip code-generated mapping altogether.", + "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", @@ -1217,8 +1217,8 @@ }, "httpAgentMapper": { "type": "string", - "title": "The HttpAgent 'Mapper' approach for the property.", - "description": "Defaults to 'Set'.", + "title": "The HttpAgent \u0060Mapper\u0060 approach for the property.", + "description": "Defaults to \u0060Set\u0060.", "enum": [ "Set", "Ignore", @@ -1229,7 +1229,7 @@ "displayName": { "type": "string", "title": "The display name used in the likes of error messages for the property.", - "description": "Defaults to the 'Name' as sentence case." + "description": "Defaults to the \u0060Name\u0060 as sentence case." }, "annotation1": { "type": "string", @@ -1258,8 +1258,8 @@ }, "Operation": { "type": "object", - "title": "'CodeGeneration' object (entity-driven)", - "description": "The code generation for an 'Operation' is primarily driven by the 'Type' 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.", + "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", @@ -1268,7 +1268,7 @@ "type": { "type": "string", "title": "The type of operation that is to be code-generated.", - "description": "Defaults to 'Custom'.", + "description": "Defaults to \u0060Custom\u0060.", "enum": [ "Get", "GetColl", @@ -1282,51 +1282,51 @@ "text": { "type": "string", "title": "The text for use in comments.", - "description": "The 'Text' will be defaulted for all the 'Operation.Type' options with the exception of 'Custom'. To create a '' within use moustache shorthand (e.g. {{Xxx}})." + "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}})." }, "primaryKey": { "type": "boolean", - "title": "Indicates whether the properties marked as a primary key ('Property.PrimaryKey') are to be used as the parameters.", - "description": "This simplifies the specification of these properties versus having to declare each specifically." + "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 'PagingArgs' argument is to be added to the operation to enable (standardized) paging related logic." + "title": "Indicates whether a \u0060PagingArgs\u0060 argument is to be added to the operation to enable (standardized) paging related logic." }, "valueType": { "type": "string", - "title": "The .NET value parameter 'Type' for the operation.", - "description": "Defaults to the parent 'Entity.Name' where the 'Operation.Type' options are 'Create' or 'Update'." + "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 'Type' for the operation.", - "description": "Defaults to the parent 'Entity.Name' where the 'Operation.Type' options are 'Get', 'GetColl', 'Create' or 'Update'; otherwise, defaults to 'void'." + "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 'ReturnType' is nullable for the operation.", - "description": "This is only applicable for an 'Operation.Type' of 'Custom'. Will be inferred where the 'ReturnType' is denoted as nullable; i.e. suffixed by a '?'." + "title": "Indicates whether the \u0060ReturnType\u0060 is nullable for the operation.", + "description": "This is only applicable for an \u0060Operation.Type\u0060 of \u0060Custom\u0060. Will be inferred where the \u0060ReturnType\u0060 is denoted as nullable; i.e. suffixed by a \u0060?\u0060." }, "returnText": { "type": "string", - "title": "The text for use in comments to describe the 'ReturnType'.", - "description": "A default will be created where not specified. To create a '' within use moustache shorthand (e.g. {{Xxx}})." + "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}})." }, "privateName": { "type": "string", "title": "The overriding private name.", - "description": "Overrides the 'Name' to be used for private usage. By default reformatted from 'Name'; e.g. 'GetByArgs' as '_getByArgs'." + "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 'CoreEx.Results' (aka Railway-oriented programming).", - "description": "Defaults to 'Entity.WilhResult'." + "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 'Entity.AutoImplement'.", - "description": "Defaults to 'Entity.AutoImplement'. The corresponding 'Entity.AutoImplement' must be defined for this to be enacted. Auto-implementation is applicable for all 'Operation.Type' options with the exception of 'Custom'.", + "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", @@ -1338,63 +1338,63 @@ }, "dataEntityMapper": { "type": "string", - "title": "The override for the data entity 'Mapper'.", - "description": "Used where the default generated 'Mapper' is not applicable." + "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 'Data' extensions logic should be generated.", - "description": "Defaults to 'Entity.DataExtensions'." + "title": "Indicates whether the \u0060Data\u0060 extensions logic should be generated.", + "description": "Defaults to \u0060Entity.DataExtensions\u0060." }, "dataInvoker": { "type": "boolean", - "title": "Indicates whether a 'DataInvoker' should orchestrate the 'Data'-layer.", - "description": "Where 'Dataransaction' or 'EventPublish' is 'Data' then orchestration will default to 'true'." + "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 'System.TransactionScope' should be created and orchestrated at the 'Data'-layer.", - "description": "Where using an 'EventOutbox' this is ignored as it is implied through its usage." + "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 'Operation.AutoImplement' is 'Database'.", - "description": "Defaults to 'sp' + 'Entity.Name' + 'Operation.Name'; e.g. 'spPersonCreate'." + "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 'AutoImplement' is 'EntityFramework').", - "description": "Overrides the 'Entity.EntityFrameworkModel'." + "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 'AutoImplement' is 'Cosmos').", - "description": "Overrides the 'Entity.CosmosModel'." + "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 'ContainerId' override used where 'Operation.AutoImplement' is 'Cosmos'.", - "description": "Overrides the 'Entity.CosmosContainerId'." + "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 'PartitionKey' used where 'Operation.AutoImplement' is 'Cosmos'.", - "description": "Overrides the 'Entity.CosmosPartitionKey'." + "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 'Operation.AutoImplement' is 'OData'.", - "description": "Overriddes the 'Entity.ODataCollectionName'; otherwise, the underlying 'Simple.OData.Client' will attempt to infer." + "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 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "This is appended to the 'Entity.HttpAgentRoutePrefix'." + "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 'Operation.WebApiMethod'.", + "description": "Defaults to \u0060Operation.WebApiMethod\u0060.", "enum": [ "HttpGet", "HttpPost", @@ -1405,41 +1405,41 @@ }, "httpAgentModel": { "type": "string", - "title": "The corresponding HTTP Agent model name (required where 'AutoImplement' is 'HttpAgent').", - "description": "This can be overridden within the 'Operation'(s)." + "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 'AutoImplement' is 'HttpAgent').", - "description": "Defaults to 'Operation.HttpAgentModel' where the 'Operation.ReturnType' is equal to 'Entity.Name' (same type). This can be overridden within the 'Operation'(s)." + "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 'Operation.AutoImplement' is 'HttpAgent'.", - "description": "Appended to 'Entity.HttpAgentCode' where specified to extend." + "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 'Manager' logic is a custom implementation; i.e. no auto-'DataSvc' invocation logic is to be generated." + "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 'System.TransactionScope' should be created and orchestrated at the 'Manager'-layer." + "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060Manager\u0060-layer." }, "managerExtensions": { "type": "boolean", - "title": "Indicates whether the 'Manager' extensions logic should be generated.", - "description": "Defaults to 'Entity.ManagerExtensions'." + "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 'Type' or interface 'Type' that will perform the validation.", - "description": "Defaults to the 'Entity.Validator' where not specified explicitly (where 'Operation.Type' options 'Create' or 'Update')." + "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 'Validation' framework to use for the entity-based validation.", - "description": "Defaults to 'Entity.ValidationFramework'. This can be overridden within the 'Parameter'(s).", + "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" @@ -1447,8 +1447,8 @@ }, "managerOperationType": { "type": "string", - "title": "The 'ExecutionContext.OperationType' (CRUD denotation) defined at the 'Manager'-layer.", - "description": "The default will be inferred from the 'Operation.Type'; however, where the 'Operation.Type' is 'Custom' it will default to 'Unspecified'.", + "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", @@ -1459,31 +1459,31 @@ }, "managerCleanUp": { "type": "boolean", - "title": "Indicates whether a 'Cleaner.Cleanup' is performed for the operation parameters within the Manager-layer.", - "description": "This can be overridden within the 'CodeGeneration' and 'Entity'." + "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": "boolean", - "title": "Indicates whether the 'DataSvc' logic is a custom implementation; i.e. no auto-'DataSvc' invocation logic is to be generated." + "title": "Indicates whether the \u0060DataSvc\u0060 logic is a custom implementation; i.e. no auto-\u0060DataSvc\u0060 invocation logic is to be generated." }, "dataSvcTransaction": { "type": "boolean", - "title": "Indicates whether a 'System.TransactionScope' should be created and orchestrated at the 'DataSvc'-layer." + "title": "Indicates whether a \u0060System.TransactionScope\u0060 should be created and orchestrated at the \u0060DataSvc\u0060-layer." }, "dataSvcInvoker": { "type": "boolean", - "title": "Indicates whether a 'DataSvcInvoker' should orchestrate the 'DataSvc'-layer.", - "description": "Where 'DataSvcTransaction' or 'EventPublish' is 'DataSvc' then orchestration will default to 'true'." + "title": "Indicates whether a \u0060DataSvcInvoker\u0060 should orchestrate the \u0060DataSvc\u0060-layer.", + "description": "Where \u0060DataSvcTransaction\u0060 or \u0060EventPublish\u0060 is \u0060DataSvc\u0060 then orchestration will default to \u0060true\u0060." }, "dataSvcExtensions": { "type": "boolean", - "title": "Indicates whether the 'DataSvc' extensions logic should be generated.", - "description": "Defaults to 'Entity.ManagerExtensions'." + "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 'Create', 'Update' or 'Delete' operation.", - "description": "Defaults to the 'Entity.EventPublish' configuration property (inherits) where not specified. Used to enable the sending of messages to the likes of EventGrid, Service Broker, SignalR, etc.", + "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", @@ -1493,27 +1493,27 @@ "eventSource": { "type": "string", "title": "The Event Source.", - "description": "Defaults to 'Entity.EventSource'. Note: when used in code-generation the 'CodeGeneration.EventSourceRoot' will be prepended where specified. To include the entity id/key include a '{$key}' placeholder ('Create', 'Update' or 'Delete' operation only); for example: 'person/{$key}'. Otherwise, specify the C# string interpolation expression; for example: 'person/{r.Id}'." + "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 '{AppName}.{Entity.Name}', plus each of the unique key placeholders comma separated; e.g. 'Domain.Entity.{id1},{id2}' (depending on whether 'Entity.EventSubjectFormat' is 'NameAndKey' or 'NameOnly'). The event action defaults to 'WebApiOperationType' or 'Operation.Type' where not specified. Multiple events can be raised by specifying more than one subject/action pair separated by a semicolon. E.g. 'Demo.Person.{id}:Create;Demo.Other.{id}:Update'." + "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 'RouteAtttribute' to be appended to the 'Entity.WebApiRoutePrefix'.", - "description": "Where the value is specified with a leading '!' character this indicates that the 'Entity.WebApiRoutePrefix' should not be used, and the value should be used as-is (with the '!' removed)." + "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 'Authorize' or 'AllowAnonymous'.", + "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: 'HttpGet' for 'Operation.Type' value 'Get' or 'GetColl', 'HttpPost' for 'Operation.Type' value 'Create' or 'Custom', 'HttpPut' for 'Operation.Type' value 'Update', and 'HttpDelete' for 'Operation.Type' value 'Delete'. An 'Operation.Type' value 'Patch' can not be specified and will always default to 'HttpPatch'.", + "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", @@ -1523,8 +1523,8 @@ }, "webApiStatus": { "type": "string", - "title": "The primary HTTP Status Code that will be returned for the operation where there is a non-'null' return value.", - "description": "The value defaults as follows: 'OK' for 'Operation.Type' value 'Get', 'GetColl', 'Update', 'Delete' or 'Custom', 'Created' for 'Operation.Type' value 'Create'.", + "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", @@ -1535,8 +1535,8 @@ }, "webApiAlternateStatus": { "type": "string", - "title": "The primary HTTP Status Code that will be returned for the operation where there is a 'null' return value.", - "description": "The value defaults as follows: 'NotFound' for 'Operation.Type' value 'Get' and 'NoContent' for 'Operation.Type' value 'GetColl'; otherwise, 'null'.", + "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 value \u0060Get\u0060 and \u0060NoContent\u0060 for \u0060Operation.Type\u0060 value \u0060GetColl\u0060; otherwise, \u0060null\u0060.", "enum": [ "OK", "Accepted", @@ -1548,80 +1548,92 @@ "webApiLocation": { "type": "string", "title": "The HTTP Response Location Header route.", - "description": "This uses similar formatting to the 'WebApiRoute'. The response value is accessed using 'r.' notation to access underlying properties; for example '{r.Id}' or 'person/{r.Id}'. The 'Entity.WebApiRoutePrefix' will be prepended automatically; however, to disable set the first character to '!', e.g. '!person/{r.Id}'. The URI can be inferred from another 'Operation' by using a lookup '^'; for example '^Get' indicates to infer from the named 'Get' operation (where only '^' is specified this is shorthand for '^Get' as this is the most common value). The Location URI will ensure the first character is a '/' so it acts a 'relative URL absolute path'." + "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 'Operation.Type' is 'Update' or 'Patch', the request ETag will be matched against the response for a corresponding 'Get' operation to verify no changes have been made prior to updating. For this to function correctly the .NET response Type for the 'Get' must be the same as that returned from the corresponding 'Create', 'Update' and 'Patch' (where applicable) as the generated ETag is a SHA256 hash of the resulting JSON. Defaults to 'Entity.WebApiConcurrency'." + "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 'Get' method name (in the 'XxxManager') where the 'Operation.Type' is 'Update' and 'SimulateConcurrency' is 'true'.", - "description": "Defaults to 'Get'. Specify either just the method name (e.g. 'OperationName') or, interface and method name (e.g. 'IXxxManager.OperationName') to be invoked where in a different 'YyyManager.OperationName'." + "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 'Update' method name (in the 'XxxManager') where the 'Operation.Type' is 'Patch'.", - "description": "Defaults to 'Update'. Specify either just the method name (e.g. 'OperationName') or, interface and method name (e.g. 'IXxxManager.OperationName') to be invoked where in a different 'YyyManager.OperationName'." + "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." }, "authPermission": { "type": "string", - "title": "The permission used by the 'ExecutionContext.IsAuthorized(AuthPermission)' to determine whether the user is authorized." + "title": "The permission used by the \u0060ExecutionContext.IsAuthorized(AuthPermission)\u0060 to determine whether the user is authorized." }, "authRole": { "type": "string", - "title": "The permission used by the 'ExecutionContext.IsInRole(AuthRole)' to determine whether the user is authorized." + "title": "The permission used by the \u0060ExecutionContext.IsInRole(AuthRole)\u0060 to determine whether the user is authorized." }, "excludeAll": { "type": "boolean", - "title": "Indicates whether to exclude the generation of all 'Operation' related output.", - "description": "Is a shorthand means for setting all of the other 'Exclude*' properties to 'true'." + "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 'Data' interface ('IXxxData.cs') output." + "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 'Data' class ('XxxData.cs') output." + "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 'DataSvc' interface ('IXxxDataSvc.cs') output." + "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 'DataSvc' class ('XxxDataSvc.cs') output." + "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 'Manager' interface ('IXxxManager.cs') output." + "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 'Manager' class ('XxxManager.cs') output." + "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 'Controller' class ('XxxController.cs') output." + "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 'Agent' class ('XxxAgent.cs') output." + "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 'Agent' class ('XxxAgent.cs') output." + "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 'CodeGeneration.Grpc' configuration); therefore, each corresponding 'Entity', 'Property' and 'Operation' will also need to be opted-in specifically." + "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 'Parameter' collection.", + "title": "The corresponding \u0060Parameter\u0060 collection.", "items": { "$ref": "#/definitions/Parameter" } @@ -1633,8 +1645,8 @@ }, "Parameter": { "type": "object", - "title": "'Parameter' object (entity-driven)", - "description": "The 'Parameter' object defines an 'Operation' parameter and its charateristics.", + "title": "\u0027Parameter\u0027 object (entity-driven)", + "description": "The \u0060Parameter\u0060 object defines an \u0060Operation\u0060 parameter and its charateristics.", "properties": { "name": { "type": "string", @@ -1643,40 +1655,40 @@ "text": { "type": "string", "title": "The overriding text for use in comments.", - "description": "By default the 'Text' will be the 'Name' reformatted as sentence casing." + "description": "By default the \u0060Text\u0060 will be the \u0060Name\u0060 reformatted as sentence casing." }, "type": { "type": "string", - "title": "The .NET 'Type'.", - "description": "Defaults to 'string'. To reference a Reference Data 'Type' always prefix with 'RefDataNamespace' (e.g. 'RefDataNamespace.Gender') or shortcut '^' (e.g. '^Gender'). This will ensure that the appropriate Reference Data 'using' statement is used. _Shortcut:_ Where the 'Type' starts with (prefix) 'RefDataNamespace.' or '^', and the correspondong 'RefDataType' attribute is not specified it will automatically default the 'RefDataType' to '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. 'int?'. Will be inferred where the 'Type' is denoted as nullable; i.e. suffixed by a '?'. Where the .NET Type is not considered as an intrinsic type then will default to 'true'." + "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 'Type' is 'string' then the specified default value will need to be delimited. Any valid value assignment C# code can be used." + "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 'Name' to be used for private fields. By default reformatted from 'Name'; e.g. 'FirstName' as '_firstName'." + "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 'Name' to be used for argument parameters. By default reformatted from 'Name'; e.g. 'FirstName' as 'firstName'." + "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 'Property.Name' within the parent 'Entity' to copy (set) the configuration/characteristics from where not already defined." + "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 'string' where not specified and the corresponding 'Type' starts with (prefix) 'RefDataNamespace.'.", + "description": "Defaults to \u0060string\u0060 where not specified and the corresponding \u0060Type\u0060 starts with (prefix) \u0060RefDataNamespace.\u0060.", "enum": [ "string", "int", @@ -1685,21 +1697,21 @@ }, "refDataList": { "type": "boolean", - "title": "Indicates that the Reference Data property is to be a serializable list ('ReferenceDataSidList').", - "description": "This is required to enable a list of Reference Data values (as per 'RefDataType') to be passed as an argument for example." + "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 'Type' that will perform the validation." + "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 'IsMandatory' and 'Validator' (where specified)." + "title": "The fluent-style method-chaining C# validator code to append to \u0060IsMandatory\u0060 and \u0060Validator\u0060 (where specified)." }, "validationFramework": { "type": "string", - "title": "The 'Validation' framework to use for the entity-based validation.", - "description": "Defaults to 'Operation.ValidationFramework'.", + "title": "The \u0060Validation\u0060 framework to use for the entity-based validation.", + "description": "Defaults to \u0060Operation.ValidationFramework\u0060.", "enum": [ "CoreEx", "FluentValidation" @@ -1707,12 +1719,12 @@ }, "isMandatory": { "type": "boolean", - "title": "Indicates whether a 'ValidationException' should be thrown when the parameter value has its default value (null, zero, etc)." + "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 'All'. To further describe, 'All' passes the parameter through all layeys, 'ToManagerSet' only passes the parameter to the 'Manager' layer and overrides the same named property within the corresponding 'value' parameter, 'ToManagerCollSet' only passes the parameter to the 'Manager' layer and overrides the same named property within the corresponding 'value' collection parameter. Where using the 'PrimaryKey' option to automatically set 'Parameters', and the 'Operation.Type' is 'Create' or 'Update' it will default to 'ToManagerSet'.", + "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", @@ -1721,13 +1733,13 @@ }, "dataConverter": { "type": "string", - "title": "The data 'Converter' class name where specific data conversion is required.", - "description": "A 'Converter' is used to convert a data source value to/from a .NET 'Type' where no standard data conversion can be applied. Where this value is suffixed by '' or '{T}' this will automatically set 'Type'." + "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 'FromQuery'; unless the parameter 'Type' has also been defined as an 'Entity' within the code-gen config file then it will default to 'FromEntityProperties'. Specifies that the parameter will be declared with corresponding 'FromQueryAttribute', 'FromBodyAttribute' or 'FromRouteAttribute' for the Web API method. The 'FromEntityProperties' will declare all properties of the 'Entity' as query parameters.", + "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.", "enum": [ "FromQuery", "FromBody", @@ -1738,7 +1750,7 @@ "webApiText": { "type": "string", "title": "The overriding text for use in the Web API comments.", - "description": "By default the 'Text' will be the 'Name' reformatted as sentence casing." + "description": "By default the \u0060Text\u0060 will be the \u0060Name\u0060 reformatted as sentence casing." }, "grpcType": { "type": "string", @@ -1751,8 +1763,8 @@ }, "Const": { "type": "object", - "title": "'Const' object (entity-driven)", - "description": "The 'Const' object is used to define a .NET (C#) constant value for an 'Entity'.", + "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", @@ -1766,7 +1778,7 @@ "text": { "type": "string", "title": "The overriding text for use in comments.", - "description": "By default the 'Text' will be the 'Name' reformatted as sentence casing. It will be formatted as: 'Represents a {text} constant value.' To create a '' within use moustache shorthand (e.g. '{{Xxx}}')." + "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)." } }, "required": [ diff --git a/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs b/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs index fe1adef6f..65990a69a 100644 --- a/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs +++ b/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs @@ -74,7 +74,10 @@ public partial class {{Name}}Controller : ControllerBase {{#if HasValue}} [AcceptsBody(typeof(Common.Entities.{{ValueType}}){{#ifeq WebApiMethod 'HttpPatch'}}, HttpConsts.MergePatchMediaTypeName{{/ifeq}})] {{/if}} - [ProducesResponseType({{#if HasReturnValue}}typeof({{#if IsReturnTypeEntity}}Common.Entities.{{/if}}{{#ifeq Type 'GetColl'}}{{BaseReturnType}}Collection{{else}}{{BaseReturnType}}{{/ifeq}}), {{/if}}(int)HttpStatusCode.{{WebApiStatus}})] + {{#if WebApiProducesContentType}} + [Produces({{WebApiProducesContentType}})] + {{/if}} + [ProducesResponseType({{#if WebApiProducesResponseType}}{{#if IsWebApiProducesResponseTypeNone}}{{else}}typeof({{WebApiProducesResponseType}}), {{/if}}{{else}}{{#if HasReturnValue}}typeof({{#if IsReturnTypeEntity}}Common.Entities.{{/if}}{{#ifeq Type 'GetColl'}}{{BaseReturnType}}Collection{{else}}{{BaseReturnType}}{{/ifeq}}), {{/if}}{{/if}}(int)HttpStatusCode.{{WebApiStatus}})] {{#if HasReturnValue}} {{#ifne WebApiAlternateStatus 'null'}} [ProducesResponseType((int)HttpStatusCode.{{WebApiAlternateStatus}})] diff --git a/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiAgent_cs.hbs b/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiAgent_cs.hbs index 391378e2a..17fe490df 100644 --- a/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiAgent_cs.hbs +++ b/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiAgent_cs.hbs @@ -43,8 +43,8 @@ namespace {{Root.NamespaceCommon}}.Agents {{#each RefDataEntities}} /// - public Task> {{Name}}GetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) => - GetAsync<{{RefDataQualifiedEntityCollectionName}}>("{{WebApiRoutePrefix}}", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); + public Task> {{Name}}GetAllAsync(ReferenceDataFilter? args = null, HttpRequestOptions? requestOptions = null, CancellationToken cancellationToken = default) + => GetAsync<{{RefDataQualifiedEntityCollectionName}}>("{{WebApiRoutePrefix}}", requestOptions: requestOptions, args: HttpArgs.Create(new HttpArg("args", args!, HttpArgType.FromUriUseProperties)), cancellationToken); {{/each}} /// diff --git a/tools/Beef.Database.Core/Beef.Database.Core.csproj b/tools/Beef.Database.Core/Beef.Database.Core.csproj index 7a022245a..1ed548baa 100644 --- a/tools/Beef.Database.Core/Beef.Database.Core.csproj +++ b/tools/Beef.Database.Core/Beef.Database.Core.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj index 8356ce1f3..6e8a2f508 100644 --- a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj +++ b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj index 4696e399f..555b58c37 100644 --- a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj +++ b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj index 8c8f40725..686b519b2 100644 --- a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj +++ b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj @@ -8,7 +8,7 @@ - +