You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots and lots of updates to this release with things I've been wanting to add and more lessons learned as I continue to dogfood things.
Some of the major items in here:
.NET 6 scaffolding. Everything is now scaffolded using .NET 6, implicit usings, shortened namespacing, and more. I didn't consolidate Startup and Program yet, but may in v0.13.
In memory Authorization Server scaffolding. This is a step towards a what I hope will be a ton of time savings. You can now scaffold out an in memory duende auth server along with your new projects. It is mostly based one the official duende template, with some slight differences. For exmaple, I didn't add consent pages in yet, but has some additional features like Tailwind CSS styling for the main pages. You can easily check out an exmaple with...
A new new:example command. I wanted to make it really easy to see examples for different types of scenarios, so I added a new command to easily get something together. Just runcraftsman new:example and follow the prompts!
All entities will now inherit from a BaseEntitiy that has a standardized Id Guid for your primary key and audit fields as well. These will be updated for you OOTB in db context now.
There's so much more as well. I think the project scaffolding is really moving in a good direction and is getting closer to a more stable position. Lots to add still, but it's at least starting to feel more mature.
As always, check out the docs for updates.
Also, I started a discord channel if you want to come join us! Feel free to reach out if you have any questions or issues.
🚀 Additions and Updates
Added BaseEntity that all entities will inherit from.
Contains a Guid of Id marked as the primary key
Contains CreatedOn, CreatedBy, LastModifiedOn, and LastModifiedBy properties
Added a CurrentUserService to add a user to the CreatedBy and LastModifiedBy properties if a user is found. Built into db context
Added built in features to the add:feature command
New AddListByFk option for the add:feature command and Feature property of an entity.
New craftsman example or craftsman new:example command to create an example project with a prompted workflow to select. Basic, WithAuth, AuthServer, WithBus
Added .DS_Store and .env to gitignore
Added Consumer test
Added provider to test fixture when adding a bus
Added a mock IPublishEndpoint service to TestFixture when using MassTransit
update docs that mediatr handler tests aren't broken when pubilshing anymore
New policies added to swagger on add:entity scaffolding
New add:authserver command as well as an AuthServer option when creating a domain
No consent support (yet)
Added helper GetService method to TestFixture
Added Creation and Update Validators back to scaffolding. Easy enough to delete if you aren't using them
Added a NamingConvention property to the db template
options are:
Class
SnakeCase
LowerCase
CamelCase
UpperCase
Updated to .NET 6
Updated nuget packages
Inlcudes a major release of Fluent Assertions that required updates to:
Functional test assertions (use HttpStatusCode.XXX)
Integration tests TestBase update for postgresto include 1.Seconds()
Integration test updates to await act.Should().ThrowAsync< where appropriate
Moved Policies to Feature
There is no more primary key property. A Guid with a name Id will be inherited by all entities.
Docker utilities for integration test refactored to use Fluent Docker wherever possible for better readability. Some enhancements were made as well (e.g. better container/volume naming, proper volume mounting).
Removed ErrorHandlerMiddleware and replaced it with ErrorHandlerFilterAttribute
Updated built in Exceptions
Updated thrown errors and associated tests in the features
Cleaned up test names
Modified CORS util to take in env
Added Secret back to Environment options
Added local config utilities for testing environments
Remove UseInMemoryDb app setting in favor of environment specific checks
Remove UseInMemoryBus app setting in favor of environment specific checks
Using statement shortening for reset function in test fixture
Consolidated multiple environments startups to one startup file
Update logging registration in Program.cs to no longer rely on appsettings
Updated FK support to better API
Moved env config from appsettings to environment variables
Production env no longer added by default
Features now include missing cancellation tokens as well as AsNoTracking properties
Removed automatic fluent validation to allow more control in domain operations. For example:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Release Notes
Lots and lots of updates to this release with things I've been wanting to add and more lessons learned as I continue to dogfood things.
Some of the major items in here:
Startup
andProgram
yet, but may in v0.13.new:example
command. I wanted to make it really easy to see examples for different types of scenarios, so I added a new command to easily get something together. Just runcraftsman new:example
and follow the prompts!BaseEntitiy
that has a standardizedId
Guid for your primary key and audit fields as well. These will be updated for you OOTB in db context now.There's so much more as well. I think the project scaffolding is really moving in a good direction and is getting closer to a more stable position. Lots to add still, but it's at least starting to feel more mature.
As always, check out the docs for updates.
Also, I started a discord channel if you want to come join us! Feel free to reach out if you have any questions or issues.
🚀 Additions and Updates
Added
BaseEntity
that all entities will inherit from.Guid
ofId
marked as the primary keyCreatedOn
,CreatedBy
,LastModifiedOn
, andLastModifiedBy
propertiesAdded a
CurrentUserService
to add a user to theCreatedBy
andLastModifiedBy
properties if a user is found. Built into db contextAdded built in features to the
add:feature
commandNew
AddListByFk
option for theadd:feature
command andFeature
property of an entity.New
craftsman example
orcraftsman new:example
command to create an example project with a prompted workflow to select.Basic
,WithAuth
,AuthServer
,WithBus
Added
.DS_Store
and.env
to gitignoreAdded Consumer test
Added
provider
to test fixture when adding a busAdded a mock
IPublishEndpoint
service toTestFixture
when using MassTransitNew policies added to swagger on
add:entity
scaffoldingNew
add:authserver
command as well as anAuthServer
option when creating a domainAdded helper
GetService
method toTestFixture
Added Creation and Update Validators back to scaffolding. Easy enough to delete if you aren't using them
Added a
NamingConvention
property to the db templateUpdated to .NET 6
Updated nuget packages
HttpStatusCode.XXX
)TestBase
update for postgresto include1.Seconds()
await act.Should().ThrowAsync<
where appropriateMoved Policies to Feature
There is no more primary key property. A Guid with a name
Id
will be inherited by all entities.Docker utilities for integration test refactored to use Fluent Docker wherever possible for better readability. Some enhancements were made as well (e.g. better container/volume naming, proper volume mounting).
Removed
ErrorHandlerMiddleware
and replaced it withErrorHandlerFilterAttribute
Cleaned up test names
Modified CORS util to take in env
Added
Secret
back to Environment optionsAdded local config utilities for testing environments
Remove
UseInMemoryDb
app setting in favor of environment specific checksRemove
UseInMemoryBus
app setting in favor of environment specific checksUsing statement shortening for reset function in test fixture
Consolidated multiple environments startups to one startup file
Update logging registration in
Program.cs
to no longer rely onappsettings
Updated FK support to better API
Moved env config from appsettings to environment variables
Production env no longer added by default
Features now include missing cancellation tokens as well as
AsNoTracking
propertiesRemoved automatic fluent validation to allow more control in domain operations. For example:
WebApiServiceExtension
by updating.AddFluentValidation(cfg => { cfg.AutomaticValidationEnabled = false; });
🐛 Pest Control
409
produced response annotation on POSTThis discussion was created from the release v0.12.0.
Beta Was this translation helpful? Give feedback.
All reactions