diff --git a/CHANGELOG.md b/CHANGELOG.md
index ffd9ed56d..fb7efddd1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,20 +2,29 @@
Represents the **NuGet** versions.
+## v5.13.0
+- *Enhancement:* Added `dotnet run openapi` option to perform *basic* parsing of an [OpenAPI](https://spec.openapis.org/oas/latest.html) document generating the corresponding `Entity`, `Operation` and `Property` configuration into a temporary YAML file. The contents are expected to then be copied and pasted into the appropriate YAML destination and further configured as necessary.
+ - Execute `dotnet run -- --help` to see all command-line capabilities for this.
+ - All OpenAPI paths (operations) are generated into a single `Service` entity; this can be further split into multiple entities manually as required.
+ - Where a schema (entity) is specified more than once with the same name it will attempt to match the configuration (including properties) to an existing entity and reuse; otherwise, a new entity will be created with a postfix number to ensure uniqueness.
+ - The `OpenApiArgs` supports further options to enable additional customization of processing and generated output; this is set using the `CodeGenConsole.WithOpenApiArgs` method.
+ - _Note:_ this is in _preview_ until explicitly noted in a later version; as such, the generated YAML will require manual review and adjustment as required and may not support all features (for some time or ever). This is only intended to help accelerate the initial configuration process where an OpenAPI document is available.
+- *Fixed*: Sanitize the generated `Api.Controller` and `Common` summary text comments to remove internal references, etc.
+
## v5.12.9
- *Fixed:* Enable `text` specification to be used as-is by prefixing with a `+` plus-sign character.
- *Fixed:* Upgraded `DbEx` (`v2.5.8`) to include all related fixes and improvements.
## v5.12.8
-- *Fixed*: Fixed the model code-generation by allowing the `ModelInherits` to be specified within the `Entity` YAML configuration to override the default.
-- *Fixed*: Fixed `dotnet run count` to exclude paths that start with `.` (dot) to avoid including hidden files in the count.
+- *Fixed:* Fixed the model code-generation by allowing the `ModelInherits` to be specified within the `Entity` YAML configuration to override the default.
+- *Fixed:* Fixed `dotnet run count` to exclude paths that start with `.` (dot) to avoid including hidden files in the count.
## v5.12.7
-- *Fixed*: Fixes the model code-generation to auto implement the `ITenantId` and `ILogicallyDeleted` where corresponding properties are defined.
-- *Fixed*: Fixed the manager code-generation to output the `IdentifierGenerator` code where inheriting the `Id` property.
+- *Fixed:* Fixes the model code-generation to auto implement the `ITenantId` and `ILogicallyDeleted` where corresponding properties are defined.
+- *Fixed:* Fixed the manager code-generation to output the `IdentifierGenerator` code where inheriting the `Id` property.
## v5.12.6
-- *Fixed*: The EF Model generation has had the `ITenantId.TenantId` filtering removed as out-of-the-box EF caches first and uses resulting in an unexpected side-effect. The `CoreEx.EntityFramework` as of `v3.20.0` automatically includes tenant filtering to achieve the desired behavior.
+- *Fixed:* The EF Model generation has had the `ITenantId.TenantId` filtering removed as out-of-the-box EF caches first and uses resulting in an unexpected side-effect. The `CoreEx.EntityFramework` as of `v3.20.0` automatically includes tenant filtering to achieve the desired behavior.
- *Fixed:* Upgraded `CoreEx` (`v3.20.0`) to include all related fixes and improvements.
## v5.12.5
diff --git a/Common.targets b/Common.targets
index 8f30a7860..923121b92 100644
--- a/Common.targets
+++ b/Common.targets
@@ -1,6 +1,6 @@
- 5.12.9
+ 5.13.0
preview
Avanade
Avanade
@@ -27,6 +27,7 @@
true
true
true
+ preview
diff --git a/docs/Entity-Entity-Config.md b/docs/Entity-Entity-Config.md
index c889a7a90..65c689aa0 100644
--- a/docs/Entity-Entity-Config.md
+++ b/docs/Entity-Entity-Config.md
@@ -215,7 +215,7 @@ Property | Description
**`databaseName`** | The .NET database interface name (used where `AutoImplement` is `Database`).
† Defaults to the `CodeGeneration.DatabaseName` configuration property (its default value is `IDatabase`).
**`databaseSchema`** | The database schema name (used where `AutoImplement` is `Database`).
† Defaults to `dbo`.
`databaseMapperInheritsFrom` | The name of the `Mapper` that the generated Database `Mapper` inherits from.
-`databaseCustomerMapper` | Indicates that a custom Database `Mapper` will be used; i.e. not generated.
† Otherwise, by default, a `Mapper` will be generated.
+`databaseCustomMapper` | Indicates that a custom Database `Mapper` will be used; i.e. not generated.
† Otherwise, by default, a `Mapper` will be generated.
`databaseMapperEx` | Indicates that a `DatabaseMapperEx` (extended/explicit) will be used; versus, `DatabaseMapper` (which uses Reflection internally).
† Defaults to `CodeGeneration.DatabaseMapperEx` (its default value is `true`). The `DatabaseMapperEx` essentially replaces the `DatabaseMapper` as it is more performant; this option can be used where leagcy/existing behavior is required.
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 083dfb1e5..396d03c4e 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 0ef301339..14abc37c4 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/AccountController.cs
@@ -28,10 +28,10 @@ public AccountController(WebApi webApi, IAccountManager manager)
///
/// Get all accounts.
///
- /// The Product Category (see ).
- /// The Open Status (see ).
+ /// The Product Category.
+ /// The Open Status.
/// Indicates whether Is Owned.
- /// The
+ /// The Account array
[Tags("Banking", "Accounts")]
[HttpGet("api/v1/banking/accounts", Name="Account_GetAccounts")]
[Paging]
@@ -44,10 +44,10 @@ public Task GetAccounts([FromQuery(Name="product-category")] stri
}
///
- /// Get .
+ /// Get AccountDetail.
///
- /// The identifier.
- /// The selected where found.
+ /// The Account identifier.
+ /// The selected AccountDetail where found.
[HttpGet("api/v1/banking/accounts/{accountId}", Name="Account_GetDetail")]
[ProducesResponseType(typeof(Common.Entities.AccountDetail), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -55,10 +55,10 @@ public Task GetDetail(string? accountId)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetDetailAsync(accountId));
///
- /// Get .
+ /// Get Account Balance.
///
- /// The identifier.
- /// The selected where found.
+ /// The Account identifier.
+ /// The selected Balance where found.
[HttpGet("api/v1/banking/accounts/{accountId}/balance", Name="Account_GetBalance")]
[ProducesResponseType(typeof(Common.Entities.Balance), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -66,10 +66,10 @@ public Task GetBalance(string? accountId)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetBalanceAsync(accountId));
///
- /// Get statement (file).
+ /// Get Account statement (file).
///
- /// The identifier.
- /// A resultant .
+ /// The Account identifier.
+ /// A resultant FileContentResult.
[HttpGet("api/v1/banking/accounts/{accountId}/statement", Name="Account_GetStatement")]
[Produces("text/plain")]
[ProducesResponseType((int)HttpStatusCode.OK)]
diff --git a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/ReferenceDataController.cs b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/ReferenceDataController.cs
index c8fa84e27..402225d39 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/ReferenceDataController.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/ReferenceDataController.cs
@@ -25,66 +25,66 @@ public ReferenceDataController(ReferenceDataContentWebApi webApi, ReferenceDataO
{ _webApi = webApi.ThrowIfNull(); _orchestrator = orchestrator.ThrowIfNull(); }
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'OpenStatus' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.OpenStatus collection.
+ /// The 'OpenStatus' array.
[HttpGet("api/v1/ref/openstatuses", Name="ReferenceData_OpenStatusGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task OpenStatusGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'ProductCategory' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.ProductCategory collection.
+ /// The 'ProductCategory' array.
[HttpGet("api/v1/ref/productcategories", Name="ReferenceData_ProductCategoryGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task ProductCategoryGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'AccountUType' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.AccountUType collection.
+ /// The 'AccountUType' array.
[HttpGet("api/v1/ref/accountutypes", Name="ReferenceData_AccountUTypeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task AccountUTypeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'MaturityInstructions' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.MaturityInstructions collection.
+ /// The 'MaturityInstructions' array.
[HttpGet("api/v1/ref/maturityinstructions", Name="ReferenceData_MaturityInstructionsGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task MaturityInstructionsGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'TransactionType' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.TransactionType collection.
+ /// The 'TransactionType' array.
[HttpGet("api/v1/ref/transactiontypes", Name="ReferenceData_TransactionTypeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task TransactionTypeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'TransactionStatus' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.TransactionStatus collection.
+ /// The 'TransactionStatus' array.
[HttpGet("api/v1/ref/transactionstatuses", Name="ReferenceData_TransactionStatusGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task TransactionStatusGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
@@ -93,7 +93,7 @@ public Task TransactionStatusGetAll([FromQuery] IEnumerable
/// Gets the reference data entries for the specified entities and codes from the query string; e.g: api/v1/ref?entity=codeX,codeY&entity2=codeZ&entity3
///
- /// A .
+ /// The 'ReferenceDataMultiDictionary'.
[HttpGet("api/v1/ref", Name="ReferenceData_GetNamed")]
[ProducesResponseType(typeof(CoreEx.RefData.ReferenceDataMultiDictionary), (int)HttpStatusCode.OK)]
public Task GetNamed() => _webApi.GetAsync(Request, p => _orchestrator.GetNamedAsync(p.RequestOptions));
diff --git a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/TransactionController.cs b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/TransactionController.cs
index 0863efd52..5a3daaaec 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/TransactionController.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Api/Controllers/Generated/TransactionController.cs
@@ -33,7 +33,7 @@ public TransactionController(WebApi webApi, ITransactionManager manager)
/// The Min Amount.
/// The Max Amount.
/// The Text.
- /// The
+ /// The Transaction array
[HttpGet("api/v1/banking/accounts/{accountId}/transactions", Name="Transaction_GetTransactions")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.TransactionCollection), (int)HttpStatusCode.OK)]
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 e93d9137d..b227b8d39 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj
+++ b/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj
@@ -2,6 +2,7 @@
net6.0
enable
+ preview
true
@@ -11,8 +12,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/ReferenceDataProvider.cs b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/ReferenceDataProvider.cs
index ff066e2d5..1aa6cf8bf 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Business/Generated/ReferenceDataProvider.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Business/Generated/ReferenceDataProvider.cs
@@ -20,15 +20,15 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
partial void ReferenceDataProviderCtor(); // Enables the ReferenceDataProvider constructor to be extended.
///
- public Type[] Types => new Type[]
- {
+ public Type[] Types =>
+ [
typeof(RefDataNamespace.OpenStatus),
typeof(RefDataNamespace.ProductCategory),
typeof(RefDataNamespace.AccountUType),
typeof(RefDataNamespace.MaturityInstructions),
typeof(RefDataNamespace.TransactionType),
typeof(RefDataNamespace.TransactionStatus)
- };
+ ];
///
public Task> GetAsync(Type type, CancellationToken cancellationToken = default) => _dataService.GetAsync(type);
diff --git a/samples/Cdr.Banking/Cdr.Banking.CodeGen/Properties/launchSettings.json b/samples/Cdr.Banking/Cdr.Banking.CodeGen/Properties/launchSettings.json
index 2338319c9..7e531a089 100644
--- a/samples/Cdr.Banking/Cdr.Banking.CodeGen/Properties/launchSettings.json
+++ b/samples/Cdr.Banking/Cdr.Banking.CodeGen/Properties/launchSettings.json
@@ -2,7 +2,7 @@
"profiles": {
"Cdr.Banking.CodeGen": {
"commandName": "Project",
- "commandLineArgs": "endpoints"
+ "commandLineArgs": "entity"
}
}
}
\ No newline at end of file
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 d697fc625..17294fee8 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.Common/Entities/Generated/Account.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Account.cs
index 44a253477..38366f6f1 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Account.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Account.cs
@@ -63,12 +63,12 @@ public partial class Account : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the Account collection.
///
public partial class AccountCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the Account collection result.
///
public class AccountCollectionResult : CollectionResult
{
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountArgs.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountArgs.cs
index 738774a51..b013b7ebd 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountArgs.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountArgs.cs
@@ -11,7 +11,7 @@
namespace Cdr.Banking.Common.Entities
{
///
- /// Represents the arguments entity.
+ /// Represents the Account arguments entity.
///
public partial class AccountArgs
{
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountDetail.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountDetail.cs
index b92a61e48..8b1656ad2 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountDetail.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountDetail.cs
@@ -11,7 +11,7 @@
namespace Cdr.Banking.Common.Entities
{
///
- /// Represents the Detail entity.
+ /// Represents the Account Detail entity.
///
public partial class AccountDetail : Account
{
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountUType.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountUType.cs
index 000d241e1..e1519663f 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountUType.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/AccountUType.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class AccountUType : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the AccountUType collection.
///
public partial class AccountUTypeCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Balance.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Balance.cs
index b580f82b7..a6a15bff3 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Balance.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Balance.cs
@@ -16,7 +16,7 @@ namespace Cdr.Banking.Common.Entities
public partial class Balance : IIdentifier
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Account identifier.
///
[JsonPropertyName("accountId")]
public string? Id { get; set; }
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/BalancePurse.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/BalancePurse.cs
index f42ecff5c..1a75eef82 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/BalancePurse.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/BalancePurse.cs
@@ -11,7 +11,7 @@
namespace Cdr.Banking.Common.Entities
{
///
- /// Represents the Purse entity.
+ /// Represents the Balance Purse entity.
///
public partial class BalancePurse
{
@@ -27,7 +27,7 @@ public partial class BalancePurse
}
///
- /// Represents the collection.
+ /// Represents the BalancePurse collection.
///
public partial class BalancePurseCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/MaturityInstructions.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/MaturityInstructions.cs
index 5ad4a9c0c..5d2176ae2 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/MaturityInstructions.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/MaturityInstructions.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class MaturityInstructions : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the MaturityInstructions collection.
///
public partial class MaturityInstructionsCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/OpenStatus.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/OpenStatus.cs
index 29d5e23b7..d7d4bca2c 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/OpenStatus.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/OpenStatus.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class OpenStatus : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the OpenStatus collection.
///
public partial class OpenStatusCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/ProductCategory.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/ProductCategory.cs
index d885a1a87..755dca441 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/ProductCategory.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/ProductCategory.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class ProductCategory : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the ProductCategory collection.
///
public partial class ProductCategoryCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Transaction.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Transaction.cs
index afa82c717..a9d826b2b 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Transaction.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/Transaction.cs
@@ -16,7 +16,7 @@ namespace Cdr.Banking.Common.Entities
public partial class Transaction : IIdentifier
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Account identifier.
///
[JsonPropertyName("transactionId")]
public string? Id { get; set; }
@@ -98,12 +98,12 @@ public partial class Transaction : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the Transaction collection.
///
public partial class TransactionCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the Transaction collection result.
///
public class TransactionCollectionResult : CollectionResult
{
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionArgs.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionArgs.cs
index e3dac0532..697bb61b7 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionArgs.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionArgs.cs
@@ -11,7 +11,7 @@
namespace Cdr.Banking.Common.Entities
{
///
- /// Represents the Arguments entity.
+ /// Represents the Transaction Arguments entity.
///
public partial class TransactionArgs
{
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionStatus.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionStatus.cs
index 83633a5cc..4832a473f 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionStatus.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionStatus.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class TransactionStatus : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the TransactionStatus collection.
///
public partial class TransactionStatusCollection : List { }
}
\ No newline at end of file
diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionType.cs b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionType.cs
index 4d9713c47..9b13dbe2a 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionType.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Common/Entities/Generated/TransactionType.cs
@@ -17,7 +17,7 @@ namespace Cdr.Banking.Common.Entities
public partial class TransactionType : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the TransactionType collection.
///
public partial class TransactionTypeCollection : List { }
}
\ 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 289cef190..0594289b0 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj
+++ b/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj
@@ -39,7 +39,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/samples/Cdr.Banking/Cdr.Banking.Test/FixtureSetup.cs b/samples/Cdr.Banking/Cdr.Banking.Test/FixtureSetup.cs
index 67bdc1072..1811e6354 100644
--- a/samples/Cdr.Banking/Cdr.Banking.Test/FixtureSetup.cs
+++ b/samples/Cdr.Banking/Cdr.Banking.Test/FixtureSetup.cs
@@ -54,7 +54,7 @@ public void OneTimeSetUp()
await _cosmosDb.Transactions.ImportBatchAsync(jdr, cancellationToken: ct).ConfigureAwait(false);
jdr = JsonDataReader.ParseYaml("RefData.yaml", new JsonDataReaderArgs(new CoreEx.Text.Json.ReferenceDataContentJsonSerializer()));
- await _cosmosDb.ImportValueBatchAsync("RefData", jdr, test.Services.GetRequiredService().GetAllTypes(), cancellationToken: ct).ConfigureAwait(false);
+ await _cosmosDb.ImportValueBatchAsync("RefData", jdr, CoreEx.RefData.ReferenceDataOrchestrator.GetAllTypesInNamespace(), cancellationToken: ct).ConfigureAwait(false);
}
return true;
diff --git a/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj b/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj
index 2c0bd046e..3f2fe13c4 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/ConfigController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ConfigController.cs
index 98d784bdb..74ba610d0 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/ConfigController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ConfigController.cs
@@ -30,7 +30,7 @@ public ConfigController(WebApi webApi, IConfigManager manager)
///
/// Get Env Vars.
///
- /// A resultant .
+ /// A resultant System.Collections.IDictionary.
[HttpPost("api/v1/envvars", Name="Config_GetEnvVars")]
[ProducesResponseType(typeof(System.Collections.IDictionary), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/ContactController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ContactController.cs
index 452729acd..a10eac53f 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/ContactController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ContactController.cs
@@ -31,9 +31,9 @@ public ContactController(WebApi webApi, IContactManager manager, Microsoft.Exten
partial void ContactControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Contact array that contains the items that match the selection criteria.
///
- /// The
+ /// The Contact array
[HttpGet("api/v1/contacts", Name="Contact_GetAll")]
[ProducesResponseType(typeof(Common.Entities.ContactCollection), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
@@ -41,10 +41,10 @@ public Task GetAll()
=> _webApi.GetAsync(Request, p => _manager.GetAllAsync(), alternateStatusCode: HttpStatusCode.NoContent);
///
- /// Gets the specified .
+ /// Gets the specified Contact.
///
- /// The identifier.
- /// The selected where found.
+ /// The Contact identifier.
+ /// The selected Contact where found.
[HttpGet("api/v1/contacts/{id}", Name="Contact_Get")]
[ProducesResponseType(typeof(Common.Entities.Contact), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -52,9 +52,9 @@ public Task Get(Guid id)
=> _webApi.GetAsync(Request, p => _manager.GetAsync(id));
///
- /// Creates a new .
+ /// Creates a new Contact.
///
- /// The created .
+ /// The created Contact.
[HttpPost("api/v1/contacts", Name="Contact_Create")]
[AcceptsBody(typeof(Common.Entities.Contact))]
[ProducesResponseType(typeof(Common.Entities.Contact), (int)HttpStatusCode.Created)]
@@ -62,10 +62,10 @@ public Task Create()
=> _webApi.PostAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created);
///
- /// Updates an existing .
+ /// Updates an existing Contact.
///
- /// The identifier.
- /// The updated .
+ /// The Contact identifier.
+ /// The updated Contact.
[HttpPut("api/v1/contacts/{id}", Name="Contact_Update")]
[AcceptsBody(typeof(Common.Entities.Contact))]
[ProducesResponseType(typeof(Common.Entities.Contact), (int)HttpStatusCode.OK)]
@@ -74,10 +74,10 @@ public Task Update(Guid id)
=> _webApi.PutAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing Contact.
///
- /// The identifier.
- /// The patched .
+ /// The Contact identifier.
+ /// The patched Contact.
[HttpPatch("api/v1/contacts/{id}", Name="Contact_Patch")]
[AcceptsBody(typeof(Common.Entities.Contact), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Contact), (int)HttpStatusCode.OK)]
@@ -86,9 +86,9 @@ public Task Patch(Guid id)
=> _webApi.PatchAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified Contact.
///
- /// The identifier.
+ /// The Contact identifier.
[HttpDelete("api/v1/contacts/{id}", Name="Contact_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/GenderController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/GenderController.cs
index 4560d3a54..3e772f2c2 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/GenderController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/GenderController.cs
@@ -29,10 +29,10 @@ public GenderController(ReferenceDataContentWebApi webApi, IGenderManager manage
partial void GenderControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified Gender.
///
- /// The identifier.
- /// The selected where found.
+ /// The Gender identifier.
+ /// The selected Gender where found.
[HttpGet("api/v1/demo/ref/genders/{id}", Name="Gender_Get")]
[ProducesResponseType(typeof(Common.Entities.Gender), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -40,9 +40,9 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Creates a new .
+ /// Creates a new Gender.
///
- /// The created .
+ /// The created Gender.
[HttpPost("api/v1/demo/ref/genders", Name="Gender_Create")]
[AcceptsBody(typeof(Common.Entities.Gender))]
[ProducesResponseType(typeof(Common.Entities.Gender), (int)HttpStatusCode.Created)]
@@ -50,10 +50,10 @@ public Task Create()
=> _webApi.PostWithResultAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created);
///
- /// Updates an existing .
+ /// Updates an existing Gender.
///
- /// The identifier.
- /// The updated .
+ /// The Gender identifier.
+ /// The updated Gender.
[HttpPut("api/v1/demo/ref/genders/{id}", Name="Gender_Update")]
[AcceptsBody(typeof(Common.Entities.Gender))]
[ProducesResponseType(typeof(Common.Entities.Gender), (int)HttpStatusCode.OK)]
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs
index a7b831805..0bc909e79 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PersonController.cs
@@ -32,9 +32,9 @@ public PersonController(WebApi webApi, IPersonManager manager, IPersonManager pe
partial void PersonControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Creates a new .
+ /// Creates a new Person.
///
- /// The created .
+ /// The created Person.
[HttpPost("api/v1/persons", Name="Person_Create")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.Created)]
@@ -42,19 +42,19 @@ public Task Create()
=> _webApi.PostAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/api/v1/persons/{r.Id}", UriKind.Relative));
///
- /// Deletes the specified .
+ /// Deletes the specified Person.
///
- /// The identifier.
+ /// The Person identifier.
[HttpDelete("api/v1/persons/{id}", Name="Person_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
=> _webApi.DeleteAsync(Request, p => _manager.DeleteAsync(id));
///
- /// Gets the specified .
+ /// Gets the specified Person.
///
- /// The identifier.
- /// The selected where found.
+ /// The Person identifier.
+ /// The selected Person where found.
[HttpGet("api/v1/persons/{id}", Name="Person_Get")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -62,10 +62,10 @@ public Task Get(Guid id)
=> _webApi.GetAsync(Request, p => _manager.GetAsync(id));
///
- /// Gets the specified .
+ /// Gets the specified Person.
///
- /// The identifier.
- /// The selected where found.
+ /// The Person identifier.
+ /// The selected Person where found.
[HttpGet("api/v1/persons/ex/{id}", Name="Person_GetEx")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -73,10 +73,10 @@ public Task GetEx(Guid id)
=> _webApi.GetAsync(Request, p => _manager.GetExAsync(id));
///
- /// Updates an existing .
+ /// Updates an existing Person.
///
- /// The identifier.
- /// The updated .
+ /// The Person identifier.
+ /// The updated Person.
[HttpPut("api/v1/persons/{id}", Name="Person_Update")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -85,10 +85,10 @@ public Task Update(Guid id)
=> _webApi.PutAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Updates an existing .
+ /// Updates an existing Person.
///
- /// The identifier.
- /// The updated .
+ /// The Person identifier.
+ /// The updated Person.
[HttpPut("api/v1/persons/withRollback/{id}", Name="Person_UpdateWithRollback")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -97,10 +97,10 @@ public Task UpdateWithRollback(Guid id)
=> _webApi.PutAsync(Request, p => _manager.UpdateWithRollbackAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing Person.
///
- /// The identifier.
- /// The patched .
+ /// The Person identifier.
+ /// The patched Person.
[HttpPatch("api/v1/persons/{id}", Name="Person_Patch")]
[AcceptsBody(typeof(Common.Entities.Person), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -109,9 +109,9 @@ public Task Patch(Guid id)
=> _webApi.PatchAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Person array that contains the items that match the selection criteria.
///
- /// The
+ /// The Person array
[Tags("apples", "oranges")]
[HttpGet("api/v1/persons/all", Name="Person_GetAll")]
[Paging]
@@ -121,9 +121,9 @@ public Task GetAll()
=> _webApi.GetAsync(Request, p => _manager.GetAllAsync(p.RequestOptions.Paging), alternateStatusCode: HttpStatusCode.NoContent);
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Person array that contains the items that match the selection criteria.
///
- /// The
+ /// The Person array
[HttpGet("api/v1/persons/allnopaging", Name="Person_GetAll2")]
[ProducesResponseType(typeof(Common.Entities.PersonCollection), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
@@ -131,13 +131,13 @@ public Task GetAll2()
=> _webApi.GetAsync(Request, p => _manager.GetAll2Async(), alternateStatusCode: HttpStatusCode.NoContent);
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Person array that contains the items that match the selection criteria.
///
/// The First Name.
/// The Last Name.
- /// The Genders (see ).
+ /// The Genders.
/// The Order By.
- /// The
+ /// The Person array
[HttpGet("api/v1/persons", Name="Person_GetByArgs")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.PersonCollection), (int)HttpStatusCode.OK)]
@@ -149,13 +149,13 @@ public Task GetByArgs(string? firstName = default, string? lastNa
}
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the PersonDetail array that contains the items that match the selection criteria.
///
/// The First Name.
/// The Last Name.
- /// The Genders (see ).
+ /// The Genders.
/// The Order By.
- /// The
+ /// The PersonDetail array
[HttpGet("api/v1/persons/argsdetail", Name="Person_GetDetailByArgs")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.PersonDetailCollection), (int)HttpStatusCode.OK)]
@@ -167,11 +167,11 @@ public Task GetDetailByArgs(string? firstName = default, string?
}
///
- /// Merge first into second.
+ /// Merge first Person into second.
///
- /// The from identifier.
- /// The to identifier.
- /// A resultant .
+ /// The from Person identifier.
+ /// The to Person identifier.
+ /// A resultant Person.
[HttpPost("api/v1/persons/merge", Name="Person_Merge")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
@@ -179,7 +179,7 @@ public Task Merge(Guid fromId, Guid toId)
=> _webApi.PostAsync(Request, p => _manager.MergeAsync(fromId, toId), alternateStatusCode: HttpStatusCode.NoContent, operationType: CoreEx.OperationType.Update);
///
- /// Mark .
+ /// Mark Person.
///
[HttpPost("api/v1/persons/mark", Name="Person_Mark")]
[ProducesResponseType((int)HttpStatusCode.Accepted)]
@@ -187,10 +187,10 @@ public Task Mark()
=> _webApi.PostAsync(Request, p => _manager.MarkAsync(), statusCode: HttpStatusCode.Accepted, operationType: CoreEx.OperationType.Update);
///
- /// Get at specified .
+ /// Get Person at specified MapCoordinates.
///
- /// The Coordinates (see ).
- /// A resultant .
+ /// The Coordinates.
+ /// A resultant MapCoordinates.
[HttpPost("api/v1/persons/map", Name="Person_Map")]
[ProducesResponseType(typeof(Common.Entities.MapCoordinates), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
@@ -203,7 +203,7 @@ public Task Map(MapCoordinates? coordinates = default)
///
/// Get no arguments.
///
- /// The selected where found.
+ /// The selected Person where found.
[HttpGet("api/v1/persons/noargsforme", Name="Person_GetNoArgs")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -211,10 +211,10 @@ public Task GetNoArgs()
=> _webApi.GetAsync(Request, p => _manager.GetNoArgsAsync());
///
- /// Gets the specified .
+ /// Gets the specified PersonDetail.
///
- /// The identifier.
- /// The selected where found.
+ /// The Person identifier.
+ /// The selected PersonDetail where found.
[HttpGet("api/v1/persons/{id}/detail", Name="Person_GetDetail")]
[ProducesResponseType(typeof(Common.Entities.PersonDetail), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -222,10 +222,10 @@ public Task GetDetail(Guid id)
=> _webApi.GetAsync(Request, p => _manager.GetDetailAsync(id));
///
- /// Updates an existing .
+ /// Updates an existing PersonDetail.
///
- /// The identifier.
- /// The updated .
+ /// The Person identifier.
+ /// The updated PersonDetail.
[HttpPut("api/v1/persons/{id}/detail", Name="Person_UpdateDetail")]
[AcceptsBody(typeof(Common.Entities.PersonDetail))]
[ProducesResponseType(typeof(Common.Entities.PersonDetail), (int)HttpStatusCode.OK)]
@@ -234,10 +234,10 @@ public Task UpdateDetail(Guid id)
=> _webApi.PutAsync(Request, p => _manager.UpdateDetailAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing PersonDetail.
///
- /// The identifier.
- /// The patched .
+ /// The Person identifier.
+ /// The patched PersonDetail.
[HttpPatch("api/v1/persons/{id}/detail", Name="Person_PatchDetail")]
[AcceptsBody(typeof(Common.Entities.PersonDetail), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.PersonDetail), (int)HttpStatusCode.OK)]
@@ -248,7 +248,7 @@ public Task PatchDetail(Guid id)
///
/// Actually validating the FromBody parameter generation.
///
- /// The Person (see ).
+ /// The Person.
[HttpPost("api/v1/persons/fromBody", Name="Person_Add")]
[ProducesResponseType((int)HttpStatusCode.Created)]
public Task Add([FromBody] Person person)
@@ -267,7 +267,7 @@ public Task CustomManagerOnly()
///
/// The Name.
/// The Names.
- /// A resultant .
+ /// A resultant Person.
[HttpGet("api/v1/persons/null", Name="Person_GetNull")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -277,7 +277,7 @@ public Task GetNull(string? name, List? names = default)
///
/// Validate when an Event is published but not sent.
///
- /// The updated .
+ /// The updated Person.
[HttpPut("api/v1/persons/publishnosend", Name="Person_EventPublishNoSend")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -286,13 +286,13 @@ public Task EventPublishNoSend()
=> _webApi.PutAsync(Request, p => _manager.EventPublishNoSendAsync(p.Value!));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Person array that contains the items that match the selection criteria.
///
/// The First Name.
/// The Last Name.
- /// The Genders (see ).
+ /// The Genders.
/// The Order By.
- /// The
+ /// The Person array
[HttpGet("api/v1/persons/args", Name="Person_GetByArgsWithEf")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.PersonCollection), (int)HttpStatusCode.OK)]
@@ -314,8 +314,8 @@ public Task ThrowError()
///
/// Invoke Api Via Agent.
///
- /// The identifier.
- /// A resultant .
+ /// The Person identifier.
+ /// A resultant string.
[HttpPost("api/v1/persons/invokeApi", Name="Person_InvokeApiViaAgent")]
[ProducesResponseType(typeof(string), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -332,10 +332,10 @@ public Task ParamColl([FromBody] AddressCollection? addresses)
=> _webApi.PostAsync(Request, p => _manager.ParamCollAsync(addresses), statusCode: HttpStatusCode.NoContent, operationType: CoreEx.OperationType.Unspecified);
///
- /// Gets the specified .
+ /// Gets the specified Person.
///
- /// The identifier.
- /// The selected where found.
+ /// The Person identifier.
+ /// The selected Person where found.
[HttpGet("api/v1/persons/ef/{id}", Name="Person_GetWithEf")]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -343,9 +343,9 @@ public Task GetWithEf(Guid id)
=> _webApi.GetAsync(Request, p => _manager.GetWithEfAsync(id));
///
- /// Creates a new .
+ /// Creates a new Person.
///
- /// The created .
+ /// The created Person.
[HttpPost("api/v1/persons/ef", Name="Person_CreateWithEf")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.Created)]
@@ -353,10 +353,10 @@ public Task CreateWithEf()
=> _webApi.PostAsync(Request, p => _manager.CreateWithEfAsync(p.Value!), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/api/v1/persons/ef/{r.Id}", UriKind.Relative));
///
- /// Updates an existing .
+ /// Updates an existing Person.
///
- /// The identifier.
- /// The updated .
+ /// The Person identifier.
+ /// The updated Person.
[HttpPut("api/v1/persons/ef/{id}", Name="Person_UpdateWithEf")]
[AcceptsBody(typeof(Common.Entities.Person))]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -365,19 +365,19 @@ public Task UpdateWithEf(Guid id)
=> _webApi.PutAsync(Request, p => _manager.UpdateWithEfAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified Person.
///
- /// The identifier.
+ /// The Person identifier.
[HttpDelete("api/v1/persons/ef/{id}", Name="Person_DeleteWithEf")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task DeleteWithEf(Guid id)
=> _webApi.DeleteAsync(Request, p => _manager.DeleteWithEfAsync(id));
///
- /// Patches an existing .
+ /// Patches an existing Person.
///
- /// The identifier.
- /// The patched .
+ /// The Person identifier.
+ /// The patched Person.
[HttpPatch("api/v1/persons/ef/{id}", Name="Person_PatchWithEf")]
[AcceptsBody(typeof(Common.Entities.Person), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Person), (int)HttpStatusCode.OK)]
@@ -388,8 +388,8 @@ public Task PatchWithEf(Guid id)
///
/// Get Documentation.
///
- /// The identifier.
- /// A resultant .
+ /// The Person identifier.
+ /// A resultant FileContentResult.
[HttpGet("api/v1/persons/{id}/documentation", Name="Person_GetDocumentation")]
[Produces("text/plain")]
[ProducesResponseType((int)HttpStatusCode.OK)]
@@ -400,8 +400,8 @@ public Task GetDocumentation(Guid id)
///
/// Simulate Work.
///
- /// The identifier.
- /// A resultant .
+ /// The Person identifier.
+ /// A resultant string.
[HttpGet("api/v1/persons/simulate", Name="Person_SimulateWork")]
[ProducesResponseType(typeof(string), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PostalInfoController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PostalInfoController.cs
index 734dd3aa2..027708d2a 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/PostalInfoController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/PostalInfoController.cs
@@ -28,12 +28,12 @@ public PostalInfoController(WebApi webApi, IPostalInfoManager manager)
partial void PostalInfoControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified PostalInfo.
///
- /// The Country (see ).
+ /// The Country.
/// The State.
/// The City.
- /// The selected where found.
+ /// The selected PostalInfo where found.
[HttpGet("api/v1/postal/{country}/{state}/{city}", Name="PostalInfo_GetPostCodes")]
[ProducesResponseType(typeof(Common.Entities.PostalInfo), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -41,12 +41,12 @@ public Task GetPostCodes(string? country, string? state, string?
=> _webApi.GetWithResultAsync(Request, p => _manager.GetPostCodesAsync(country, state, city));
///
- /// Creates a new .
+ /// Creates a new PostalInfo.
///
- /// The Country (see ).
+ /// The Country.
/// The State.
/// The City.
- /// The created .
+ /// The created PostalInfo.
[HttpPost("api/v1/postal/{country}/{state}/{city}", Name="PostalInfo_CreatePostCodes")]
[AcceptsBody(typeof(Common.Entities.PostalInfo))]
[ProducesResponseType(typeof(Common.Entities.PostalInfo), (int)HttpStatusCode.Created)]
@@ -54,12 +54,12 @@ public Task CreatePostCodes(string? country, string? state, strin
=> _webApi.PostWithResultAsync(Request, p => _manager.CreatePostCodesAsync(p.Value!, country, state, city), statusCode: HttpStatusCode.Created);
///
- /// Updates an existing .
+ /// Updates an existing PostalInfo.
///
- /// The Country (see ).
+ /// The Country.
/// The State.
/// The City.
- /// The updated .
+ /// The updated PostalInfo.
[HttpPut("api/v1/postal/{country}/{state}/{city}", Name="PostalInfo_UpdatePostCodes")]
[AcceptsBody(typeof(Common.Entities.PostalInfo))]
[ProducesResponseType(typeof(Common.Entities.PostalInfo), (int)HttpStatusCode.OK)]
@@ -68,12 +68,12 @@ public Task UpdatePostCodes(string? country, string? state, strin
=> _webApi.PutWithResultAsync(Request, get: _ => _manager.GetPostCodesAsync(country, state, city), put: p => _manager.UpdatePostCodesAsync(p.Value!, country, state, city), simulatedConcurrency: true);
///
- /// Patches an existing .
+ /// Patches an existing PostalInfo.
///
- /// The Country (see ).
+ /// The Country.
/// The State.
/// The City.
- /// The patched .
+ /// The patched PostalInfo.
[HttpPatch("api/v1/postal/{country}/{state}/{city}", Name="PostalInfo_PatchPostCodes")]
[AcceptsBody(typeof(Common.Entities.PostalInfo), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.PostalInfo), (int)HttpStatusCode.OK)]
@@ -82,9 +82,9 @@ public Task PatchPostCodes(string? country, string? state, string
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetPostCodesAsync(country, state, city), put: p => _manager.UpdatePostCodesAsync(p.Value!, country, state, city), simulatedConcurrency: true);
///
- /// Deletes the specified .
+ /// Deletes the specified PostalInfo.
///
- /// The Country (see ).
+ /// The Country.
/// The State.
/// The City.
[HttpDelete("api/v1/postal/{country}/{state}/{city}", Name="PostalInfo_DeletePostCodes")]
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/ReferenceDataController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ReferenceDataController.cs
index 34acc08df..e558d3f17 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/ReferenceDataController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/ReferenceDataController.cs
@@ -29,11 +29,11 @@ public ReferenceDataController(ReferenceDataContentWebApi webApi, ReferenceDataO
{ _webApi = webApi.ThrowIfNull(); _orchestrator = orchestrator.ThrowIfNull(); }
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Country' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Country collection.
+ /// The 'Country' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/countries", Name="ReferenceData_CountryGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -41,11 +41,11 @@ public Task CountryGetAll([FromQuery] IEnumerable? codes
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'USState' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.USState collection.
+ /// The 'USState' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/usStates", Name="ReferenceData_USStateGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -53,11 +53,11 @@ public Task USStateGetAll([FromQuery] IEnumerable? codes
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Gender' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Gender collection.
+ /// The 'Gender' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/genders", Name="ReferenceData_GenderGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -65,11 +65,11 @@ public Task GenderGetAll([FromQuery] IEnumerable? codes =
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'EyeColor' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.EyeColor collection.
+ /// The 'EyeColor' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/eyeColors", Name="ReferenceData_EyeColorGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -77,11 +77,11 @@ public Task EyeColorGetAll([FromQuery] IEnumerable? codes
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'PowerSource' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.PowerSource collection.
+ /// The 'PowerSource' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/powerSources", Name="ReferenceData_PowerSourceGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -89,11 +89,11 @@ public Task PowerSourceGetAll([FromQuery] IEnumerable? co
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Company' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Company collection.
+ /// The 'Company' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/companies", Name="ReferenceData_CompanyGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -101,11 +101,11 @@ public Task CompanyGetAll([FromQuery] IEnumerable? codes
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Status' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Status collection.
+ /// The 'Status' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/statuses", Name="ReferenceData_StatusGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -113,11 +113,11 @@ public Task StatusGetAll([FromQuery] IEnumerable? codes =
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'CommunicationType' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.CommunicationType collection.
+ /// The 'CommunicationType' array.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref/communicationTypes", Name="ReferenceData_CommunicationTypeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
@@ -127,7 +127,7 @@ public Task CommunicationTypeGetAll([FromQuery] IEnumerable
/// Gets the reference data entries for the specified entities and codes from the query string; e.g: api/v1/demo/ref?entity=codeX,codeY&entity2=codeZ&entity3
///
- /// A .
+ /// The 'ReferenceDataMultiDictionary'.
[AllowAnonymous]
[HttpGet("api/v1/demo/ref", Name="ReferenceData_GetNamed")]
[ProducesResponseType(typeof(CoreEx.RefData.ReferenceDataMultiDictionary), (int)HttpStatusCode.OK)]
diff --git a/samples/Demo/Beef.Demo.Api/Controllers/Generated/RobotController.cs b/samples/Demo/Beef.Demo.Api/Controllers/Generated/RobotController.cs
index ed7bb0811..7a22b8fdf 100644
--- a/samples/Demo/Beef.Demo.Api/Controllers/Generated/RobotController.cs
+++ b/samples/Demo/Beef.Demo.Api/Controllers/Generated/RobotController.cs
@@ -30,8 +30,8 @@ public RobotController(WebApi webApi, IRobotManager manager)
///
/// Get the R-O-B-O-T.
///
- /// The identifier.
- /// The selected where found.
+ /// The Robot identifier.
+ /// The selected Robot where found.
[HttpGet("api/v1/robots/{id}", Name="Robot_Get")]
[ProducesResponseType(typeof(Common.Entities.Robot), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -39,9 +39,9 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Creates a new .
+ /// Creates a new Robot.
///
- /// The created .
+ /// The created Robot.
[HttpPost("api/v1/robots", Name="Robot_Create")]
[AcceptsBody(typeof(Common.Entities.Robot))]
[ProducesResponseType(typeof(Common.Entities.Robot), (int)HttpStatusCode.Created)]
@@ -49,10 +49,10 @@ public Task Create()
=> _webApi.PostWithResultAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/api/v1/robots/{r.Id}", UriKind.Relative));
///
- /// Updates an existing .
+ /// Updates an existing Robot.
///
- /// The identifier.
- /// The updated .
+ /// The Robot identifier.
+ /// The updated Robot.
[HttpPut("api/v1/robots/{id}", Name="Robot_Update")]
[AcceptsBody(typeof(Common.Entities.Robot))]
[ProducesResponseType(typeof(Common.Entities.Robot), (int)HttpStatusCode.OK)]
@@ -61,10 +61,10 @@ public Task Update(Guid id)
=> _webApi.PutWithResultAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing Robot.
///
- /// The identifier.
- /// The patched .
+ /// The Robot identifier.
+ /// The patched Robot.
[HttpPatch("api/v1/robots/{id}", Name="Robot_Patch")]
[AcceptsBody(typeof(Common.Entities.Robot), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Robot), (int)HttpStatusCode.OK)]
@@ -73,21 +73,21 @@ public Task Patch(Guid id)
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified Robot.
///
- /// The identifier.
+ /// The Robot identifier.
[HttpDelete("api/v1/robots/{id}", Name="Robot_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
=> _webApi.DeleteWithResultAsync(Request, p => _manager.DeleteAsync(id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the Robot array that contains the items that match the selection criteria.
///
/// The Model number.
/// The Unique serial number.
- /// The Power Sources (see ).
- /// The
+ /// The Power Sources.
+ /// The Robot array
[HttpGet("api/v1/robots", Name="Robot_GetByArgs")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.RobotCollection), (int)HttpStatusCode.OK)]
@@ -99,10 +99,10 @@ public Task GetByArgs([FromQuery(Name="model-no")] string? modelN
}
///
- /// Raises a change event.
+ /// Raises a Robot.PowerSource change event.
///
- /// The identifier.
- /// The Power Source (see ).
+ /// The Robot identifier.
+ /// The Power Source.
[HttpPost("api/v1/robots/{id}/powerSource/{powerSource}", Name="Robot_RaisePowerSourceChange")]
[ProducesResponseType((int)HttpStatusCode.Accepted)]
public Task RaisePowerSourceChange(Guid id, string? powerSource)
diff --git a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj
index a55a6c56e..16cac5168 100644
--- a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj
+++ b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj
@@ -16,14 +16,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/samples/Demo/Beef.Demo.Business/Generated/ReferenceDataProvider.cs b/samples/Demo/Beef.Demo.Business/Generated/ReferenceDataProvider.cs
index 974af75a0..28f4bbe41 100644
--- a/samples/Demo/Beef.Demo.Business/Generated/ReferenceDataProvider.cs
+++ b/samples/Demo/Beef.Demo.Business/Generated/ReferenceDataProvider.cs
@@ -23,8 +23,8 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
partial void ReferenceDataProviderCtor(); // Enables the ReferenceDataProvider constructor to be extended.
///
- public Type[] Types => new Type[]
- {
+ public Type[] Types =>
+ [
typeof(RefDataNamespace.Country),
typeof(RefDataNamespace.USState),
typeof(RefDataNamespace.Gender),
@@ -33,7 +33,7 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
typeof(RefDataNamespace.Company),
typeof(RefDataNamespace.Status),
typeof(RefDataNamespace.CommunicationType)
- };
+ ];
///
public Task> GetAsync(Type type, CancellationToken cancellationToken = default) => _dataService.GetAsync(type);
diff --git a/samples/Demo/Beef.Demo.CodeGen/Properties/launchSettings.json b/samples/Demo/Beef.Demo.CodeGen/Properties/launchSettings.json
index eff4d367c..78e8c74ec 100644
--- a/samples/Demo/Beef.Demo.CodeGen/Properties/launchSettings.json
+++ b/samples/Demo/Beef.Demo.CodeGen/Properties/launchSettings.json
@@ -2,7 +2,7 @@
"profiles": {
"Beef.Demo.CodeGen": {
"commandName": "Project",
- "commandLineArgs": "entity"
+ "commandLineArgs": "openapi \"https://raw.githubusercontent.com/bian-official/public/main/release12.0.0/semantic-apis/oas3/yamls/CurrentAccount.yaml\" --param \"include=/CurrentAccount/{currentaccountid}/Retrieve,/CurrentAccount/{currentaccountid}/Update\""
}
}
}
\ No newline at end of file
diff --git a/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj b/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj
index 15989ed5a..543c63af7 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.Common/Entities/Generated/Address.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Address.cs
index fc64e1f61..6308043eb 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Address.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Address.cs
@@ -30,7 +30,7 @@ public partial class Address
}
///
- /// Represents the collection.
+ /// Represents the Address collection.
///
public partial class AddressCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/CommunicationType.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/CommunicationType.cs
index 8fd58a2be..8ae43d87b 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/CommunicationType.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/CommunicationType.cs
@@ -20,7 +20,7 @@ namespace Beef.Demo.Common.Entities
public partial class CommunicationType : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the CommunicationType collection.
///
public partial class CommunicationTypeCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Company.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Company.cs
index 8e0155a2a..53f22735a 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Company.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Company.cs
@@ -26,7 +26,7 @@ public partial class Company : ReferenceDataBase
}
///
- /// Represents the collection.
+ /// Represents the Company collection.
///
public partial class CompanyCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Contact.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Contact.cs
index ad3d684df..a411a5a0a 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Contact.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Contact.cs
@@ -19,7 +19,7 @@ namespace Beef.Demo.Common.Entities
public partial class Contact : IIdentifier
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Contact identifier.
///
public Guid Id { get; set; }
@@ -34,7 +34,7 @@ public partial class Contact : IIdentifier
public string? LastName { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Status text (read-only where selected).
///
public string? StatusDescription { get; set; }
@@ -50,12 +50,12 @@ public partial class Contact : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the Contact collection.
///
public partial class ContactCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the Contact collection result.
///
public class ContactCollectionResult : CollectionResult
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/ContactComm.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/ContactComm.cs
index 80f5a24fe..4da9295c3 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/ContactComm.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/ContactComm.cs
@@ -14,7 +14,7 @@
namespace Beef.Demo.Common.Entities
{
///
- /// Represents the Comm entity.
+ /// Represents the Contact Comm entity.
///
public partial class ContactComm
{
@@ -30,7 +30,7 @@ public partial class ContactComm
}
///
- /// Represents the collection.
+ /// Represents the ContactComm collection.
///
public partial class ContactCommCollection : Dictionary { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Country.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Country.cs
index 10b1c9bb5..3a7e74b5b 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Country.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Country.cs
@@ -20,7 +20,7 @@ namespace Beef.Demo.Common.Entities
public partial class Country : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the Country collection.
///
public partial class CountryCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/EyeColor.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/EyeColor.cs
index 5414dc6fd..f737391a5 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/EyeColor.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/EyeColor.cs
@@ -20,7 +20,7 @@ namespace Beef.Demo.Common.Entities
public partial class EyeColor : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the EyeColor collection.
///
public partial class EyeColorCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Gender.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Gender.cs
index e9a73e09e..23502b658 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Gender.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Gender.cs
@@ -37,7 +37,7 @@ public partial class Gender : ReferenceDataBase
}
///
- /// Represents the collection.
+ /// Represents the Gender collection.
///
public partial class GenderCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Person.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Person.cs
index a8864635f..85a48bcf2 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Person.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Person.cs
@@ -19,7 +19,7 @@ namespace Beef.Demo.Common.Entities
public partial class Person : IIdentifier, IETag, IChangeLog
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Person identifier.
///
[System.Xml.Serialization.XmlElement("Id")]
public Guid Id { get; set; }
@@ -40,7 +40,7 @@ public partial class Person : IIdentifier, IETag, IChangeLog
public string? UniqueCode { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Gender text (read-only where selected).
///
public string? GenderText { get; set; }
@@ -50,7 +50,7 @@ public partial class Person : IIdentifier, IETag, IChangeLog
public string? Gender { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding EyeColor text (read-only where selected).
///
public string? EyeColorText { get; set; }
@@ -87,12 +87,12 @@ public partial class Person : IIdentifier, IETag, IChangeLog
}
///
- /// Represents the collection.
+ /// Represents the Person collection.
///
public partial class PersonCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the Person collection result.
///
public class PersonCollectionResult : CollectionResult
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonArgs.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonArgs.cs
index c442bba50..c68287e84 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonArgs.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonArgs.cs
@@ -14,7 +14,7 @@
namespace Beef.Demo.Common.Entities
{
///
- /// Represents the arguments entity.
+ /// Represents the Person arguments entity.
///
public partial class PersonArgs
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonDetail.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonDetail.cs
index 530dd14ab..b369ce766 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonDetail.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonDetail.cs
@@ -14,7 +14,7 @@
namespace Beef.Demo.Common.Entities
{
///
- /// Represents the detail entity.
+ /// Represents the Person detail entity.
///
public partial class PersonDetail : Person
{
@@ -25,12 +25,12 @@ public partial class PersonDetail : Person
}
///
- /// Represents the collection.
+ /// Represents the PersonDetail collection.
///
public partial class PersonDetailCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the PersonDetail collection result.
///
public class PersonDetailCollectionResult : CollectionResult
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonOther.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonOther.cs
index da7c119fa..d1923055e 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonOther.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PersonOther.cs
@@ -14,12 +14,12 @@
namespace Beef.Demo.Common.Entities
{
///
- /// Represents the other without capabilities entity.
+ /// Represents the other Person without EntityBase capabilities entity.
///
public partial class PersonOther : IIdentifier, IETag, IChangeLog
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Person identifier.
///
public Guid Id { get; set; }
@@ -46,7 +46,7 @@ public partial class PersonOther : IIdentifier, IETag, IChangeLog
}
///
- /// Represents the collection.
+ /// Represents the PersonOther collection.
///
public partial class PersonOtherCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PlaceInfo.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PlaceInfo.cs
index 9ac311439..f2406e39d 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PlaceInfo.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PlaceInfo.cs
@@ -30,7 +30,7 @@ public partial class PlaceInfo
}
///
- /// Represents the collection.
+ /// Represents the PlaceInfo collection.
///
public partial class PlaceInfoCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PostalInfo.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PostalInfo.cs
index 23fe9df04..97db3849e 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PostalInfo.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PostalInfo.cs
@@ -19,7 +19,7 @@ namespace Beef.Demo.Common.Entities
public partial class PostalInfo
{
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Country text (read-only where selected).
///
public string? CountryText { get; set; }
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/PowerSource.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/PowerSource.cs
index 950585460..74ba69255 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/PowerSource.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/PowerSource.cs
@@ -26,7 +26,7 @@ public partial class PowerSource : ReferenceDataBase
}
///
- /// Represents the collection.
+ /// Represents the PowerSource collection.
///
public partial class PowerSourceCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/ProductArgs.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/ProductArgs.cs
index 4453a6c1c..968698e7d 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/ProductArgs.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/ProductArgs.cs
@@ -14,7 +14,7 @@
namespace Beef.Demo.Common.Entities
{
///
- /// The arguments.
+ /// The Product arguments.
///
public partial class ProductArgs
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Robot.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Robot.cs
index fe96131d3..deeb9cd72 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Robot.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Robot.cs
@@ -19,7 +19,7 @@ namespace Beef.Demo.Common.Entities
public partial class Robot : IIdentifier, IETag, IChangeLog
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Robot identifier.
///
public Guid Id { get; set; }
@@ -34,7 +34,7 @@ public partial class Robot : IIdentifier, IETag, IChangeLog
public string? SerialNo { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding EyeColor text (read-only where selected).
///
public string? EyeColorText { get; set; }
@@ -44,7 +44,7 @@ public partial class Robot : IIdentifier, IETag, IChangeLog
public string? EyeColor { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding PowerSource text (read-only where selected).
///
public string? PowerSourceText { get; set; }
@@ -66,12 +66,12 @@ public partial class Robot : IIdentifier, IETag, IChangeLog
}
///
- /// Represents the collection.
+ /// Represents the Robot collection.
///
public partial class RobotCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the Robot collection result.
///
public class RobotCollectionResult : CollectionResult
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/RobotArgs.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/RobotArgs.cs
index 43d789fa5..bfe4e0f3d 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/RobotArgs.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/RobotArgs.cs
@@ -14,7 +14,7 @@
namespace Beef.Demo.Common.Entities
{
///
- /// Represents the arguments entity.
+ /// Represents the Robot arguments entity.
///
public partial class RobotArgs
{
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/Status.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/Status.cs
index b15d72d9d..76aab6075 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/Status.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/Status.cs
@@ -20,7 +20,7 @@ namespace Beef.Demo.Common.Entities
public partial class Status : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the Status collection.
///
public partial class StatusCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/USState.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/USState.cs
index 1676a3971..1d0d270b1 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/USState.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/USState.cs
@@ -20,7 +20,7 @@ namespace Beef.Demo.Common.Entities
public partial class USState : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the USState collection.
///
public partial class USStateCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Common/Entities/Generated/WorkHistory.cs b/samples/Demo/Beef.Demo.Common/Entities/Generated/WorkHistory.cs
index 28dc5f7f6..b17408c69 100644
--- a/samples/Demo/Beef.Demo.Common/Entities/Generated/WorkHistory.cs
+++ b/samples/Demo/Beef.Demo.Common/Entities/Generated/WorkHistory.cs
@@ -19,7 +19,7 @@ namespace Beef.Demo.Common.Entities
public partial class WorkHistory : IPrimaryKey
{
///
- /// Gets or sets the identifier (not serialized/read-only for internal data merging).
+ /// Gets or sets the Person identifier (not serialized/read-only for internal data merging).
///
[JsonIgnore]
public Guid PersonId { get; set; }
@@ -55,7 +55,7 @@ public partial class WorkHistory : IPrimaryKey
}
///
- /// Represents the collection.
+ /// Represents the WorkHistory collection.
///
public partial class WorkHistoryCollection : List { }
}
diff --git a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj
index 6c5390895..4611529c7 100644
--- a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj
+++ b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj
@@ -52,7 +52,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/samples/My.Hr/My.Hr.Api/Controllers/Generated/EmployeeController.cs b/samples/My.Hr/My.Hr.Api/Controllers/Generated/EmployeeController.cs
index d134d97b9..29c73f366 100644
--- a/samples/My.Hr/My.Hr.Api/Controllers/Generated/EmployeeController.cs
+++ b/samples/My.Hr/My.Hr.Api/Controllers/Generated/EmployeeController.cs
@@ -25,10 +25,10 @@ public EmployeeController(WebApi webApi, IEmployeeManager manager)
partial void EmployeeControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified Employee.
///
- /// The identifier.
- /// The selected where found.
+ /// The Employee identifier.
+ /// The selected Employee where found.
[HttpGet("employees/{id}", Name="Employee_Get")]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -36,9 +36,9 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Creates a new .
+ /// Creates a new Employee.
///
- /// The created .
+ /// The created Employee.
[HttpPost("employees", Name="Employee_Create")]
[AcceptsBody(typeof(Common.Entities.Employee))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.Created)]
@@ -46,10 +46,10 @@ public Task Create()
=> _webApi.PostWithResultAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/employees/{r.Id}", UriKind.Relative));
///
- /// Updates an existing .
+ /// Updates an existing Employee.
///
- /// The identifier.
- /// The updated .
+ /// The Employee identifier.
+ /// The updated Employee.
[HttpPut("employees/{id}", Name="Employee_Update")]
[AcceptsBody(typeof(Common.Entities.Employee))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
@@ -58,10 +58,10 @@ public Task Update(Guid id)
=> _webApi.PutWithResultAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing Employee.
///
- /// The identifier.
- /// The patched .
+ /// The Employee identifier.
+ /// The patched Employee.
[HttpPatch("employees/{id}", Name="Employee_Patch")]
[AcceptsBody(typeof(Common.Entities.Employee), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
@@ -70,24 +70,24 @@ public Task Patch(Guid id)
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified Employee.
///
- /// The identifier.
+ /// The Employee identifier.
[HttpDelete("employees/{id}", Name="Employee_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
=> _webApi.DeleteWithResultAsync(Request, p => _manager.DeleteAsync(id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the EmployeeBase array that contains the items that match the selection criteria.
///
/// The First Name.
/// The Last Name.
- /// The Genders (see ).
+ /// The Genders.
/// The Start From.
/// The Start To.
/// Indicates whether Is Include Terminated.
- /// The
+ /// The EmployeeBase array
[HttpGet("employees", Name="Employee_GetByArgs")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.EmployeeBaseCollection), (int)HttpStatusCode.OK)]
@@ -99,10 +99,10 @@ public Task GetByArgs(string? firstName = default, string? lastNa
}
///
- /// Terminates an existing .
+ /// Terminates an existing Employee.
///
- /// The identifier.
- /// The updated .
+ /// The Employee identifier.
+ /// The updated Employee.
[HttpPost("employees/{id}/terminate", Name="Employee_Terminate")]
[AcceptsBody(typeof(Common.Entities.TerminationDetail))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
diff --git a/samples/My.Hr/My.Hr.Api/Controllers/Generated/PerformanceReviewController.cs b/samples/My.Hr/My.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
index 9f95871a9..5b843b49c 100644
--- a/samples/My.Hr/My.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
+++ b/samples/My.Hr/My.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
@@ -25,10 +25,10 @@ public PerformanceReviewController(WebApi webApi, IPerformanceReviewManager mana
partial void PerformanceReviewControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified PerformanceReview.
///
- /// The identifier.
- /// The selected where found.
+ /// The Employee identifier.
+ /// The selected PerformanceReview where found.
[HttpGet("reviews/{id}", Name="PerformanceReview_Get")]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -36,10 +36,10 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the PerformanceReview array that contains the items that match the selection criteria.
///
- /// The .
- /// The
+ /// The Employee.Id.
+ /// The PerformanceReview array
[HttpGet("employees/{employeeId}/reviews", Name="PerformanceReview_GetByEmployeeId")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.PerformanceReviewCollection), (int)HttpStatusCode.OK)]
@@ -48,10 +48,10 @@ public Task GetByEmployeeId(Guid employeeId)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetByEmployeeIdAsync(employeeId, p.RequestOptions.Paging), alternateStatusCode: HttpStatusCode.NoContent);
///
- /// Creates a new .
+ /// Creates a new PerformanceReview.
///
- /// The .
- /// The created .
+ /// The Employee.Id.
+ /// The created PerformanceReview.
[HttpPost("employees/{employeeId}/reviews", Name="PerformanceReview_Create")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview))]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.Created)]
@@ -59,10 +59,10 @@ public Task Create(Guid employeeId)
=> _webApi.PostWithResultAsync(Request, p => _manager.CreateAsync(p.Value!, employeeId), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/reviews/{r.Id}", UriKind.Relative));
///
- /// Updates an existing .
+ /// Updates an existing PerformanceReview.
///
- /// The identifier.
- /// The updated .
+ /// The Employee identifier.
+ /// The updated PerformanceReview.
[HttpPut("reviews/{id}", Name="PerformanceReview_Update")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview))]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
@@ -71,10 +71,10 @@ public Task Update(Guid id)
=> _webApi.PutWithResultAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing PerformanceReview.
///
- /// The identifier.
- /// The patched .
+ /// The Employee identifier.
+ /// The patched PerformanceReview.
[HttpPatch("reviews/{id}", Name="PerformanceReview_Patch")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
@@ -83,9 +83,9 @@ public Task Patch(Guid id)
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified PerformanceReview.
///
- /// The identifier.
+ /// The Employee identifier.
[HttpDelete("reviews/{id}", Name="PerformanceReview_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
diff --git a/samples/My.Hr/My.Hr.Api/Controllers/Generated/ReferenceDataController.cs b/samples/My.Hr/My.Hr.Api/Controllers/Generated/ReferenceDataController.cs
index 5d63a3346..2321205a2 100644
--- a/samples/My.Hr/My.Hr.Api/Controllers/Generated/ReferenceDataController.cs
+++ b/samples/My.Hr/My.Hr.Api/Controllers/Generated/ReferenceDataController.cs
@@ -25,55 +25,55 @@ public ReferenceDataController(ReferenceDataContentWebApi webApi, ReferenceDataO
{ _webApi = webApi.ThrowIfNull(); _orchestrator = orchestrator.ThrowIfNull(); }
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Gender' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Gender collection.
+ /// The 'Gender' array.
[HttpGet("ref/genders", Name="ReferenceData_GenderGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task GenderGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'TerminationReason' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.TerminationReason collection.
+ /// The 'TerminationReason' array.
[HttpGet("ref/terminationReasons", Name="ReferenceData_TerminationReasonGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task TerminationReasonGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'RelationshipType' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.RelationshipType collection.
+ /// The 'RelationshipType' array.
[HttpGet("ref/relationshipTypes", Name="ReferenceData_RelationshipTypeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task RelationshipTypeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'USState' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.USState collection.
+ /// The 'USState' array.
[HttpGet("ref/usStates", Name="ReferenceData_USStateGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task USStateGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'PerformanceOutcome' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.PerformanceOutcome collection.
+ /// The 'PerformanceOutcome' array.
[HttpGet("ref/performanceOutcomes", Name="ReferenceData_PerformanceOutcomeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task PerformanceOutcomeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
@@ -82,7 +82,7 @@ public Task PerformanceOutcomeGetAll([FromQuery] IEnumerable
/// Gets the reference data entries for the specified entities and codes from the query string; e.g: ref?entity=codeX,codeY&entity2=codeZ&entity3
///
- /// A .
+ /// The 'ReferenceDataMultiDictionary'.
[HttpGet("ref", Name="ReferenceData_GetNamed")]
[ProducesResponseType(typeof(CoreEx.RefData.ReferenceDataMultiDictionary), (int)HttpStatusCode.OK)]
public Task GetNamed() => _webApi.GetAsync(Request, p => _orchestrator.GetNamedAsync(p.RequestOptions));
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 a9eebd395..b175e56a5 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/Generated/ReferenceDataProvider.cs b/samples/My.Hr/My.Hr.Business/Generated/ReferenceDataProvider.cs
index 89ba024a3..c269e7d2f 100644
--- a/samples/My.Hr/My.Hr.Business/Generated/ReferenceDataProvider.cs
+++ b/samples/My.Hr/My.Hr.Business/Generated/ReferenceDataProvider.cs
@@ -20,14 +20,14 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
partial void ReferenceDataProviderCtor(); // Enables the ReferenceDataProvider constructor to be extended.
///
- public Type[] Types => new Type[]
- {
+ public Type[] Types =>
+ [
typeof(RefDataNamespace.Gender),
typeof(RefDataNamespace.TerminationReason),
typeof(RefDataNamespace.RelationshipType),
typeof(RefDataNamespace.USState),
typeof(RefDataNamespace.PerformanceOutcome)
- };
+ ];
///
public Task> GetAsync(Type type, CancellationToken cancellationToken = default) => _dataService.GetAsync(type);
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 711dc4a3e..106d8b33f 100644
--- a/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj
+++ b/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj
@@ -6,10 +6,10 @@
latest
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/Address.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/Address.cs
index 5ed80c08e..dff848ba6 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/Address.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/Address.cs
@@ -31,7 +31,7 @@ public partial class Address
public string? City { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding State text (read-only where selected).
///
public string? StateText { get; set; }
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmergencyContact.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmergencyContact.cs
index 13fe31c1e..65469dfa0 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmergencyContact.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmergencyContact.cs
@@ -36,7 +36,7 @@ public partial class EmergencyContact : IIdentifier
public string? PhoneNo { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Relationship text (read-only where selected).
///
public string? RelationshipText { get; set; }
@@ -47,7 +47,7 @@ public partial class EmergencyContact : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the EmergencyContact collection.
///
public partial class EmergencyContactCollection : List { }
}
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeArgs.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeArgs.cs
index 53697695d..63ba17012 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeArgs.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeArgs.cs
@@ -11,7 +11,7 @@
namespace My.Hr.Common.Entities
{
///
- /// Represents the search arguments entity.
+ /// Represents the Employee search arguments entity.
///
public partial class EmployeeArgs
{
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeBase.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeBase.cs
index c050274b8..3ff8df7b6 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeBase.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/EmployeeBase.cs
@@ -11,17 +11,17 @@
namespace My.Hr.Common.Entities
{
///
- /// Represents the base entity.
+ /// Represents the Employee base entity.
///
public partial class EmployeeBase : IIdentifier
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Employee identifier.
///
public Guid Id { get; set; }
///
- /// Gets or sets the Unique Email.
+ /// Gets or sets the Unique Employee Email.
///
public string? Email { get; set; }
@@ -36,7 +36,7 @@ public partial class EmployeeBase : IIdentifier
public string? LastName { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Gender text (read-only where selected).
///
public string? GenderText { get; set; }
@@ -67,12 +67,12 @@ public partial class EmployeeBase : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the EmployeeBase collection.
///
public partial class EmployeeBaseCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the EmployeeBase collection result.
///
public class EmployeeBaseCollectionResult : CollectionResult
{
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/Gender.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/Gender.cs
index 49f1417fa..5bd562787 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/Gender.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/Gender.cs
@@ -17,7 +17,7 @@ namespace My.Hr.Common.Entities
public partial class Gender : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the Gender collection.
///
public partial class GenderCollection : List { }
}
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceOutcome.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceOutcome.cs
index 962aba538..e1c1261d4 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceOutcome.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceOutcome.cs
@@ -17,7 +17,7 @@ namespace My.Hr.Common.Entities
public partial class PerformanceOutcome : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the PerformanceOutcome collection.
///
public partial class PerformanceOutcomeCollection : List { }
}
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceReview.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceReview.cs
index 32c6f60b8..77615746b 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceReview.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/PerformanceReview.cs
@@ -16,12 +16,12 @@ namespace My.Hr.Common.Entities
public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Employee identifier.
///
public Guid Id { get; set; }
///
- /// Gets or sets the (value is immutable).
+ /// Gets or sets the Employee.Id (value is immutable).
///
public Guid EmployeeId { get; set; }
@@ -31,7 +31,7 @@ public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
public DateTime Date { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Outcome text (read-only where selected).
///
public string? OutcomeText { get; set; }
@@ -63,12 +63,12 @@ public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
}
///
- /// Represents the collection.
+ /// Represents the PerformanceReview collection.
///
public partial class PerformanceReviewCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the PerformanceReview collection result.
///
public class PerformanceReviewCollectionResult : CollectionResult
{
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/RelationshipType.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/RelationshipType.cs
index dea568604..266d0a04d 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/RelationshipType.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/RelationshipType.cs
@@ -17,7 +17,7 @@ namespace My.Hr.Common.Entities
public partial class RelationshipType : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the RelationshipType collection.
///
public partial class RelationshipTypeCollection : List { }
}
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationDetail.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationDetail.cs
index c5ccc4e3b..76c13b4be 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationDetail.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationDetail.cs
@@ -21,7 +21,7 @@ public partial class TerminationDetail
public DateTime Date { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Reason text (read-only where selected).
///
public string? ReasonText { get; set; }
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationReason.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationReason.cs
index 12f8a217f..ab0740cff 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationReason.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/TerminationReason.cs
@@ -17,7 +17,7 @@ namespace My.Hr.Common.Entities
public partial class TerminationReason : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the TerminationReason collection.
///
public partial class TerminationReasonCollection : List { }
}
\ No newline at end of file
diff --git a/samples/My.Hr/My.Hr.Common/Entities/Generated/USState.cs b/samples/My.Hr/My.Hr.Common/Entities/Generated/USState.cs
index 3744ce868..81d827b89 100644
--- a/samples/My.Hr/My.Hr.Common/Entities/Generated/USState.cs
+++ b/samples/My.Hr/My.Hr.Common/Entities/Generated/USState.cs
@@ -17,7 +17,7 @@ namespace My.Hr.Common.Entities
public partial class USState : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the USState collection.
///
public partial class USStateCollection : List { }
}
\ No newline at end of file
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 308f6d977..68500b5d3 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/My.Hr.Test.csproj b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj
index 051764875..bfce4ba78 100644
--- a/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj
+++ b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj
@@ -32,7 +32,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -42,7 +42,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/EmployeeController.cs b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/EmployeeController.cs
index abbf62608..721e627ce 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/EmployeeController.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/EmployeeController.cs
@@ -25,10 +25,10 @@ public EmployeeController(WebApi webApi, IEmployeeManager manager)
partial void EmployeeControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified Employee.
///
- /// The identifier.
- /// The selected where found.
+ /// The Employee identifier.
+ /// The selected Employee where found.
[HttpGet("employees/{id}", Name="Employee_Get")]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -36,9 +36,9 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Creates a new .
+ /// Creates a new Employee.
///
- /// The created .
+ /// The created Employee.
[HttpPost("employees", Name="Employee_Create")]
[AcceptsBody(typeof(Common.Entities.Employee))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.Created)]
@@ -46,10 +46,10 @@ public Task Create()
=> _webApi.PostWithResultAsync(Request, p => _manager.CreateAsync(p.Value!), statusCode: HttpStatusCode.Created, locationUri: r => new Uri($"/employees/{r.Id}", UriKind.Relative));
///
- /// Updates an existing .
+ /// Updates an existing Employee.
///
- /// The identifier.
- /// The updated .
+ /// The Employee identifier.
+ /// The updated Employee.
[HttpPut("employees/{id}", Name="Employee_Update")]
[AcceptsBody(typeof(Common.Entities.Employee))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
@@ -58,10 +58,10 @@ public Task Update(Guid id)
=> _webApi.PutWithResultAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing Employee.
///
- /// The identifier.
- /// The patched .
+ /// The Employee identifier.
+ /// The patched Employee.
[HttpPatch("employees/{id}", Name="Employee_Patch")]
[AcceptsBody(typeof(Common.Entities.Employee), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
@@ -70,24 +70,24 @@ public Task Patch(Guid id)
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified Employee.
///
- /// The identifier.
+ /// The Employee identifier.
[HttpDelete("employees/{id}", Name="Employee_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
=> _webApi.DeleteWithResultAsync(Request, p => _manager.DeleteAsync(id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the EmployeeBase array that contains the items that match the selection criteria.
///
/// The First Name.
/// The Last Name.
- /// The Genders (see ).
+ /// The Genders.
/// The Start From.
/// The Start To.
/// Indicates whether Is Include Terminated.
- /// The
+ /// The EmployeeBase array
[HttpGet("employees", Name="Employee_GetByArgs")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.EmployeeBaseCollection), (int)HttpStatusCode.OK)]
@@ -99,10 +99,10 @@ public Task GetByArgs(string? firstName = default, string? lastNa
}
///
- /// Terminates an existing .
+ /// Terminates an existing Employee.
///
- /// The identifier.
- /// The updated .
+ /// The Employee identifier.
+ /// The updated Employee.
[HttpPost("employees/{id}/terminate", Name="Employee_Terminate")]
[AcceptsBody(typeof(Common.Entities.TerminationDetail))]
[ProducesResponseType(typeof(Common.Entities.Employee), (int)HttpStatusCode.OK)]
diff --git a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/PerformanceReviewController.cs b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
index 42d633480..5ae90f913 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/PerformanceReviewController.cs
@@ -25,10 +25,10 @@ public PerformanceReviewController(WebApi webApi, IPerformanceReviewManager mana
partial void PerformanceReviewControllerCtor(); // Enables additional functionality to be added to the constructor.
///
- /// Gets the specified .
+ /// Gets the specified PerformanceReview.
///
- /// The identifier.
- /// The selected where found.
+ /// The PerformanceReview identifier.
+ /// The selected PerformanceReview where found.
[HttpGet("reviews/{id}", Name="PerformanceReview_Get")]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
@@ -36,10 +36,10 @@ public Task Get(Guid id)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetAsync(id));
///
- /// Updates an existing .
+ /// Updates an existing PerformanceReview.
///
- /// The identifier.
- /// The updated .
+ /// The PerformanceReview identifier.
+ /// The updated PerformanceReview.
[HttpPut("reviews/{id}", Name="PerformanceReview_Update")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview))]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
@@ -48,10 +48,10 @@ public Task Update(Guid id)
=> _webApi.PutWithResultAsync(Request, p => _manager.UpdateAsync(p.Value!, id));
///
- /// Patches an existing .
+ /// Patches an existing PerformanceReview.
///
- /// The identifier.
- /// The patched .
+ /// The PerformanceReview identifier.
+ /// The patched PerformanceReview.
[HttpPatch("reviews/{id}", Name="PerformanceReview_Patch")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview), HttpConsts.MergePatchMediaTypeName)]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.OK)]
@@ -60,19 +60,19 @@ public Task Patch(Guid id)
=> _webApi.PatchWithResultAsync(Request, get: _ => _manager.GetAsync(id), put: p => _manager.UpdateAsync(p.Value!, id));
///
- /// Deletes the specified .
+ /// Deletes the specified PerformanceReview.
///
- /// The identifier.
+ /// The PerformanceReview identifier.
[HttpDelete("reviews/{id}", Name="PerformanceReview_Delete")]
[ProducesResponseType((int)HttpStatusCode.NoContent)]
public Task Delete(Guid id)
=> _webApi.DeleteWithResultAsync(Request, p => _manager.DeleteAsync(id));
///
- /// Gets the that contains the items that match the selection criteria.
+ /// Gets the PerformanceReview array that contains the items that match the selection criteria.
///
- /// The identifier.
- /// The
+ /// The Employee identifier.
+ /// The PerformanceReview array
[HttpGet("employees/{employeeId}/reviews", Name="PerformanceReview_GetByEmployeeId")]
[Paging]
[ProducesResponseType(typeof(Common.Entities.PerformanceReviewCollection), (int)HttpStatusCode.OK)]
@@ -81,10 +81,10 @@ public Task GetByEmployeeId(Guid employeeId)
=> _webApi.GetWithResultAsync(Request, p => _manager.GetByEmployeeIdAsync(employeeId, p.RequestOptions.Paging), alternateStatusCode: HttpStatusCode.NoContent);
///
- /// Creates a new .
+ /// Creates a new PerformanceReview.
///
- /// The identifier.
- /// The created .
+ /// The Employee identifier.
+ /// The created PerformanceReview.
[HttpPost("employees/{employeeId}/reviews", Name="PerformanceReview_Create")]
[AcceptsBody(typeof(Common.Entities.PerformanceReview))]
[ProducesResponseType(typeof(Common.Entities.PerformanceReview), (int)HttpStatusCode.Created)]
diff --git a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/ReferenceDataController.cs b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/ReferenceDataController.cs
index 80f0c45fd..6b8d8d23d 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/ReferenceDataController.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Api/Controllers/Generated/ReferenceDataController.cs
@@ -25,55 +25,55 @@ public ReferenceDataController(ReferenceDataContentWebApi webApi, ReferenceDataO
{ _webApi = webApi.ThrowIfNull(); _orchestrator = orchestrator.ThrowIfNull(); }
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'Gender' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.Gender collection.
+ /// The 'Gender' array.
[HttpGet("ref/genders", Name="ReferenceData_GenderGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task GenderGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'TerminationReason' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.TerminationReason collection.
+ /// The 'TerminationReason' array.
[HttpGet("ref/terminationreasons", Name="ReferenceData_TerminationReasonGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task TerminationReasonGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'RelationshipType' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.RelationshipType collection.
+ /// The 'RelationshipType' array.
[HttpGet("ref/relationshiptypes", Name="ReferenceData_RelationshipTypeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task RelationshipTypeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'USState' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.USState collection.
+ /// The 'USState' array.
[HttpGet("ref/usstates", Name="ReferenceData_USStateGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task USStateGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
=> _webApi.GetAsync(Request, p => _orchestrator.GetWithFilterAsync(codes, text, p.RequestOptions.IncludeInactive));
///
- /// Gets all of the reference data items that match the specified criteria.
+ /// Gets all of the 'PerformanceOutcome' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A RefDataNamespace.PerformanceOutcome collection.
+ /// The 'PerformanceOutcome' array.
[HttpGet("ref/performanceoutcomes", Name="ReferenceData_PerformanceOutcomeGetAll")]
[ProducesResponseType(typeof(IEnumerable), (int)HttpStatusCode.OK)]
public Task PerformanceOutcomeGetAll([FromQuery] IEnumerable? codes = default, string? text = default)
@@ -82,7 +82,7 @@ public Task PerformanceOutcomeGetAll([FromQuery] IEnumerable
/// Gets the reference data entries for the specified entities and codes from the query string; e.g: ref?entity=codeX,codeY&entity2=codeZ&entity3
///
- /// A .
+ /// The 'ReferenceDataMultiDictionary'.
[HttpGet("ref", Name="ReferenceData_GetNamed")]
[ProducesResponseType(typeof(CoreEx.RefData.ReferenceDataMultiDictionary), (int)HttpStatusCode.OK)]
public Task GetNamed() => _webApi.GetAsync(Request, p => _orchestrator.GetNamedAsync(p.RequestOptions));
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 706550276..4631e03fc 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.Api/Startup.cs b/samples/MyEf.Hr/MyEf.Hr.Api/Startup.cs
index 07d80245a..1aa37d740 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Api/Startup.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Api/Startup.cs
@@ -96,6 +96,11 @@ public void ConfigureServices(IServiceCollection services)
if (File.Exists(xmlFile))
options.IncludeXmlComments(xmlFile);
+ xmlName = $"{Assembly.GetEntryAssembly()!.GetName().Name}.xml".Replace(".Api", ".Common");
+ xmlFile = Path.Combine(AppContext.BaseDirectory, xmlName);
+ if (File.Exists(xmlFile))
+ options.IncludeXmlComments(xmlFile);
+
options.OperationFilter(); // Needed to support AcceptsBodyAttribute where body parameter not explicitly defined.
options.OperationFilter(); // Needed to support PagingAttribute where PagingArgs parameter not explicitly defined.
});
diff --git a/samples/MyEf.Hr/MyEf.Hr.Business/Generated/ReferenceDataProvider.cs b/samples/MyEf.Hr/MyEf.Hr.Business/Generated/ReferenceDataProvider.cs
index c62aa3dc5..d0cdfc0a7 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Business/Generated/ReferenceDataProvider.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Business/Generated/ReferenceDataProvider.cs
@@ -20,14 +20,14 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
partial void ReferenceDataProviderCtor(); // Enables the ReferenceDataProvider constructor to be extended.
///
- public Type[] Types => new Type[]
- {
+ public Type[] Types =>
+ [
typeof(RefDataNamespace.Gender),
typeof(RefDataNamespace.TerminationReason),
typeof(RefDataNamespace.RelationshipType),
typeof(RefDataNamespace.USState),
typeof(RefDataNamespace.PerformanceOutcome)
- };
+ ];
///
public Task> GetAsync(Type type, CancellationToken cancellationToken = default) => _dataService.GetAsync(type);
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 9ec88db8f..67636d3fa 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj
+++ b/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj
@@ -6,11 +6,11 @@
latest
-
-
-
-
-
+
+
+
+
+
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Address.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Address.cs
index 9ce13bd20..b6186cddf 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Address.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Address.cs
@@ -31,7 +31,7 @@ public partial class Address
public string? City { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding State text (read-only where selected).
///
public string? StateText { get; set; }
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmergencyContact.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmergencyContact.cs
index 4b443dc94..d6b620c08 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmergencyContact.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmergencyContact.cs
@@ -36,7 +36,7 @@ public partial class EmergencyContact : IIdentifier
public string? PhoneNo { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Relationship text (read-only where selected).
///
public string? RelationshipText { get; set; }
@@ -47,7 +47,7 @@ public partial class EmergencyContact : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the EmergencyContact collection.
///
public partial class EmergencyContactCollection : List { }
}
\ No newline at end of file
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeArgs.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeArgs.cs
index c3433d5a1..ee89fa0bb 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeArgs.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeArgs.cs
@@ -11,7 +11,7 @@
namespace MyEf.Hr.Common.Entities
{
///
- /// Represents the Arguments entity.
+ /// Represents the Employee Arguments entity.
///
public partial class EmployeeArgs
{
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeBase.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeBase.cs
index fc121eb15..ff939d26e 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeBase.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/EmployeeBase.cs
@@ -11,17 +11,17 @@
namespace MyEf.Hr.Common.Entities
{
///
- /// Represents the base entity.
+ /// Represents the Employee base entity.
///
public partial class EmployeeBase : IIdentifier
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the Employee identifier.
///
public Guid Id { get; set; }
///
- /// Gets or sets the Unique Email.
+ /// Gets or sets the Unique Employee Email.
///
public string? Email { get; set; }
@@ -36,7 +36,7 @@ public partial class EmployeeBase : IIdentifier
public string? LastName { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Gender text (read-only where selected).
///
public string? GenderText { get; set; }
@@ -67,12 +67,12 @@ public partial class EmployeeBase : IIdentifier
}
///
- /// Represents the collection.
+ /// Represents the EmployeeBase collection.
///
public partial class EmployeeBaseCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the EmployeeBase collection result.
///
public class EmployeeBaseCollectionResult : CollectionResult
{
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Gender.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Gender.cs
index 9d112cdb4..d0f45420a 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Gender.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/Gender.cs
@@ -17,7 +17,7 @@ namespace MyEf.Hr.Common.Entities
public partial class Gender : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the Gender collection.
///
public partial class GenderCollection : List { }
}
\ No newline at end of file
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceOutcome.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceOutcome.cs
index 3e256701e..3f4be7b15 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceOutcome.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceOutcome.cs
@@ -17,7 +17,7 @@ namespace MyEf.Hr.Common.Entities
public partial class PerformanceOutcome : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the PerformanceOutcome collection.
///
public partial class PerformanceOutcomeCollection : List { }
}
\ No newline at end of file
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceReview.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceReview.cs
index 015cc8fe3..925ae5574 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceReview.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/PerformanceReview.cs
@@ -16,12 +16,12 @@ namespace MyEf.Hr.Common.Entities
public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
{
///
- /// Gets or sets the identifier.
+ /// Gets or sets the PerformanceReview identifier.
///
public Guid Id { get; set; }
///
- /// Gets or sets the (value is immutable).
+ /// Gets or sets the Employee.Id (value is immutable).
///
public Guid EmployeeId { get; set; }
@@ -31,7 +31,7 @@ public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
public DateTime Date { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Outcome text (read-only where selected).
///
public string? OutcomeText { get; set; }
@@ -63,12 +63,12 @@ public partial class PerformanceReview : IIdentifier, IETag, IChangeLog
}
///
- /// Represents the collection.
+ /// Represents the PerformanceReview collection.
///
public partial class PerformanceReviewCollection : List { }
///
- /// Represents the collection result.
+ /// Represents the PerformanceReview collection result.
///
public class PerformanceReviewCollectionResult : CollectionResult
{
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/RelationshipType.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/RelationshipType.cs
index e09ddd024..203a0e225 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/RelationshipType.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/RelationshipType.cs
@@ -17,7 +17,7 @@ namespace MyEf.Hr.Common.Entities
public partial class RelationshipType : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the RelationshipType collection.
///
public partial class RelationshipTypeCollection : List { }
}
\ No newline at end of file
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationDetail.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationDetail.cs
index e2cbd313d..712ba3c7d 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationDetail.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationDetail.cs
@@ -21,7 +21,7 @@ public partial class TerminationDetail
public DateTime Date { get; set; }
///
- /// Gets the corresponding text (read-only where selected).
+ /// Gets the corresponding Reason text (read-only where selected).
///
public string? ReasonText { get; set; }
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationReason.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationReason.cs
index 1a4230196..5673b7a42 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationReason.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/TerminationReason.cs
@@ -17,7 +17,7 @@ namespace MyEf.Hr.Common.Entities
public partial class TerminationReason : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the TerminationReason collection.
///
public partial class TerminationReasonCollection : List { }
}
\ No newline at end of file
diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/USState.cs b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/USState.cs
index 1254c57c3..977e77989 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/USState.cs
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/Entities/Generated/USState.cs
@@ -17,7 +17,7 @@ namespace MyEf.Hr.Common.Entities
public partial class USState : ReferenceDataBase { }
///
- /// Represents the collection.
+ /// Represents the USState collection.
///
public partial class USStateCollection : List { }
}
\ No newline at end of file
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 308f6d977..7ef1735a5 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj
+++ b/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj
@@ -2,8 +2,9 @@
netstandard2.1
enable
+ True
-
+
\ 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 844840230..c95cf3c7a 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
@@ -15,14 +15,14 @@
-
-
+
+
-
+
-
+
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 188a1a48a..6bf3a537b 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
@@ -27,7 +27,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
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 33bfff765..caa5f1eb3 100644
--- a/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj
+++ b/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj
@@ -32,7 +32,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -42,7 +42,7 @@
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 d9a30bbef..d7d6d3252 100644
--- a/templates/Beef.Template.Solution/content/.template.config/template.json
+++ b/templates/Beef.Template.Solution/content/.template.config/template.json
@@ -85,7 +85,7 @@
"type": "generated",
"generator": "constant",
"parameters": {
- "value": "3.21.0"
+ "value": "3.21.1"
},
"replaces": "CoreExVersion"
},
@@ -93,7 +93,7 @@
"type": "generated",
"generator": "constant",
"parameters": {
- "value": "5.12.9"
+ "value": "5.13.0"
},
"replaces": "BeefVersion"
},
@@ -192,7 +192,7 @@
},
{
"condition": "(!implement_cosmos)",
- "exclude": [ "Company.AppName.Business/Data/CosmosDb.cs", "Company.AppName.Test/Cosmos/**/*", "Company.AppName.CodeGen/datamodel.beef-5.yaml" ]
+ "exclude": [ "Company.AppName.Business/Data/AppNameCosmosDb.cs", "Company.AppName.Test/Cosmos/**/*", "Company.AppName.CodeGen/datamodel.beef-5.yaml" ]
},
{
"condition": "(!implement_httpagent)",
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Api/Company.AppName.Api.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Api/Company.AppName.Api.csproj
index 97cf61c54..ce7a7e49a 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Api/Company.AppName.Api.csproj
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Api/Company.AppName.Api.csproj
@@ -6,7 +6,7 @@
preview
-
+
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Api/Properties/launchSettings.json b/templates/Beef.Template.Solution/content/Company.AppName.Api/Properties/launchSettings.json
index a58189392..c54a6c05f 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Api/Properties/launchSettings.json
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Api/Properties/launchSettings.json
@@ -1,26 +1,10 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:64784",
- "sslPort": 0
- }
- },
"profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
"Company.AppName.Api": {
"commandName": "Project",
"launchBrowser": true,
- "launchUrl": "swagger",
+ "launchUrl": "",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs b/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs
index 4bf194404..7fafb915d 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs
@@ -48,11 +48,11 @@ public void ConfigureServices(IServiceCollection services)
#endif
#if (implement_cosmos)
// Add the cosmos database.
- services.AddSingleton(sp =>
+ services.AddSingleton(sp =>
{
var settings = sp.GetRequiredService();
var cco = new AzCosmos.CosmosClientOptions { SerializerOptions = new AzCosmos.CosmosSerializationOptions { PropertyNamingPolicy = AzCosmos.CosmosPropertyNamingPolicy.CamelCase, IgnoreNullValues = true } };
- return new CosmosDb(new AzCosmos.CosmosClient(settings.CosmosConnectionString, cco).GetDatabase(settings.CosmosDatabaseId), sp.GetRequiredService());
+ return new AppNameCosmosDb(new AzCosmos.CosmosClient(settings.CosmosConnectionString, cco).GetDatabase(settings.CosmosDatabaseId), sp.GetRequiredService());
});
#endif
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Business/Data/CosmosDb.cs b/templates/Beef.Template.Solution/content/Company.AppName.Business/Data/AppNameCosmosDb.cs
similarity index 66%
rename from templates/Beef.Template.Solution/content/Company.AppName.Business/Data/CosmosDb.cs
rename to templates/Beef.Template.Solution/content/Company.AppName.Business/Data/AppNameCosmosDb.cs
index f8eeb8397..79528dcc5 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Business/Data/CosmosDb.cs
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Business/Data/AppNameCosmosDb.cs
@@ -3,20 +3,15 @@
namespace Company.AppName.Business.Data;
///
-/// Enables the Company.AppName CosmosDb client.
+/// Provides the Company.AppName CosmosDb client.
///
-public interface ICosmos : CoreEx.Cosmos.ICosmosDb
+/// The .
+/// The .
+/// The optional .
+public class AppNameCosmosDb(Database database, IMapper mapper, CosmosDbInvoker? invoker = null) : CoreEx.Cosmos.CosmosDb(database, mapper, invoker)
{
///
/// Exposes entity from the Person container.
///
public CosmosDbContainer Persons => Container("Person");
-}
-
-///
-/// Provides the Company.AppName CosmosDb client.
-///
-/// The .
-/// The .
-/// The optional .
-public class CosmosDb(Database database, IMapper mapper, CosmosDbInvoker? invoker = null) : CoreEx.Cosmos.CosmosDb(database, mapper, invoker), ICosmos { }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml
index c4b23f822..d6773d6fb 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml
+++ b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml
@@ -84,7 +84,7 @@ entities:
}
//#endif
//#if (implement_cosmos)
-cosmosName: ICosmos
+cosmosName: AppNameCosmosDb
eventSubjectRoot: Company
eventActionFormat: PastTense
eventSourceRoot: Company/AppName
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 1450eff3d..faeccd1af 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
@@ -31,7 +31,7 @@ entities:
- { name: Gender, entityFrameworkModel: EfModel.Gender }
//#endif
//#if (implement_cosmos)
-cosmosName: ICosmos
+cosmosName: AppNameCosmosDb
refDataType: Guid
autoImplement: Cosmos
entities:
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj
index 933ddedd6..1df6640b7 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj
@@ -31,8 +31,8 @@
-
-
+
+
all
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Test/Apis/FixtureSetup.cs b/templates/Beef.Template.Solution/content/Company.AppName.Test/Apis/FixtureSetup.cs
index 8f5deb0f1..cf778eb1a 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Test/Apis/FixtureSetup.cs
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Test/Apis/FixtureSetup.cs
@@ -40,7 +40,7 @@ public void OneTimeSetUp()
if (count == 0)
{
using var test = ApiTester.Create();
- var cosmosDb = test.Services.GetRequiredService();
+ var cosmosDb = test.Services.GetRequiredService();
await cosmosDb.Database.Client.CreateDatabaseIfNotExistsAsync(cosmosDb.Database.Id, cancellationToken: ct).ConfigureAwait(false);
@@ -61,7 +61,7 @@ public void OneTimeSetUp()
await cosmosDb.Persons.ImportBatchAsync(jdr, cancellationToken: ct).ConfigureAwait(false);
jdr = JsonDataReader.ParseYaml("RefData.yaml", new JsonDataReaderArgs(new CoreEx.Text.Json.ReferenceDataContentJsonSerializer()));
- await cosmosDb.ImportValueBatchAsync("RefData", jdr, test.Services.GetRequiredService().GetAllTypes(), cancellationToken: ct).ConfigureAwait(false);
+ await cosmosDb.ImportValueBatchAsync("RefData", jdr, ReferenceDataOrchestrator.GetAllTypesInNamespace(), cancellationToken: ct).ConfigureAwait(false);
}
return true;
diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj
index 4c8fe826e..7e8b1cbac 100644
--- a/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj
+++ b/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj
@@ -31,8 +31,8 @@
-
-
+
+
all
diff --git a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj
index d1e4e9fcd..f679c7035 100644
--- a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj
+++ b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj
@@ -23,6 +23,7 @@
+
@@ -33,6 +34,7 @@
+
diff --git a/tools/Beef.CodeGen.Core/CodeGenConsole.cs b/tools/Beef.CodeGen.Core/CodeGenConsole.cs
index cd9d8041f..64e0696c9 100644
--- a/tools/Beef.CodeGen.Core/CodeGenConsole.cs
+++ b/tools/Beef.CodeGen.Core/CodeGenConsole.cs
@@ -1,5 +1,7 @@
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef
+using Beef.CodeGen.OpenApi;
+using CoreEx;
using CoreEx.Abstractions;
using McMaster.Extensions.CommandLineUtils;
using Microsoft.Extensions.Logging;
@@ -9,7 +11,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Net;
using System.Reflection;
using System.Threading.Tasks;
@@ -29,6 +30,7 @@ public class CodeGenConsole : OnRamp.Console.CodeGenConsole
private string _databaseScript = "Database.yaml";
private CommandArgument? _cmdArg;
+ private CommandArgument? _additionalArgs;
///
/// Gets the 'Company' name.
@@ -192,10 +194,22 @@ public CodeGenConsole DatabaseConnectionString(string connectionString)
return this;
}
+ ///
+ /// Add or replace the to the underlying .
+ ///
+ /// The .
+ /// The current instance to supported fluent-style method-chaining.
+ public CodeGenConsole WithOpenApiArgs(OpenApiArgs openApiArgs)
+ {
+ Args.Parameters[nameof(OpenApiArgs)] = openApiArgs.ThrowIfNull(nameof(openApiArgs));
+ return this;
+ }
+
///
protected override void OnBeforeExecute(CommandLineApplication app)
{
_cmdArg = app.Argument("command", "Execution command type.", false).IsRequired();
+ _additionalArgs = app.Argument("args", "Additional arguments for the 'OpenApi' command (further described).", multipleValues: true);
using var sr = Resource.GetStreamReader("ExtendedHelp.txt");
app.ExtendedHelpText = sr.ReadToEnd();
@@ -270,6 +284,9 @@ protected override async Task OnCodeGenerationAsync()
if (cmd.HasFlag(CommandType.EndPoints))
await ExecuteEndpointsAsync(exedir, company, appName).ConfigureAwait(false);
+ if (cmd.HasFlag(CommandType.OpenApi))
+ await ExecuteOpenApiAsync(exedir).ConfigureAwait(false);
+
if (count > 1)
{
Args.Logger?.LogInformation("{Content}", new string('-', 80));
@@ -334,7 +351,6 @@ private void ExecuteClean()
Args.Logger?.LogInformation("{Content}", $"Exclude: {string.Join(", ", exclude)}");
Args.Logger?.LogInformation("{Content}", string.Empty);
-
// Use the count logic to detemine all paths with specified exclusions.
var sw = Stopwatch.StartNew();
var dcs = new DirectoryCountStatistics(Args.OutputDirectory, exclude);
@@ -472,5 +488,33 @@ private async Task ExecuteEndpointsAsync(string? exedir, string company, string
var cg = await OnRamp.CodeGenerator.CreateAsync(args).ConfigureAwait(false);
return (Config.Entity.CodeGenConfig)await cg.LoadConfigAsync().ConfigureAwait(false);
}
+
+ ///
+ /// Execute the OpenAPI processing.
+ ///
+ private async Task ExecuteOpenApiAsync(string exedir)
+ {
+ if (_additionalArgs!.Values.Count != 1)
+ throw new CodeGenException("The OpenAPI document path must be specified as the only argument.");
+
+ Args.Logger?.LogInformation("{Content}", " ** Code-generation of temporary entity YAML requested **");
+
+ // Read in the specified document.
+ var args = new CodeGeneratorArgs();
+ args.CopyFrom(Args);
+ args.OutputDirectory = new DirectoryInfo(exedir!);
+
+ var oac = await OpenApiConverter.ReadAsync(args, _additionalArgs.Value!).ConfigureAwait(false);
+
+ // Convert the OpenAPI document and generate the Beef YAML.
+ var fi = await oac.ConvertAsync().ConfigureAwait(false);
+
+ // Done, boom!
+ Args.Logger?.LogInformation("{Content}", string.Empty);
+ Args.Logger?.LogWarning("{Content}", $"Temporary entity file created: {fi.FullName}");
+ Args.Logger?.LogInformation("{Content}", string.Empty);
+ Args.Logger?.LogInformation("{Content}", "Copy and paste generated contents into their respective files and amend accordingly.");
+ Args.Logger?.LogInformation("{Content}", $"Once complete it is recommended that the '{fi.Name}' file is deleted, as it is otherwise not used.");
+ }
}
}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/CodeGenFileManager.cs b/tools/Beef.CodeGen.Core/CodeGenFileManager.cs
index 121d9b28d..bc76bdd09 100644
--- a/tools/Beef.CodeGen.Core/CodeGenFileManager.cs
+++ b/tools/Beef.CodeGen.Core/CodeGenFileManager.cs
@@ -12,6 +12,11 @@ namespace Beef.CodeGen
///
public static class CodeGenFileManager
{
+ ///
+ /// Gets the temporary entity file name.
+ ///
+ public static string TemporaryEntityFilename { get; } = "temp.entity.beef-5.yaml";
+
///
/// Gets the list of supported filenames (will search in order specified).
///
diff --git a/tools/Beef.CodeGen.Core/CodeGenerator.cs b/tools/Beef.CodeGen.Core/CodeGenerator.cs
index d8b476af2..8058dee83 100644
--- a/tools/Beef.CodeGen.Core/CodeGenerator.cs
+++ b/tools/Beef.CodeGen.Core/CodeGenerator.cs
@@ -1,15 +1,18 @@
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef
using Beef.CodeGen.Config.Entity;
+using HandlebarsDotNet;
using Microsoft.Extensions.Logging;
using OnRamp;
using OnRamp.Scripts;
using OnRamp.Utility;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.IO;
using System.Text.Json;
using System.Text.Json.Nodes;
+using System.Text.RegularExpressions;
namespace Beef.CodeGen
{
@@ -20,8 +23,29 @@ namespace Beef.CodeGen
/// The .
internal class CodeGenerator(ICodeGeneratorArgs args, CodeGenScript scripts) : OnRamp.CodeGenerator(args, scripts)
{
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "SYSLIB1045:Convert to 'GeneratedRegexAttribute'.", Justification = "Supporting multi-versions of .NET.")]
+ private static readonly Regex _seeRegex = new(@"", RegexOptions.Compiled);
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "SYSLIB1045:Convert to 'GeneratedRegexAttribute'.", Justification = "Supporting multi-versions of .NET.")]
+ private static readonly Regex _seeRefRegex = new(@" \((.*?)\)", RegexOptions.Compiled);
+
private const string _entitiesName = "entities";
+ ///
+ /// Static constructor.
+ ///
+ static CodeGenerator()
+ {
+ Handlebars.RegisterHelper("sanitize-comments", (writer, context, args) =>
+ {
+ var ua = args.OfType().FirstOrDefault();
+ if (ua is not null)
+ throw new CodeGenException($"Handlebars template invokes function 'sanitize-comments' that references '{ua.Value}' which is undefined.");
+
+ writer.WriteSafeString(_seeRegex.Replace(_seeRefRegex.Replace(args.FirstOrDefault()?.ToString() ?? "", ""), "$1").Replace("RefDataNamespace.", "").Replace("CollectionResult", "Collection").Replace("Collection", " array"));
+ });
+ }
+
///
/// Will search for secondary (related) configuration files and will dynamically include (merge) the configured entities into the primary configuration.
protected override void OnConfigurationLoad(CodeGenScript script, string fileName, JsonNode json)
@@ -41,6 +65,9 @@ protected override void OnConfigurationLoad(CodeGenScript script, string fileNam
if (!Path.GetFileNameWithoutExtension(secondaryFile.FullName).EndsWith(root, StringComparison.OrdinalIgnoreCase))
continue;
+ if (secondaryFile.Name.Equals(CodeGenFileManager.TemporaryEntityFilename, StringComparison.OrdinalIgnoreCase))
+ continue;
+
try
{
using var configReader = secondaryFile.OpenText();
diff --git a/tools/Beef.CodeGen.Core/CodeGeneratorArgsExtensions.cs b/tools/Beef.CodeGen.Core/CodeGeneratorArgsExtensions.cs
index f63300a5a..3ac5c0f61 100644
--- a/tools/Beef.CodeGen.Core/CodeGeneratorArgsExtensions.cs
+++ b/tools/Beef.CodeGen.Core/CodeGeneratorArgsExtensions.cs
@@ -1,6 +1,6 @@
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef
-using CoreEx.Database;
+using Beef.CodeGen.OpenApi;
using DbEx.Migration;
using OnRamp;
using System;
@@ -52,5 +52,12 @@ public static void ValidateCompanyAndAppName(this ICodeGeneratorArgs args)
/// The arguments.
/// The instance.
public static void AddDatabaseMigrator(this ICodeGeneratorArgs args, DatabaseMigrationBase migrator) => args.AddParameter(CodeGenConsole.DatabaseMigratorParamName, migrator ?? throw new ArgumentNullException(nameof(args)));
+
+ ///
+ /// Gets the .
+ ///
+ /// The .
+ /// The .
+ public static OpenApiArgs? GetOpenApiArgs(this ICodeGeneratorArgs args) => args.GetParameter(nameof(OpenApiArgs), false)!;
}
}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/CommandType.cs b/tools/Beef.CodeGen.Core/CommandType.cs
index 1fd9671bb..287c5595a 100644
--- a/tools/Beef.CodeGen.Core/CommandType.cs
+++ b/tools/Beef.CodeGen.Core/CommandType.cs
@@ -48,6 +48,11 @@ public enum CommandType
///
/// Reports all the endpoints.
///
- EndPoints = 8192
+ EndPoints = 8192,
+
+ ///
+ /// Parses and imports from an OpenAPI document into a temporary file.
+ ///
+ OpenApi = 16384
}
}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs b/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs
index 85bbc5412..07d865f37 100644
--- a/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs
+++ b/tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs
@@ -455,7 +455,7 @@ public class EntityConfig : ConfigBase
///
/// Indicates that a custom Database Mapper will be used; i.e. not generated.
///
- [JsonPropertyName("databaseCustomerMapper")]
+ [JsonPropertyName("databaseCustomMapper")]
[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; }
@@ -1947,6 +1947,7 @@ private void CheckDeprecatedProperties() => CodeGenConfig.WarnWhereDeprecated(Ro
("eventSubjectFormat", null, false),
("eventCasing", null, false),
("iValidator", null, false),
- ("crud", " Use the new 'behavior' property with a value of 'crupd' to achieve same functionality.", true));
+ ("crud", " Use the new 'behavior' property with a value of 'crupd' to achieve same functionality.", true),
+ ("databaseCustomerMapper", "Use 'databaseCustomMappper' instead; this was a spelling mistake that has now been corrected.", true));
}
}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/ExtendedHelp.txt b/tools/Beef.CodeGen.Core/ExtendedHelp.txt
index f1b259da4..e3b896cf2 100644
--- a/tools/Beef.CodeGen.Core/ExtendedHelp.txt
+++ b/tools/Beef.CodeGen.Core/ExtendedHelp.txt
@@ -1,9 +1,18 @@
Extended commands and argument(s):
clean Cleans (removes) all related directories named 'Generated'.
- - Use --param exclude=name[,name] to exclude named directory(s) from the clean.
+ - Use --param exclude=name[,name..] to exclude named directory(s) from the clean.
count Counts and reports the number of files and lines (All and Generated) within all related directories.
- - Use --param exclude=name[,name] to exclude named directory(s) from the count.
+ - Use --param exclude=name[,name..] to exclude named directory(s) from the count.
endpoints Lists (audits) the code-generated endpoints and related configuration.
+
+ openapi Parses an OpenAPI document and generates temporary Beef YAML configuration (preview).
+ - First argument is the OpenAPI document path (file or http(s)).
+ - Use --param include=[method:]path[,[method:]path..] to include named method (optional) and path (starts with).
+ - Use --param exclude=[method:]path[,[method:]path..] to exclude named method (optional) and path (starts with).
+ - Use --param ignore=[name[,name..]] to ignore named data types (.NET name).
+ - Use --param refdata=[name[,name..]] to identify reference data property names to automatically type.
+ - Use --param text=true|false to disable text attribute output.
+ - eg: dotnet run openapi "https://localhost/openapi.json" --param exclude=/ref --param ignore=changelog --param refdata=gender,outcome
diff --git a/tools/Beef.CodeGen.Core/OpenApi/OpenApiArgs.cs b/tools/Beef.CodeGen.Core/OpenApi/OpenApiArgs.cs
new file mode 100644
index 000000000..c2c979467
--- /dev/null
+++ b/tools/Beef.CodeGen.Core/OpenApi/OpenApiArgs.cs
@@ -0,0 +1,117 @@
+using Microsoft.OpenApi.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Beef.CodeGen.OpenApi
+{
+ ///
+ /// Represents the OpenAPI arguments that are used to control the resulting Beef YAML-generation.
+ ///
+ public class OpenApiArgs
+ {
+ ///
+ /// Gets or sets the to be used to determine the equality of the JSON property names to therefore include/exclude from the YAML generation.
+ ///
+ public StringComparer JsonNameComparer { get; set; } = StringComparer.OrdinalIgnoreCase;
+
+ ///
+ /// Indicates whether to reference the as reference data.
+ ///
+ /// Where selected (default) then the underlying property data type will be denoted as reference data. Otherwise, the enums will be generated as the C# code equivalent (within the YAML).
+ public bool EnumAsReferenceData { get; set; } = false;
+
+ ///
+ /// Gets or sets the array of starting characters that indicate that the parameter should be ignored (skipped).
+ ///
+ /// The parameter name is used for character comparison.
+ public char[] IgnoreParametersThatStartWith { get; set; } = ['$'];
+
+ ///
+ /// Gets or sets the type name suffix that is used where an underlying member name is the same.
+ ///
+ /// Member names cannot be the same as their enclosing type: .
+ public string TypeWithSameMemberNameSuffix { get; set; } = "X";
+
+ ///
+ /// Gets or sets the list of types that should be ignored (skipped).
+ ///
+ /// Extend (add to) using command line: --param ignore=[name[,name..]]
+ public List IgnoreTypes { get; set; } = [];
+
+ ///
+ /// Gets or sets the list of types that should be treated as reference data.
+ ///
+ /// Extend (add to) using command line: --param refdata=[name[,name..]]
+ public List RefDataTypes { get; set; } = [];
+
+ ///
+ /// Indicates whether to output the OpenApi text where applicable.
+ ///
+ /// Override using command line: --param text=true|false
+ public bool OutputText { get; set; } = false;
+
+ ///
+ /// Get or sets the function to convert the OpenAPI name to the corresponding .NET name.
+ ///
+ public Func? ConvertDotNetName { get; set; }
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ public Action? OnYamlConfig { get; set; }
+
+ ///
+ /// Gets or sets the action that is invoked after all the operations (see ) have been converted and added to the primary .
+ ///
+ public Action? OnYamlPrimaryEntity { get; set; }
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ /// Defaults to .
+ public Action? OnYamlOperation { get; set; } = OnYamlOperationAutoValidator;
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ /// Defaults to .
+ public Action? OnYamlEntity { get; set; } = OnYamlEntityAutoSelectPrimaryKey;
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ public Action? OnYamlProperty { get; set; }
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ public Action? OnYamlEnum { get; set; }
+
+ ///
+ /// Gets or sets the action that is invoked after the has been converted to the corresponding .
+ ///
+ public Action? OnYamlEnumValue { get; set; }
+
+ ///
+ /// Provides out-of-the-box logic to determine the primary key property.
+ ///
+ public static Action OnYamlEntityAutoSelectPrimaryKey { get; } = (entity, _) =>
+ {
+ var first = entity.Properties.FirstOrDefault();
+ if (first is not null && (first.Name!.Equals("Id", StringComparison.OrdinalIgnoreCase) || first.Name!.Equals(entity.Name! + "Id", StringComparison.OrdinalIgnoreCase)))
+ first.AddAttribute("primaryKey", true);
+ };
+
+ ///
+ /// Provides out-of-the-box logic to add a validator attribue.
+ ///
+ public static Action OnYamlOperationAutoValidator { get; } = (operation, _) =>
+ {
+ var type = operation.Attributes["type"] as string;
+ var valueType = operation.Attributes["valueType"] as string;
+ if (type is not null && (type == "Create" || type == "Update"))
+ operation.AddAttribute("validator", valueType + "Validator");
+ };
+ }
+}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/OpenApi/OpenApiConverter.cs b/tools/Beef.CodeGen.Core/OpenApi/OpenApiConverter.cs
new file mode 100644
index 000000000..b7fa18380
--- /dev/null
+++ b/tools/Beef.CodeGen.Core/OpenApi/OpenApiConverter.cs
@@ -0,0 +1,488 @@
+using CoreEx;
+using Microsoft.OpenApi.Any;
+using Microsoft.OpenApi.Interfaces;
+using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.Readers;
+using Microsoft.OpenApi.Writers;
+using OnRamp;
+using OnRamp.Utility;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Beef.CodeGen.OpenApi
+{
+ ///
+ /// Provides the ability to convert an OpenAPI document to an equivalent Beef-5 YAML configuration.
+ ///
+ public class OpenApiConverter
+ {
+ private static readonly char[] _separators = "^&*$!@#%*{}[]|:;\"'_- .,".ToCharArray();
+ private static readonly char[] _yamlEscapeChars = "!@#%*{}[]|:;\"'".ToCharArray();
+
+ private readonly OpenApiDocument _document;
+ private readonly YamlConfig _config;
+ private readonly CodeGeneratorArgs _codeGenArgs;
+ private readonly OpenApiArgs _openApiArgs;
+
+ ///
+ /// Read the OpenAPI document and create the .
+ ///
+ /// The .
+ /// The OpenAPI document path.
+ /// The .
+ public static async Task ReadAsync(CodeGeneratorArgs args, string path)
+ {
+ var oasr = new OpenApiStreamReader(new OpenApiReaderSettings { });
+ OpenApiDocument oad;
+ OpenApiDiagnostic oadi;
+
+ try
+ {
+ if (File.Exists(path))
+ {
+ using var sr = File.OpenRead(path);
+ oad = oasr.Read(sr, out oadi);
+ }
+ else
+ {
+ using var hr = new HttpClient();
+ using var sr = await hr.GetStreamAsync(path).ConfigureAwait(false);
+ oad = oasr.Read(sr, out oadi);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new CodeGenException($"The OpenAPI document path '{path}' is invalid.", ex);
+ }
+
+ if (oadi.Errors.Count > 0)
+ {
+ var errors = string.Join(Environment.NewLine, oadi.Errors.Select(x => x.ToString()));
+ throw new CodeGenException($"The OpenAPI document '{path}' contains errors:{Environment.NewLine}{errors}");
+ }
+
+ return new OpenApiConverter(path, args, oad);
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private OpenApiConverter(string path, CodeGeneratorArgs args, OpenApiDocument document)
+ {
+ _document = document;
+ _codeGenArgs = args ?? throw new ArgumentNullException(nameof(args));
+ _openApiArgs = _codeGenArgs.GetOpenApiArgs() ?? new OpenApiArgs();
+
+ _openApiArgs.RefDataTypes.AddRange(_codeGenArgs.GetParameter("refdata")?.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? []);
+ _openApiArgs.IgnoreTypes.AddRange(_codeGenArgs.GetParameter("ignore")?.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? []);
+ if (_codeGenArgs.Parameters.TryGetValue("text", out var val) && val is string text)
+ _openApiArgs.OutputText = text.Equals("true", StringComparison.OrdinalIgnoreCase);
+
+ var sb = new StringBuilder($"openapi \"{path}\"");
+ foreach (var p in args.Parameters.Where(x => new List { "include", "exclude", "ignore", "refdata", "text" }.Contains(x.Key, StringComparer.OrdinalIgnoreCase)))
+ {
+ sb.Append($" --param \"{p.Key}={p.Value}\"");
+ }
+
+ _config = new(null, sb.ToString(), _openApiArgs);
+ }
+
+ ///
+ /// Performs the conversion and outputs the YAML configuration.
+ ///
+ /// The YAML configuration .
+ public async Task ConvertAsync()
+ {
+ const string templateFileName = "OpenApi_yaml";
+
+ // Create the owning beef "entity" to house all the operations.
+ var ename = GetDotNetName(OpenApiNameType.Entity, _document.Info.Title) + "Service";
+ var entity = new YamlEntity(_document.Info.Title, string.IsNullOrWhiteSpace(ename) ? "NoTitleSpecifiedService" : ename);
+ entity.AddAttribute("excludeEntity", true);
+ if (_openApiArgs.OutputText)
+ entity.AddAttribute("text", _document.Info.Description);
+
+ static (string? method, string path) MethodPathSplitter(string text)
+ {
+ var parts = text.Trim().Split(':', StringSplitOptions.RemoveEmptyEntries);
+ if (parts.Length < 1 || parts.Length > 2)
+ throw new CodeGenException($"The parameter must be in the format 'path' or 'method:path': {text}");
+
+ return parts.Length == 1 ? (null, parts[0]) : (parts[0], parts[1]);
+ }
+
+ // Filter and process each underlying API path (operation).
+ var exclude = (_codeGenArgs.GetParameter("exclude")?.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? []).Select(MethodPathSplitter).ToArray();
+ var include = (_codeGenArgs.GetParameter("include")?.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? []).Select(MethodPathSplitter).ToArray();
+
+ foreach (var oap in _document.Paths)
+ {
+ foreach (var ooo in oap.Value.Operations)
+ {
+ if (exclude.Any(x => (x.method is null || x.method.Equals(ooo.Key.ToString(), StringComparison.OrdinalIgnoreCase)) && oap.Key.StartsWith(x.path, StringComparison.OrdinalIgnoreCase)))
+ continue;
+
+ if (include.Length == 0 || include.Any(x => (x.method is null || x.method.Equals(ooo.Key.ToString(), StringComparison.OrdinalIgnoreCase)) && oap.Key.StartsWith(x.path, StringComparison.OrdinalIgnoreCase)))
+ CreateOperation(entity, new ApiOperation(oap.Key, ooo.Key, ooo.Value));
+ }
+ }
+
+ // Sort all the entities then add the owning entity so it appears first.
+ _config.Entities.Sort((x, y) => StringComparer.OrdinalIgnoreCase.Compare(x.Name, y.Name));
+ _config.Entities!.Insert(0, entity);
+
+ _config.Enums.Sort((x, y) => StringComparer.OrdinalIgnoreCase.Compare(x.Name, y.Name));
+
+ // Finalize the configurations.
+ _openApiArgs.OnYamlPrimaryEntity?.Invoke(entity, _document);
+ _openApiArgs.OnYamlConfig?.Invoke(_config, _document);
+
+ // Set the path/filename.
+ var fn = Path.Combine(OnRamp.Console.CodeGenConsole.GetBaseExeDirectory(), CodeGenFileManager.TemporaryEntityFilename);
+ var fi = new FileInfo(fn);
+
+ // Execute the code-generation proper and write contents (new or overwrite).
+ using var sr = StreamLocator.GetTemplateStreamReader(templateFileName, [.. _codeGenArgs.Assemblies], StreamLocator.HandlebarsExtensions).StreamReader!;
+ await File.WriteAllTextAsync(fi.FullName, new HandlebarsCodeGenerator(sr).Generate(_config)).ConfigureAwait(false);
+
+ return fi;
+ }
+
+ ///
+ /// Converts the operation.
+ ///
+ private void CreateOperation(YamlEntity entity, ApiOperation ao)
+ {
+ var operation = new YamlOperation(ao.Operation.OperationId, GetDotNetName(OpenApiNameType.Operation, ao.Operation.OperationId));
+
+ operation.AddAttribute("type", ao.Method switch
+ {
+ Microsoft.OpenApi.Models.OperationType.Get => "Get",
+ Microsoft.OpenApi.Models.OperationType.Post => "Create",
+ Microsoft.OpenApi.Models.OperationType.Put => "Update",
+ Microsoft.OpenApi.Models.OperationType.Patch => "Patch",
+ Microsoft.OpenApi.Models.OperationType.Delete => "Delete",
+ _ => "Custom"
+ });
+
+ // Add the parameters.
+ foreach (var p in ao.Operation.Parameters)
+ {
+ if (_openApiArgs.IgnoreParametersThatStartWith.Length > 0 && _openApiArgs.IgnoreParametersThatStartWith.Contains(p.Name.FirstOrDefault()))
+ continue;
+
+ var pname = GetDotNetName(OpenApiNameType.Parameter, p.Name)!;
+ var pp = new YamlParameter(p.Name, pname);
+ pp.AddAttribute("type", GetDotNetType(pname, p.Schema), false, "string");
+ pp.AddAttribute("isMandatory", p.Required);
+ if (_openApiArgs.OutputText)
+ pp.AddAttribute("text", FormatText(p.Description));
+
+ var comparer = _openApiArgs.JsonNameComparer;
+ if (comparer.Compare(p.Name, StringConverter.ToCamelCase(pp.Name)) != 0)
+ pp.AddAttribute("argumentName", p.Name);
+
+ operation.Parameters.Add(pp);
+ }
+
+ // Add the request (body).
+ if (ao.Operation.RequestBody is not null)
+ {
+ if (ao.Operation.RequestBody.Reference is not null)
+ operation.AddAttribute("valueType", GetDotNetType(ao.Operation.RequestBody));
+ else
+ {
+ var content = ao.Operation.RequestBody.Content.FirstOrDefault();
+ if (content.Value is not null && content.Value.Schema is not null)
+ operation.AddAttribute("valueType", GetDotNetType(content.Value.Schema));
+ }
+ }
+
+ // Add the response (body); being the first 2XX response, - if any.
+ var response = ao.Operation.Responses.FirstOrDefault(x => x.Key.StartsWith('2'));
+ if (response.Value is null)
+ operation.AddAttribute("returnType", "void");
+ else if (response.Value.Reference is not null)
+ operation.AddAttribute("returnType", GetDotNetType(response.Value));
+ else
+ {
+ var content = response.Value.Content.FirstOrDefault();
+ if (content.Value is null || content.Value.Schema is null)
+ operation.AddAttribute("returnType", "void");
+ else
+ operation.AddAttribute("returnType", GetDotNetType(string.Empty, content.Value.Schema));
+ }
+
+ // Add the web api attributes.
+ operation.AddAttribute("webApiMethod", ao.Method switch
+ {
+ Microsoft.OpenApi.Models.OperationType.Get or Microsoft.OpenApi.Models.OperationType.Post or Microsoft.OpenApi.Models.OperationType.Put or Microsoft.OpenApi.Models.OperationType.Patch or Microsoft.OpenApi.Models.OperationType.Delete => null,
+ _ => "Http" + ao.Method.ToString()
+ });
+
+ operation.AddAttribute("webApiRoute", "'" + ao.Path + "'");
+ operation.AddAttribute("webApiStatus", response.Key is null ? "NoContent" : ((HttpStatusCode)int.Parse(response.Key)).ToString());
+
+ // Finish it!
+ if (_openApiArgs.OutputText)
+ operation.AddAttribute("text", FormatText(ao.Operation.Summary));
+
+ entity.Operations.Add(operation);
+ _openApiArgs.OnYamlOperation?.Invoke(operation, ao.Operation);
+ }
+
+ ///
+ /// Converts the schema to an entity.
+ ///
+ private YamlEntity CreateOrGetSchemaEntity(string name, OpenApiSchema schema, bool createWhereDifferences)
+ {
+ // Get the .NET name.
+ var ename = GetDotNetName(OpenApiNameType.Entity, name);
+ foreach (var p in schema.Properties)
+ {
+ // Rename where the type name is the same as a member name (not allowed in .NET).
+ var pname = GetDotNetName(OpenApiNameType.Property, p.Key);
+ if (ename == pname)
+ {
+ ename += _openApiArgs.TypeWithSameMemberNameSuffix;
+ break;
+ }
+ }
+
+ // Check if a faux entity is to be created as it should be ignored.
+ if (_openApiArgs.IgnoreTypes.Contains(ename, StringComparer.OrdinalIgnoreCase) || _openApiArgs.RefDataTypes.Contains(ename, StringComparer.OrdinalIgnoreCase))
+ return new YamlEntity(name, ename);
+
+ // Serialize to JSON for comparison.
+ using var sw = new StringWriter();
+ var oajw = new OpenApiJsonWriter(sw, new OpenApiJsonWriterSettings { Terse = true });
+ schema.SerializeAsV3WithoutReference(oajw);
+ var json = sw.ToString();
+
+ // Create entity where unique and further rename where applicable.
+ if (createWhereDifferences)
+ {
+ int count = 0;
+ while (true)
+ {
+ var uename = count == 0 ? ename : $"{ename}{count}";
+ var eentity = _config.Entities!.FirstOrDefault(x => x.Name == GetDotNetName(OpenApiNameType.Entity, uename));
+ if (eentity is null)
+ {
+ ename = uename;
+ break;
+ }
+
+ // Where same name and no differences in configuration then reuse.
+ if (eentity.Json == json)
+ return eentity;
+
+ count++;
+ }
+ }
+ else
+ {
+ // Only create if not already exists.
+ var eentity = _config.Entities!.FirstOrDefault(x => x.Name == ename);
+ if (eentity is not null)
+ return eentity;
+ }
+
+ var entity = new YamlEntity(name, ename) { Json = json };
+ if (_openApiArgs.OutputText)
+ entity.AddAttribute("text", FormatText(schema.Description));
+
+ _config.Entities!.Add(entity);
+
+ // Add all the properties.
+ string ApplyRefDataTypeNotation(string name, string type) => type == "string" && _openApiArgs.RefDataTypes.Contains(name, StringComparer.OrdinalIgnoreCase) ? "^" + name : type;
+
+ foreach (var prop in schema.Properties)
+ {
+ var pname = GetDotNetName(OpenApiNameType.Property, prop.Key)!;
+ var p = new YamlProperty(prop.Key, pname);
+ p.AddAttribute("type", ApplyRefDataTypeNotation(pname, GetDotNetType(pname, prop.Value)), false, "string");
+
+ var comparer = _openApiArgs.JsonNameComparer;
+ if (comparer.Compare(prop.Key, StringConverter.ToCamelCase(p.Name)) != 0)
+ p.AddAttribute("jsonName", prop.Key);
+
+ if (_openApiArgs.OutputText)
+ p.AddAttribute("text", FormatText(prop.Value.Description));
+
+ _openApiArgs.OnYamlProperty?.Invoke(p, prop.Value);
+ entity.Properties.Add(p);
+ }
+
+ // Remove any reference data text properties as not required.
+ var indexes = new List();
+ foreach (var p in entity.Properties.Where(x => x.Attributes.Contains("type") && x.Attributes["type"]!.ToString()!.StartsWith('^')))
+ {
+ var index = entity.Properties.FindIndex(x => x.Name!.StartsWith(p.Name + "Text", StringComparison.OrdinalIgnoreCase));
+ if (index >= 0)
+ indexes.Add(index);
+ }
+
+ foreach (var index in indexes.OrderBy(x => x).Reverse())
+ {
+ entity.Properties.RemoveAt(index);
+ }
+
+ // Done! Finalize.
+ _openApiArgs.OnYamlEntity?.Invoke(entity, schema);
+ return entity;
+ }
+
+ ///
+ /// Gets a .NET friendly name.
+ ///
+ private string GetDotNetName(OpenApiNameType type, string name)
+ {
+ name.ThrowIfNullOrEmpty(nameof(name));
+ var sb = new StringBuilder();
+ name.Split(_separators, StringSplitOptions.RemoveEmptyEntries).ForEach(part => sb.Append(StringConverter.ToPascalCase(part)));
+ return _openApiArgs.ConvertDotNetName is null ? sb.ToString() : _openApiArgs.ConvertDotNetName(type, sb.ToString());
+ }
+
+ ///
+ /// Format the text for YAML.
+ ///
+ private static string? FormatText(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text))
+ return null;
+
+ text = string.Join(" ", text.TrimEnd().Replace("\r\n", " ").Replace("\r", " ").Replace("\n", " ").Split(' ', StringSplitOptions.RemoveEmptyEntries));
+ if (string.IsNullOrWhiteSpace(text))
+ return null;
+
+ if (!text.EndsWith('.'))
+ text += ".";
+
+ if (text.Any(c => _yamlEscapeChars.Contains(c)))
+ return "'+" + text.Replace("'", "''") + "'";
+ else
+ return "+" + text;
+ }
+
+ ///
+ /// Gets the equivalent .NET type.
+ ///
+ private string GetDotNetType(IOpenApiReferenceable reference)
+ {
+ var schema = _document.Components.Schemas[reference.Reference.Id];
+ return GetDotNetType(reference.Reference.Id, schema);
+ }
+
+ ///
+ /// Gets the equivalent .NET type.
+ ///
+ private string GetDotNetType(string pname, OpenApiSchema schema)
+ {
+ if (schema.Type == "string")
+ {
+ if (schema.Format == "date-time")
+ return "DateTime" + (schema.Nullable ? "?" : string.Empty);
+ else if (schema.Format == "date")
+ return "DateTime" + (schema.Nullable ? "?" : string.Empty);
+ else if (schema.Format == "time")
+ return "TimeSpan" + (schema.Nullable ? "?" : string.Empty);
+ else
+ {
+ if (schema.Reference is not null && schema.Reference.Id is not null)
+ {
+ var yenum = new YamlEnum(schema.Reference.Id, GetDotNetName(OpenApiNameType.Enum, schema.Reference.Id));
+ if (_openApiArgs.OutputText)
+ yenum.AddAttribute("text", FormatText(schema.Description));
+
+ foreach (var v in (schema.Enum ?? []).OfType())
+ {
+ var yev = new YamlEnumValue(v.Value, GetDotNetName(OpenApiNameType.EnumValue, v.Value));
+ _openApiArgs.OnYamlEnumValue?.Invoke(yev, schema);
+ yenum.Values.Add(yev);
+ }
+
+ if (_config.Enums.FirstOrDefault(x => x.Name == yenum.Name) is null)
+ {
+ _openApiArgs.OnYamlEnum?.Invoke(yenum, schema);
+ _config.Enums.Add(yenum);
+ }
+
+ return (_openApiArgs.EnumAsReferenceData ? "^" : "") + yenum.Name;
+ }
+ else
+ return "string";
+ }
+ }
+ else if (schema.Type == "integer")
+ {
+ if (schema.Format == "int32")
+ return "int" + (schema.Nullable ? "?" : string.Empty);
+ else if (schema.Format == "int64")
+ return "long" + (schema.Nullable ? "?" : string.Empty);
+ else
+ return "int" + (schema.Nullable ? "?" : string.Empty);
+ }
+ else if (schema.Type == "number")
+ {
+ if (schema.Format == "float")
+ return "float" + (schema.Nullable ? "?" : string.Empty);
+ else if (schema.Format == "double")
+ return "double" + (schema.Nullable ? "?" : string.Empty);
+ else
+ return "decimal" + (schema.Nullable ? "?" : string.Empty);
+ }
+ else if (schema.Type == "boolean")
+ {
+ return "bool" + (schema.Nullable ? "?" : string.Empty);
+ }
+ else if (schema.Type == "array")
+ {
+ if (schema.Items.Type == "object")
+ {
+ var aname = GetDotNetName(OpenApiNameType.Entity, schema.Items.Reference.Id);
+ var entity = CreateOrGetSchemaEntity(aname, schema.Items, false);
+ entity!.AddAttribute("collection", true);
+ return entity.Name + "Collection";
+ }
+ else
+ return "List<" + GetDotNetType(pname, schema.Items) + ">";
+ }
+ else
+ {
+ if (schema.Reference is not null && schema.Reference.Type == ReferenceType.Schema)
+ {
+ if (_document.Components.Schemas.TryGetValue(schema.Reference.Id, out var refSchema))
+ return CreateOrGetSchemaEntity(schema.Reference.Id, refSchema, false)!.Name!;
+
+ return GetDotNetName(OpenApiNameType.Entity, schema.Reference.Id);
+ }
+
+ if (schema.Properties.Count == 0)
+ return "object";
+
+ // Embedded object definition; therefore create a new _unique_ entity.
+ var entity = CreateOrGetSchemaEntity(pname, schema, true);
+ return entity.Name!;
+ }
+ }
+
+ ///
+ /// Represents the with the path and method.
+ ///
+ private class ApiOperation(string path, Microsoft.OpenApi.Models.OperationType method, OpenApiOperation operation)
+ {
+ public string Path { get; } = path;
+
+ public Microsoft.OpenApi.Models.OperationType Method { get; } = method;
+
+ public OpenApiOperation Operation { get; } = operation;
+ }
+ }
+}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/OpenApi/OpenApiNameType.cs b/tools/Beef.CodeGen.Core/OpenApi/OpenApiNameType.cs
new file mode 100644
index 000000000..400a4630e
--- /dev/null
+++ b/tools/Beef.CodeGen.Core/OpenApi/OpenApiNameType.cs
@@ -0,0 +1,38 @@
+namespace Beef.CodeGen.OpenApi
+{
+ ///
+ /// Provides the OpenAPI name type.
+ ///
+ public enum OpenApiNameType
+ {
+ ///
+ /// Represents the entity name.
+ ///
+ Entity,
+
+ ///
+ /// Represents the property name.
+ ///
+ Property,
+
+ ///
+ /// Represents the operation name.
+ ///
+ Operation,
+
+ ///
+ /// Represents the parameter name.
+ ///
+ Parameter,
+
+ ///
+ /// Represents the enum name.
+ ///
+ Enum,
+
+ ///
+ /// Represents the enum value.
+ ///
+ EnumValue
+ }
+}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/OpenApi/YamlConfig.cs b/tools/Beef.CodeGen.Core/OpenApi/YamlConfig.cs
new file mode 100644
index 000000000..2c8aaf5a1
--- /dev/null
+++ b/tools/Beef.CodeGen.Core/OpenApi/YamlConfig.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Beef.CodeGen.OpenApi
+{
+ ///
+ /// Provides the base YAML configuration.
+ ///
+ public abstract class YamlBase(string? originalName, string name)
+ {
+ ///
+ /// Gets the original name.
+ ///
+ public string? OriginalName { get; } = originalName;
+
+ ///
+ /// Gets the .NET name.
+ ///
+ public string? Name { get; internal set; } = name;
+
+ ///
+ /// Gets the attributes.
+ ///
+ public OrderedDictionary Attributes { get; } = [];
+
+ ///
+ /// Adds the attribute to the entity where the is not its default value (unless is true).
+ ///
+ /// The key.
+ /// The value.
+ /// Indicates whether to allow the default value to be added.
+ /// Options defaults to potentially skip.
+ /// Where the attribute with the specified already exists then no action will occur; i.e. will not override.
+ public void AddAttribute(string key, T? value, bool allowDefault = false, params T[] defaults)
+ {
+ if (Attributes.Contains(key))
+ return;
+
+ if (value is null)
+ {
+ if (allowDefault)
+ Attributes.Add(key, "null");
+
+ return;
+ }
+
+ if (value is string s)
+ {
+ if (string.IsNullOrWhiteSpace(s) && !allowDefault)
+ return;
+
+ if (defaults.Contains(value) && !allowDefault)
+ return;
+
+ Attributes.Add(key, value);
+ }
+ else if (value is bool b)
+ {
+ if (!b && !allowDefault)
+ return;
+
+ Attributes.Add(key, b.ToString().ToLowerInvariant());
+ }
+ else
+ throw new NotSupportedException($"The value type '{value?.GetType().Name}' is not supported.");
+ }
+
+ ///
+ /// Gets the summary text (if available).
+ ///
+ public string? SummaryText => Attributes["text"]?.ToString()?[2..^1];
+ }
+
+ ///
+ /// Represents the YAML root configuration.
+ ///
+ public class YamlConfig(string? originalName, string name, OpenApiArgs args) : YamlBase(originalName, name)
+ {
+ ///
+ /// Gets the .
+ ///
+ public OpenApiArgs Args { get; } = args;
+
+ ///
+ /// Gets the entities.
+ ///
+ public List Entities { get; } = [];
+
+ ///
+ /// Gets the enums.
+ ///
+ public List Enums { get; } = [];
+ }
+
+ ///
+ /// Represents the YAML entity.
+ ///
+ public class YamlEntity(string? originalName, string name) : YamlBase(originalName, name)
+ {
+ ///
+ /// Gets or sets the JSON V3 representation to enable uniqueness comparison.
+ ///
+ internal string? Json { get; set; }
+
+ ///
+ /// Gets the properties.
+ ///
+ public List Properties { get; } = [];
+
+ ///
+ /// Gets the operations.
+ ///
+ public List Operations { get; } = [];
+ }
+
+ ///
+ /// Represents the YAML property.
+ ///
+ public class YamlProperty(string? originalName, string name) : YamlBase(originalName, name) { }
+
+ ///
+ /// Represents the YAML operation.
+ ///
+ public class YamlOperation(string? originalName, string name) : YamlBase(originalName, name)
+ {
+ ///
+ /// Gets the parameters.
+ ///
+ public List Parameters { get; } = [];
+ }
+
+ ///
+ /// Represents the YAML parameter.
+ ///
+ public class YamlParameter(string? originalName, string name) : YamlBase(originalName, name) { }
+
+ ///
+ /// Represents the YAML enum.
+ ///
+ public class YamlEnum(string? originalName, string name) : YamlBase(originalName, name)
+ {
+ ///
+ /// Gets the enum values.
+ ///
+ public List Values { get; } = [];
+ }
+
+ ///
+ /// Represents the YAML enum value.
+ ///
+ public class YamlEnumValue(string? originalName, string name) : YamlBase(originalName, name) { }
+}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json b/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json
index 266466e53..d91b74a97 100644
--- a/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json
+++ b/tools/Beef.CodeGen.Core/Schema/entity.beef-5.json
@@ -627,7 +627,7 @@
"type": "string",
"title": "The name of the \u0060Mapper\u0060 that the generated Database \u0060Mapper\u0060 inherits from."
},
- "databaseCustomerMapper": {
+ "databaseCustomMapper": {
"type": "boolean",
"title": "Indicates that a custom Database \u0060Mapper\u0060 will be used; i.e. not generated.",
"description": "Otherwise, by default, a \u0060Mapper\u0060 will be generated."
diff --git a/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs b/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs
index c57816923..5a32957c1 100644
--- a/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs
+++ b/tools/Beef.CodeGen.Core/Templates/EntityWebApiController_cs.hbs
@@ -54,19 +54,19 @@ public partial class {{Name}}Controller : ControllerBase
{{/unless}}
///
- /// {{{SummaryText}}}
+ /// {{{sanitize-comments SummaryText}}}
///
{{#each CoreParameters}}
{{#ifeq WebApiFrom 'FromEntityProperties'}}
{{#each RelatedEntity.Properties}}
- /// {{{ParameterSummaryText}}}
+ /// {{{sanitize-comments ParameterSummaryText}}}
{{/each}}
{{else}}
- /// {{{SummaryText}}}
+ /// {{{sanitize-comments SummaryText}}}
{{/ifeq}}
{{/each}}
{{#if HasReturnValue}}
- /// {{{WebApiReturnText}}}
+ /// {{{sanitize-comments WebApiReturnText}}}
{{/if}}
{{#ifge WebApiTags.Count 1}}
[Tags({{#each WebApiTags}}"{{.}}"{{#unless @last}}, {{/unless}}{{/each}})]
diff --git a/tools/Beef.CodeGen.Core/Templates/Model_cs.hbs b/tools/Beef.CodeGen.Core/Templates/Model_cs.hbs
index b407a9e9e..e787479db 100644
--- a/tools/Beef.CodeGen.Core/Templates/Model_cs.hbs
+++ b/tools/Beef.CodeGen.Core/Templates/Model_cs.hbs
@@ -42,7 +42,7 @@ using {{Root.UsingNamespace3}};{{set-value 'HasUsingStatement' true}}
namespace {{#if Root.IsDataModel}}{{Root.NamespaceBusiness}}.Data.Model{{else}}{{#ifeq Root.RuntimeEntityScope 'Common'}}{{Root.NamespaceCommon}}{{else}}{{Root.NamespaceBusiness}}{{/ifeq}}.Entities{{/if}}
{
///
- /// {{#if Root.IsDataModel}}{{ModelSummaryText}}{{else}}{{SummaryText}}{{/if}}
+ /// {{#if Root.IsDataModel}}{{ModelSummaryText}}{{else}}{{#ifeq Root.RuntimeEntityScope 'Common'}}{{sanitize-comments SummaryText}}{{else}}{{SummaryText}}{{/ifeq}}{{/if}}
///
{{#if Root.IsDataModel}}
public {{#if Abstract}}abstract {{/if}}partial class {{{EntityName}}}{{#ifval DataModelInherits}} : {{{DataModelInherits}}}{{/ifval}}{{#ifval ModelImplements}}{{#ifval DataModelInherits}}, {{else}} : {{/ifval}}{{{ModelImplements}}}{{/ifval}}{{#ifval RefDataType}}{{#ifeq CoreProperties.Count 0}} { }{{/ifeq}}{{/ifval}}
@@ -67,7 +67,7 @@ namespace {{#if Root.IsDataModel}}{{Root.NamespaceBusiness}}.Data.Model{{else}}{
{{#unless Root.IsDataModel}}
{{#ifeq RefDataText 'Optional' 'Always'}}
///
- /// {{{SummaryRefDataText}}}
+ /// {{#ifeq Root.RuntimeEntityScope 'Common'}}{{sanitize-comments SummaryRefDataText}}{{else}}{{SummaryRefDataText}}{{/ifeq}}
///
{{#ifval JsonName}}
{{#ifeq Parent.JsonSerializer 'SystemText'}}
@@ -84,7 +84,7 @@ namespace {{#if Root.IsDataModel}}{{Root.NamespaceBusiness}}.Data.Model{{else}}{
{{/unless}}
{{/ifval}}
///
- /// {{{ModelSummaryText}}}
+ /// {{#ifeq Root.RuntimeEntityScope 'Common'}}{{sanitize-comments ModelSummaryText}}{{else}}{{ModelSummaryText}}{{/ifeq}}
///
{{#if Root.IsDataModel}}
{{#if DataModelSerializationIgnore}}
@@ -178,7 +178,7 @@ namespace {{#if Root.IsDataModel}}{{Root.NamespaceBusiness}}.Data.Model{{else}}{
{{#if Collection}}
///
- /// Represents the {{{EntityNameSeeComments}}} collection.
+ /// Represents the {{#ifeq Root.RuntimeEntityScope 'Common'}}{{sanitize-comments EntityNameSeeComments}}{{else}}{{EntityNameSeeComments}}{{/ifeq}} collection.
///
public partial class {{{EntityCollectionName}}} : {{{CollectionInherits}}} { }
{{/if}}
@@ -186,7 +186,7 @@ namespace {{#if Root.IsDataModel}}{{Root.NamespaceBusiness}}.Data.Model{{else}}{
{{#unless Root.IsDataModel}}
///
- /// Represents the {{{EntityNameSeeComments}}} collection result.
+ /// Represents the {{#ifeq Root.RuntimeEntityScope 'Common'}}{{sanitize-comments EntityNameSeeComments}}{{else}}{{EntityNameSeeComments}}{{/ifeq}} collection result.
///
public class {{{EntityCollectionResultName}}} : {{{CollectionResultInherits}}}
{
diff --git a/tools/Beef.CodeGen.Core/Templates/OpenApi_yaml.hbs b/tools/Beef.CodeGen.Core/Templates/OpenApi_yaml.hbs
new file mode 100644
index 000000000..3ae7a38c9
--- /dev/null
+++ b/tools/Beef.CodeGen.Core/Templates/OpenApi_yaml.hbs
@@ -0,0 +1,82 @@
+# dotnet run {{Name}}
+# - review the entities, properties and operations then copy into your destination YAML file under 'entities'.
+entities:
+{{#each Entities}}
+- { name: {{Name}}{{#each Attributes}}, {{@key}}: {{@value}}{{/each}}{{#ifne Properties.Count 0}},{{else}}{{#ifne Operations.Count 0}},{{/ifne}}{{/ifne}}
+ {{#each Properties}}
+ {{#if @first}}
+ properties: [
+ {{/if}}
+ { name: {{Name}}{{#each Attributes}}, {{@key}}: {{@value}}{{/each}} }{{#unless @last}},{{/unless}}
+ {{#if @last}}
+ ]{{#ifne ../Operations.Count 0}},{{/ifne}}
+ {{/if}}
+ {{/each}}
+ {{#each Operations}}
+ {{#if @first}}
+ operations: [
+ {{/if}}
+ { name: {{Name}}{{#each Attributes}}, {{@key}}: {{@value}}{{/each}}{{#ifeq Parameters.Count 0}} }{{#unless @last}},{{/unless}}{{else}},{{/ifeq}}
+ {{#each Parameters}}
+ {{#if @first}}
+ parameters: [
+ {{/if}}
+ { name: {{Name}}{{#each Attributes}}, {{@key}}: {{@value}}{{/each}} }{{#unless @last}},{{/unless}}
+ {{#if @last}}
+ ]
+ }{{#unless ../@last}},{{/unless}}
+ {{/if}}
+ {{/each}}
+ {{#if @last}}
+ ]
+ {{/if}}
+ {{/each}}
+ }
+ {{#unless @last}}
+
+ {{/unless}}
+{{/each}}
+{{#ifne Enums.Count 0}}
+
+ {{#if Args.EnumAsReferenceData}}
+# Enums converted to reference data entities.
+# - review the entities then copy into your destination YAML file under 'entities:'.
+refDataEntities:
+ {{#each Enums}}
+- { name: {{Name}}{{#each Attributes}}, {{@key}}: {{@value}}{{/each}} }
+ {{/each}}
+
+# Enums converted for reference data loading.
+# - review the data then copy into your destination YAML file (remove the merge '$' symbol as required).
+refDataData:
+ {{#each Enums}}
+ {{#unless @first}}
+
+ {{/unless}}
+- ${{Name}}:
+ {{#each Values}}
+ - {{OriginalName}}: {{sentence Name}}
+ {{/each}}
+ {{/each}}
+ {{else}}
+# Enums converted to c# code.
+# - review the C# code then copy into your appropriate destination file(s).
+enums: |
+ {{#each Enums}}
+ {{#unless @first}}
+
+ {{/unless}}
+ {{#ifval SummaryText}}
+ ///
+ /// {{SummaryText}}
+ ///
+ {{/ifval}}
+ public enum {{Name}}
+ {
+ {{#each Values}}
+ {{OriginalName}}{{#unless @last}},{{/unless}}
+ {{/each}}
+ }
+ {{/each}}
+ {{/if}}
+{{/ifne}}
\ No newline at end of file
diff --git a/tools/Beef.CodeGen.Core/Templates/ReferenceDataProvider_cs.hbs b/tools/Beef.CodeGen.Core/Templates/ReferenceDataProvider_cs.hbs
index de1a1c839..22a218f37 100644
--- a/tools/Beef.CodeGen.Core/Templates/ReferenceDataProvider_cs.hbs
+++ b/tools/Beef.CodeGen.Core/Templates/ReferenceDataProvider_cs.hbs
@@ -25,12 +25,12 @@ public partial class ReferenceDataProvider : IReferenceDataProvider
partial void ReferenceDataProviderCtor(); // Enables the ReferenceDataProvider constructor to be extended.
///
- public Type[] Types => new Type[]
- {
+ public Type[] Types =>
+ [
{{#each RefDataEntities}}
typeof({{RefDataQualifiedEntityName}}){{#unless @last}},{{/unless}}
{{/each}}
- };
+ ];
///
public Task> GetAsync(Type type, CancellationToken cancellationToken = default) => _dataService.GetAsync(type{{#if Root.CancellationToken}}, cancellationToken{{/if}});
diff --git a/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiController_cs.hbs b/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiController_cs.hbs
index 31fd024e0..59abf28a9 100644
--- a/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiController_cs.hbs
+++ b/tools/Beef.CodeGen.Core/Templates/ReferenceDataWebApiController_cs.hbs
@@ -37,11 +37,11 @@ public partial class ReferenceDataController : ControllerBase
{{#each RefDataEntities}}
///
- /// Gets all of the {{see-comments RefDataQualifiedEntityName}} reference data items that match the specified criteria.
+ /// Gets all of the '{{Name}}' reference data items that match the specified criteria.
///
/// The reference data code list.
/// The reference data text (including wildcards).
- /// A {{RefDataQualifiedEntityName}} collection.
+ /// The '{{Name}}' array.
{{#ifge WebApiTags.Count 1}}
[Tags({{#each WebApiTags}}"{{.}}"{{#unless @last}}, {{/unless}}{{/each}})]
{{/ifge}}
@@ -57,7 +57,7 @@ public partial class ReferenceDataController : ControllerBase
///
/// Gets the reference data entries for the specified entities and codes from the query string; e.g: {{Root.RefDataWebApiRoute}}?entity=codeX,codeY&entity2=codeZ&entity3
///
- /// A .
+ /// The 'ReferenceDataMultiDictionary'.
{{#ifval WebApiAuthorize}}
[{{{WebApiAuthorize}}}]
{{/ifval}}
diff --git a/tools/Beef.Database.Core/Beef.Database.Core.csproj b/tools/Beef.Database.Core/Beef.Database.Core.csproj
index 8e2c19ac8..336b7eee3 100644
--- a/tools/Beef.Database.Core/Beef.Database.Core.csproj
+++ b/tools/Beef.Database.Core/Beef.Database.Core.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/tools/Beef.Database.Core/DatabaseMigratorExtensions.cs b/tools/Beef.Database.Core/DatabaseMigratorExtensions.cs
index 00b92672e..460a00222 100644
--- a/tools/Beef.Database.Core/DatabaseMigratorExtensions.cs
+++ b/tools/Beef.Database.Core/DatabaseMigratorExtensions.cs
@@ -98,7 +98,6 @@ public static Assembly[] AdjustArtefactResourceAssemblies(this DatabaseMigration
public static async Task<(bool Success, string? Statistics)> ExecuteYamlCodeGenAsync(this DatabaseMigrationBase migrator, string? schema, string[] tables, CancellationToken cancellationToken = default)
{
const string templateFileName = "Entity_yaml";
- const string tempFileName = "temp.entity.beef-5.yaml";
// Infer database schema.
migrator.Logger.LogInformation("{Content}", " ** Code-generation of temporary entity YAML requested **");
@@ -126,7 +125,7 @@ public static Assembly[] AdjustArtefactResourceAssemblies(this DatabaseMigration
?? throw new InvalidOperationException($"Embedded Template resource '{templateFileName}' is required and was not found within the selected assemblies.");
// Set the path/filename.
- var fn = Path.Combine(OnRamp.Console.CodeGenConsole.GetBaseExeDirectory(), tempFileName);
+ var fn = Path.Combine(OnRamp.Console.CodeGenConsole.GetBaseExeDirectory(), CodeGenFileManager.TemporaryEntityFilename);
var fi = new FileInfo(fn);
// Execute the code-generation proper and write contents (new or overwrite).
@@ -137,7 +136,7 @@ public static Assembly[] AdjustArtefactResourceAssemblies(this DatabaseMigration
migrator.Logger.LogWarning("{Content}", $"Temporary entity file created: {fi.FullName}");
migrator.Logger.LogInformation("{Content}", string.Empty);
migrator.Logger.LogInformation("{Content}", "Copy and paste generated contents into their respective files and amend accordingly.");
- migrator.Logger.LogInformation("{Content}", $"Once complete it is recommended that the '{tempFileName}' file is deleted, as it is otherwise not used.");
+ migrator.Logger.LogInformation("{Content}", $"Once complete it is recommended that the '{fi.Name}' file is deleted, as it is otherwise not used.");
return (true, string.Empty);
}
diff --git a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj
index fcab6ffee..cd827867f 100644
--- a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj
+++ b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj b/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj
index 429f6a1a8..42b37b361 100644
--- a/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj
+++ b/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj
index 1e6415b20..8ea5d359b 100644
--- a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj
+++ b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj
index cfa5a3b3e..03cff57ac 100644
--- a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj
+++ b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj
@@ -8,7 +8,7 @@
-
+