SteeltoeOSS / InitializrService

Reference implementation of a Steeltoe Initializr Server project generator
Apache License 2.0
5 stars 2 forks source link

project directory should be same as "name", not "namespace" #93

Closed ccheetham closed 2 years ago

ccheetham commented 3 years ago

A project generated ala:

$ http http://start.steeltoe.io/api/project name==MyProject namespace==My.Namespace -d

currently generates:

$ unzip -l MyProject.zipArchive:  MyProject.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  07-15-2021 16:53   My.Namespace/
      308  07-15-2021 16:53   My.Namespace/WeatherForecast.cs
      225  07-15-2021 16:53   My.Namespace/appsettings.json
      107  07-15-2021 16:53   My.Namespace/.gitignore
      223  07-15-2021 16:53   My.Namespace/appsettings.Development.json
      467  07-15-2021 16:53   My.Namespace/Program.cs
      333  07-15-2021 16:53   My.Namespace/My.Namespace.csproj
     1171  07-15-2021 16:53   My.Namespace/Startup.cs
      130  07-15-2021 16:53   My.Namespace/app.config
        0  07-15-2021 16:53   My.Namespace/Properties/
      777  07-15-2021 16:53   My.Namespace/Properties/launchSettings.json
        0  07-15-2021 16:53   My.Namespace/Controllers/
     1172  07-15-2021 16:53   My.Namespace/Controllers/WeatherForecastController.cs
---------                     -------
     4913                     13 files

a better project layout would be:

$ unzip -l MyProject.zipArchive:  MyProject.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  07-15-2021 16:53   MyProject/
      308  07-15-2021 16:53   MyProject/WeatherForecast.cs
      225  07-15-2021 16:53   MyProject/appsettings.json
      107  07-15-2021 16:53   MyProject/.gitignore
      223  07-15-2021 16:53   MyProject/appsettings.Development.json
      467  07-15-2021 16:53   MyProject/Program.cs
      333  07-15-2021 16:53   MyProject/My.Namespace.csproj
     1171  07-15-2021 16:53   MyProject/Startup.cs
      130  07-15-2021 16:53   MyProject/app.config
        0  07-15-2021 16:53   MyProject/Properties/
      777  07-15-2021 16:53   MyProject/Properties/launchSettings.json
        0  07-15-2021 16:53   MyProject/Controllers/
     1172  07-15-2021 16:53   MyProject/Controllers/WeatherForecastController.cs
---------                     -------
     4913                     13 files