Represents the NuGet versions.
- Issue 243: Fixed
[HttpGet("persons/{id}")]
to[HttpGet("persons/{id}, Name=Entity-Name_Operation-Name)")]
which sets theOperationId
within the OpenAPI output. - Issue 244: Fixed
Operation.HttpAgentRoute
where specified as a query string?foo=bar
; was being generated asprefix/?foo=bar
versusprefix?foo=bar
. - Fixed: Upgraded
CoreEx
(v3.18.1
) to include all related fixes and improvements.
- Fixed: Fixes to the
Template
solution to improve the initialdotnet new beef
experience, including sample Reference Data API tests. - Fixed: Upgraded
CoreEx
(v3.18.0
) to include all related fixes and improvements. - Fixed: The
EntityManager_cs.hbs
template has been updated to account for theCoreEx.Validation.ValueValidator<T>
fixes.
- Fixed: Fixes to the
Template
solution to improve the initialdotnet new beef
experience with respect to API health endpoint.
- Fixed: Fixes to the
Template
solution to improve the initialdotnet new beef
experience.
- Fixed: Upgraded
CoreEx
(v3.15.0
) to include all related fixes and improvements. - Fixed: The API Agent templates have been updated to account for the changes to the
TypedHttpClientBase
constructor signature inCoreEx
(v3.15.0
).
- Enhancement: Added
WebApiTags
code-generation property to enable the specification ofTags
for the Web API Controller class. - Enhancement: Added
dotnet run endpoints
option to report all configured endpoints providing a means to audit the generated API surface. - Enhancement: Secondary (additional) configuration files
*.entity.beef-5.yaml
,*.refdata.beef-5.yaml
,*.datamodel.beef-5.yaml
can be added to the project (including within subfolders) that will be automatically merged into the corresponding primaryentity.beef-5.yaml
,refdata.beef-5.yaml
,datamodel.beef-5.yaml
files respectively. The secondary files only support a single rootentities
property/node that merges into the primary's equivalent. This allows the configuration to be broken up logically to minimize challenges related to overall file size and complexity, and minimize potential developer merge conflicts, etc. - Fixed: The
Operation.ReturnType
was incorrectly determining and overridding nullability (Operation.ReturnTypeNullability
) which has been corrected.
- Enhancement: Added
dotnet new beef ... --services AzFunction
to enable the templating of a correspondingCompany.AppName.Services
project as an Azure Functions project. This will provide an example of leveraging the sharedCompany.AppName.Business
logic and consuming the published events using anEventSubscriberOrchestrator
. - Enhancement: The
DatabaseMapper
(stored procedures) code-generation logic has been updated to leverage the new extendedDatabaseMapperEx
. This avoids the existing reflection and expression compilation, using explicit code to perform the mapping. Can offer up to 40%+ improvement in some scenarios. Where existing behavior is required then set YAMLdatabaseMapperEx: false
in theentity.beef-5.yaml
file (root and/or entity within hierarchy).
- Enhancement: Added PostgreSQL database support:
- Leverages both
CoreEx.Database.Postgres
(runtime) andDbEx.Postgres
(migration) packages; encapsulates theNpgsql
package. - The
Npgsql.EntityFrameworkCore.PostgreSQL
package is used for the entity framework provider. - The
dotnet new beef
template updated to support newdatasource
option ofpostgres
.
- Leverages both
- Enhancement: Additional improvements for data migration and code-generation, including
SqlServer
andMySql
, as a result ofDbEx
(v2.5.0
) enhancements.
- Fixed: Simplified YAML specification where only a custom manager is required to be implemented. For an
operation
settype: CustomManagerOnly
, this is a shorthand fortype: Custom, managerCustom: true, excludeIDataSvc: true, excludeDataSvc: true, excludeIData: true, excludeData: true
(i.e. these other properties will no longer need to be set explicitly).
- Fixed: Upgraded
CoreEx
(v3.9.0
) andDbEx
(v2.4.0
) to include all related fixes and improvements; including dependentUnitTestEx
(v4.0.1
) and relatedNUnit
(v4.0.1
) upgrades. - Enhancement: Updated the
dotnet new beef
template to targetnet8.0
and updatedNUnit
.- Note:
MySQL
includes dependencyPomelo.EntityFrameworkCore.MySql
(8.0.0-beta.2
) that enablesnet8.0
; this will be updated to the official release version when ready.
- Note:
- Fixed: Upgraded
CoreEx
(v3.8.0
) to include all related fixes and improvements;WebApi
class supports returning value ofIActionResult
as-is. - Enhancement: Updated code-generation to support
IActionResult
return type forWebApi
operations. The followingoperation
YAML properties enable:- New
webApiProduces: [ 'text/plain' ]
where the value is aProduces
content type array (supports multiple) to override the default; for example[Produces("text/plain")]
. - New
webApiProducesResponseType: none
indicates that the resulting generated code does not include the response type; for example[ProducesResponseType((int)HttpStatusCode.OK)]
.
- New
- Fixed: Upgraded
CoreEx
(v3.7.2
) to include all related fixes and improvements; updated reference data code-generation template and samples as a result.
- Fixed: The
clean
code-generation command supports new path exclusion capabilities; seedotnet run -- --help
for details. - Fixed: The
count
code-generation command has been added to report the total number of files and lines for all and generated code.
- Fixed: The
Entity.HttpAgentCustomMapper
property has been added to the schema to correctly include within code-generation. - Fixed: Upgraded
CoreEx
(v3.7.0
) to include all related fixes and improvements.
- Fixed: All related package dependencies updated to latest.
- Enhancement:
UnitTestEx
as ofv4.0.0
removed all dependencies toCoreEx
; the equivalent functionality has been included in newCoreEx.UnitTest
andCoreEx.UnitTest.NUnit
(v3.6.0
) packages. Replace existingUnitTestEx.NUnit
package with the correspondingCoreEx.UnitTesting.NUnit
package.- Unfortunately, this change has resulted in a number of breaking changes that will require manual remediation to existing unit tests; see the
UnitTestEx
change log andCoreEx
change log for details and instructions to remediate. - Upgraded
CoreEx
(v3.6.0
) to include all related fixes and improvements. - Upgraded
UnitTestEx
(v4.0.0
) to include all related fixes and improvements
- Unfortunately, this change has resulted in a number of breaking changes that will require manual remediation to existing unit tests; see the
- Enhancement: Added
net7.0
andnet8.0
support.
- Fixed: The
yaml
sub-command generated code updated to leverage the newEntity.Behavior
, beingbehavior: cgupd
, where CRUD capabilities are requested.
- Fixed:
Entity.Crud
deprecated and replaced with newEntity.Behavior
to enable improved flexibility in specifying which CRUD-style operation(s) are to be implemented: 'C'reate, 'G'et (or 'R'ead), 'U'pdate, 'P'atch and 'D'elete, GetByArgs ('B') and GetAll ('A'). Any combination (or order) can be provided to auto-generate versus specifiying individual properties (which can still be used if applicable). Wherecrud: true
was previously specified, this should be replaced withbehavior: cgupd
(note that code-generation will error where not updated). - Fixed:
Entity.WebApiRoutePrefix
no longer applied to theController
class using theRoute
attribute; now always included as the full path specified within the HTTP method attribute per operation. TheOperation.WebApiRoute
can now be prefixed with a!
character to indicate that theEntity.WebApiRoutePrefix
should not be applied; i.e. the supplied value is leveraged as-is. This enables more scenarios for theEntity.Behavior
above to be used, as often it was the route value that necessitated full operation specification within YAML. - Fixed: Related
httpAgentRoute
configuration and resulting code-generation implemented similar to above for consistency. - Fixed: Upgraded
CoreEx
(v3.4.1
) andDbEx
(v2.3.12
) to include all related fixes and improvements; updateDataSvc
template to leverage new (simplified)Result
-based caching capabilities.
- Fixed: Upgraded
CoreEx
(v3.4.0
) to include all related fixes and improvements; updated template and samples as a result.
- Fixed: The
Operation.Type
entity code-generation attribute explicitly defaults toCustom
where not specified. - Fixed: Reference data entity code-generation adds
NotNullIfNotNullAtrribute
to correct null compiler warnings. TheSystem.Diagnostics.CodeAnalysis
namespace may need to be added to theGlobalUsings
to enable. - Fixed: Improved the default
Parameter.Text
and enabledParameter.WebApiText
to override explicity where required.
- Fixed: Entity was not correctly generated where default value was specified to ensure correct
IsInitial
logic. - Fixed: Entity was not correctly generated where
RefDataList
was specified; code-gen output improved.
- Fixed: Enhanced the default
Entity.RefDataType
behaviour; will default to rootCodeGeneration.RefDataType
(new), where specified to simplify configuration. - Fixed: Enhanced the default
Entity.Collection
behaviour; will default totrue,
whereRefDataType
is specified as this is required. - Fixed: Enhanced the default
Entity.AutoImplement
behaviour; will default to rootCodeGeneration.AutoImplement
(new), where specified to simplify configuration. - Fixed: Enhanced the default
Entity.WebApiRoutePrefix
behaviour; will default toEntity.Name
pluralized and lowercase, whereRefDataType
is specified as this is required.
- Fixed: Enhanced the default
Entity.Text
andProperty.Text
code-generation attributes where not specified to be more meaningful/descriptive.
- Fixed: Added new
Entity.Crud
code-generation attribute which represents a shorthand forCreate
,Get
(read),Update
(includesPatch
) andDelete
.
- Fixed: The previous
excludeData: RequiresMapper
fix inadventently resulted in errant mapper code for the reference data code-generation which has been corrected.
- Enhancement: The database code-generation (
Beef.Database.*
) now supports ayaml
sub-command that will generate the basic Beef Entity YAML, and basic validation logic, by inferring the database configuration for the specified tables into a temporarytemp.entity.beef-5.yaml
file. The developer is then responsible for the copy and paste of the required yaml and .NET code, into their respective artefacts and further amending as appropriate. After use, the developer should remove thetemp.entity.beef-5.yaml
file as it is otherwise not referenced/used. This enhancement by no means endorses the direct mapping between entity and database model as the developer is still encouraged to reshape the entity to take advantage of object-orientation and resulting JSON capabilities. Beef still enforces a separation between entity and model even where a one-to-one match. Finally, usedotnet run -- --help
to see all command-line options/capabilities for this. - Fixed: The
excludeData: RequiresMapper
no longer needs to be explicitly set as this is now inferred from the usage of anautoImplement
for theentity
YAML configuration.
- Fixed: Updated
DbEx
(v2.3.8
) andOnRamp
(v1.0.8
). - Fixed: Updated
UnitTestEx
(3.1.0
):- The
ApiTester.SetUp.ExpectedEventsEnabled = true
should be replaced withApiTester.UseExpectedEvents()
where an event error occurs during test execution. - Value-based test expectations are updated to support explicit JSON paths, as a result some new errors may be reported (previously ignored in error) - note that JSON paths for arrays should not include the index.
- The
- Fixed: Upgraded
CoreEx
tov3.3.0
to include all related fixes and improvements related to distributed tracing. - Fixed: Code-generation templates updated to support any breaking changes related to
InvokerBase
.
- Enhancement: Upgraded
CoreEx
tov3.0.0
which resulted in a number of breaking changed that will require manual remediation:- The
CoreEx.WebApis
capabilities have been moved to the newCoreEx.AspNetCore.WebApis
namespace; within a new seperate project/packageCoreEx.AspNetCore
. This package will need to be referenced where required, and the namespace updated accordingly.
- The
- Enhancement: Leverages the new
Result
andResult<T>
railway-oriented programming capabilities introduced inv3
to minimize the number of thrown exceptions (of the non-exceptional variety), to improve performance and, the development and debugging experience.- A significant number of the underlying code-generation templates have been modified to support
v3
changes/fixes and general improvements; as such all code-generation should be re-run. Note that by default the generated code will leverageResult
andResult<T>
; for backwards compatibility setwithResult: false
within theentity.beef-5.yaml
. - Also, note that
v3
may introduce some breaking changes that will need manual remediation. The validationOnValidateAsync
andCustomRule
must now return aResult
. Where using, consider leveraging theResult.XxxError()
methods to return known errors versus throwing the related exception.
- A significant number of the underlying code-generation templates have been modified to support
- Enhancement: Code-generation API log output will state
<NoAuth>
explicitly where no authorization has been specified using the correspondingwebApiAuthorize
YAML configuration. - Enhancement: Where leveraging MySQL the template now uses the Pomelo.EntityFrameworkCore.MySql package; this has greater uptake and community supporting than the equivalent Oracle-enabled MySql.Data.EntityFrameworkCore package.
- Enhancement: The preprocessor directives are no longer generated by default for the C# artefacts, to re-include use the
preprocessorDirectives
YAML configuration. This relates to the existing#nullable enable
and#pragma warning disable
preprocessor directives. These will be deprecated in a future release.
- Fixed: Upgraded
CoreEx
andUnitTestEx
to latest packages to include all related fixes.
- Enhancement: Added new code-generation configuration property
ValidationFramework
that supports eitherCoreEx
(default) orFluentValidation
(uses theCoreEx.FluentValidation
interop wrapping capabilities) to allow entity validation to be performed using either framework. Supports mix-and-matching where required. TheCoreEx.Validation
framework is still leveraged forIsMandatory
andValidatorCode
logic where specified. - Issue 208:
ReferenceDataController.GetNamed
now excluded from Swagger output as results in superfluous types/models. - Issue 209: New
PagingAttribute
added to theController
code-gen wherePagingArgs
is selected to outputPagingArgs
parameters to corresponding Swagger output. RequiresPagingOperationFilter
to be added at start up to function. - Fixed: Upgraded
CoreEx
,DbEx
andUnitTestEx
to latest packages to include all related fixes.
- Fixed: Upgraded
DbEx
tov2.3.4
; this included fix to assembly management/probing that required minor internal change to enable correctly withinSqlServerMigration
andMySqlMigration
.
- Enhancement: The Manager-layer
Clean.CleanUp
is now only performed where explicitly configured; withinCodeGeneration
,Entity
(s) and/orOperation
(s) YAML. Cleaning is a feature that is generally infrequently used and is best excluded unless needed. - Enhancement: Code-generation console logging updated to output the generated endpoints to provide an audit of the generated API surface.
- Fixed: The
CoreEx.Mapping.Mapper
withinCoreEx v2.6.0
resolved initializing nullable destination properties during aFlatten
; however, this needed additional mapping configuration generated to enable. The generated mapping code was updated to enable, whilst also simplifing generated output, further enabling opportunities to override methods where required. - Fixed: Entity code generation output updated to assign correct property name (
INotifyPropertyChanged
) for all reference data properties.
- Fixed: The
CodeGenConfig.WarnWhereDeprecated
was checking some incorrectly cased property names. - Fixed: The
AgentTester<TEntryPoint>
has been updated to allow a parameterlessCreateWaf
, as well as exposing the internalParent
property.
- Fixed: Upgraded
CoreEx
,DbEx
andUnitTestEx
to latest packages to include all related fixes. Template solution updated to leverageapp.UseReferenceDataOrchestrator()
to specifically include.
Represents the initial commit for Beef version 5.x. All assemblies/packages now share the same version and change log; i.e. they are now published as a set versus individually versioned (prior releases). This version is a major refactoring from the prior; to achieve largely the same outcomes, in a modernized decoupled manner.
As stated in the README, Beef is now (as of version 5.x) ostensibly the code-generation engine, and solution orchestration, that ultimately takes dependencies on the following capabilities to enable the end-to-functionality and testing thereof in a standardized (albeit somewhat opinionated) manner:
- CoreEx - provides the core runtime capabilities (extends .NET core);
- UnitTestEx - provides extended unit and intra-domain integration testing;
- DbEx - provides extended database management capabilities ;
- OnRamp - provides the underlying code-generation engine functionality.
Prior to version 5.x, Beef was all encompassing. These capabilities have been extracted, simplified and refactored to be first class frameworks in their own right, and made into the repos listed above. This allows them to be used and maintained independently to Beef; therefore, offering greater opportunities for reuse versus all-or-nothing.