CleanArchitecture icon indicating copy to clipboard operation
CleanArchitecture copied to clipboard

✨ Implement API only option in template

Open Lanz86 opened this issue 2 years ago • 4 comments

API only template version #776 implemented flag apiOnly

the command created solution with Angular

dotnet new ca-sln

Create solution without Angular dotnet new ca-sln --apiOnly=true

Lanz86 avatar Jan 29 '23 11:01 Lanz86

I suppose the nswag typescript client generation needs to be deactivated too. (if not already done)

JohanHeyvaert avatar Feb 22 '23 11:02 JohanHeyvaert

I suppose the nswag typescript client generation needs to be deactivated too. (if not already done) Yes is implemented you find directive in src/WebUI/nswag.json line 63 - 128

Lanz86 avatar Feb 22 '23 12:02 Lanz86

@Lanz86 thank you for the contribution. The updated template supports both Angular and React, but not API only. I think we are now in a good position to implement API only too. The approach will need to change. If you look at the new template.json you can see the following parameter:

    "clientFramework": {
      "type": "parameter",
      "datatype": "choice",
      "choices": [
        {
          "choice": "angular",
          "description": "Use Angular"
        },
        {
          "choice": "react",
          "description": "Use React"
        }
      ],
      "defaultValue": "angular",
      "description": "The type of client framework to use"
    },

I think API only can be implemented by adding the choice none, for example:

        {
          "choice": "none",
          "description": "Use API only"
        },

What do you think? Do you want to tackle this change?

jasontaylordev avatar Jun 28 '23 11:06 jasontaylordev

Ok @jasontaylordev sounds good. I will take care of it.

Lanz86 avatar Jun 29 '23 08:06 Lanz86

Closed this PR and created new to support a none choice in clientFramework symbols https://github.com/jasontaylordev/CleanArchitecture/pull/886

Lanz86 avatar Jul 01 '23 10:07 Lanz86