Netspark.CleanArchitecture.Scaffold 2.0.0-beta

This is a prerelease version of Netspark.CleanArchitecture.Scaffold.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Netspark.CleanArchitecture.Scaffold --version 2.0.0-beta
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Netspark.CleanArchitecture.Scaffold --version 2.0.0-beta
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Netspark.CleanArchitecture.Scaffold&version=2.0.0-beta&prerelease
nuke :add-package Netspark.CleanArchitecture.Scaffold --version 2.0.0-beta

Netspark.CleanArchitecture.Scaffolder

This is a dotnet tool for generating clean architecture commands, queries controllers along with respective unit and integration test stubs.

CLI Options

a:gen-api                       Generate controllers and actions
c:config-file                   Configuration file in yaml format for this tool (absolute or relative to the command process working directory)
d:gen-commands                  Generate applicaiton commands
e:gen-events                    Generate events for executed commands
h:gen-handlers                  Generate applicaiton command/query handlers
i:gen-integration-tests         Generate integration tests
m:merge-strategy                Merge strategy for the scaffolding: Append|Overwrite|Skip
o:output-folder                 The root folder for commands/queries tree generation (absolute or relative to the command process working directory)
q:gen-queries                   Generate applicaiton queries
u:gen-unit-tests                Generate unit tests
v:gen-validators                Generate fluent validators for commands or queries
-?, help                        Show this help message

Config File Structure

There are 2 variants of the cleanasc.yaml file structure.

Variant 1: Only Domains Document

# Domains
---
Global:
  Commands:
    - CreateCountry
    - DeleteCountry
    - CreateLanguage
    - DeleteLanguage
    - CreateCurrency
    - RemoveCurrency
  Queries:
    - GetCurrenciesList
    - GetLanguagesList
    - GetCountriesList
Customer
  Commands:
    - UpsertCustomer
    - DeleteCustomer
  Queries:
    - GetCustomersList
    - GetCustomerDetail

Variant 2: Settings and Domains Documents

# Settings
---
Namespace: NorthwindTraders 
DbContext: NorthwindDbContext
SrcPath: ./Src
TestsPath: ./Tests
ApiUrlPrefix: api/v1

# Domains
---
Global:
  Commands:
    - CreateCountry
    - DeleteCountry
    - CreateLanguage
    - DeleteLanguage
    - CreateCurrency
    - RemoveCurrency
  Queries:
    - GetCurrenciesList
    - GetLanguagesList
    - GetCountriesList
Customer
  Commands:
    - UpsertCustomer
    - DeleteCustomer
  Queries:
    - GetCustomersList
    - GetCustomerDetail

Settings.SrcPath and Settings.TestsPath can be either absolute or relative to the folder, containing this yaml configuration.

Folder containing yaml config file is treated as source of the merge process, i.e. files in there will be probed for existence before executing merge strategy. If passed in config-file is located in output-folder, the process will do merge as well as if you want to write generated files into another directory.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
2.0.1 1,111 7/20/2023
2.0.0 1,004 7/18/2023
2.0.0-beta 1,102 7/15/2023
1.4.3 1,145 4/28/2021
1.4.2 1,104 4/28/2021
1.4.1 1,085 4/28/2021
1.3.2 1,031 4/28/2021
1.3.1 1,273 10/31/2020
1.2.2 1,339 10/31/2020
1.2.1 1,198 3/24/2020
1.1.6 1,438 1/2/2020
1.1.5 1,243 12/24/2019
1.1.4 1,315 12/23/2019
1.0.3 1,449 12/17/2019
1.0.2 1,471 12/15/2019
1.0.1 1,382 12/15/2019
1.0.0 1,517 12/15/2019

- Controllers and integration tests are generated for each entity (inferred from query name)
     - Fixed usings template generator issues
     - Fixed integration test generator issues
     - Fixed namespace for integration test fixture
     - Fixed pathname for controllers in *nix systems
     - Added config params for UiSuffix and UiPath
     - Added config params for AppPath
     - Extended controller actions annotations
     - Separate controllers for each subdomain
     - Optional generation of test files
     - Support of dotnet7