Skip to content

Commit a72736c

Browse files
authored
Merge pull request #68 from 74nu5/fix/docs-and-sample
Make the landing example and the web API sample true
2 parents af60d13 + 0dcd2ba commit a72736c

11 files changed

Lines changed: 19 additions & 625 deletions

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,3 +429,9 @@ FodyWeavers.xsd
429429
# before delta output became the default.
430430
/tests/IntegrationTests/SampleProject/appsettings*.json
431431
/tests/IntegrationTests/SampleProject/cli-output/
432+
433+
# Compiler output for the samples. The .settex sources are the artefacts worth
434+
# committing; their generated JSON went stale silently — still merged content from
435+
# before delta output became the default, and missing files for environments added
436+
# since.
437+
/samples/**/appsettings*.json

docs-site/Pages/Home.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ else
120120

121121
private const string Generated = """
122122
{
123-
"ApplicationName": "MyApp",
124123
"Logging": {
125124
"LogLevel": { "Default": "Warning" }
126125
},

samples/SampleWebApi/appsettings.Development.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

samples/SampleWebApi/appsettings.Production.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

samples/SampleWebApi/appsettings.Staging.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

samples/SampleWebApi/appsettings.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

samples/SampleWebApi/appsettings.settex

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Secrets are NOT stored here. Keys like JwtSettings.SecretKey carry an obvious
2+
# placeholder so the shape of the configuration is visible; the real value is supplied
3+
# at deployment through .NET's environment-variable or user-secrets provider, which
4+
# layers on top of these files. Settex interpolation resolves 'let' bindings at compile
5+
# time — it is not a placeholder for runtime environment variables.
6+
17
// Sample Web API Configuration
28
// This file demonstrates Settex syntax with a realistic ASP.NET Core Web API setup
39

@@ -89,7 +95,7 @@ env "Staging" {
8995
ConnectionStrings.DefaultConnection = "Server=staging-sql.example.com;Database=SampleWebApiDb;User Id=apiuser;Password=StaginPass123;Encrypt=true"
9096
ConnectionStrings.CacheConnection = "staging-redis.example.com:6379"
9197

92-
JwtSettings.SecretKey = "${JWT_SECRET_STAGING}"
98+
JwtSettings.SecretKey = "set-at-deployment"
9399
JwtSettings.ExpirationMinutes = 120
94100

95101
RateLimiting.Enabled = true
@@ -99,7 +105,7 @@ env "Staging" {
99105
Features.EnableMetrics = true
100106

101107
ExternalServices.EmailService.Provider = "SendGrid"
102-
ExternalServices.EmailService.ApiKey = "${SENDGRID_API_KEY_STAGING}"
108+
ExternalServices.EmailService.ApiKey = "set-at-deployment"
103109
}
104110
}
105111

@@ -109,10 +115,10 @@ env "Production" {
109115
Logging.LogLevel.Default = "Warning"
110116
Logging.LogLevel.Microsoft.AspNetCore = "Error"
111117

112-
ConnectionStrings.DefaultConnection = "${DATABASE_CONNECTION_STRING}"
113-
ConnectionStrings.CacheConnection = "${REDIS_CONNECTION_STRING}"
118+
ConnectionStrings.DefaultConnection = "set-at-deployment"
119+
ConnectionStrings.CacheConnection = "set-at-deployment"
114120

115-
JwtSettings.SecretKey = "${JWT_SECRET_KEY}"
121+
JwtSettings.SecretKey = "set-at-deployment"
116122
JwtSettings.ExpirationMinutes = 30
117123
JwtSettings.RefreshTokenExpirationDays = 30
118124

@@ -125,11 +131,11 @@ env "Production" {
125131
Features.EnableHealthChecks = true
126132
Features.EnableMetrics = true
127133

128-
ExternalServices.WeatherApi.ApiKey = "${WEATHER_API_KEY}"
134+
ExternalServices.WeatherApi.ApiKey = "set-at-deployment"
129135
ExternalServices.WeatherApi.TimeoutSeconds = 10
130136

131137
ExternalServices.EmailService.Provider = "SendGrid"
132-
ExternalServices.EmailService.ApiKey = "${SENDGRID_API_KEY}"
138+
ExternalServices.EmailService.ApiKey = "set-at-deployment"
133139
ExternalServices.EmailService.FromAddress = "noreply@sampleapi.com"
134140
}
135141
}

samples/complete-v2-features/appsettings.Development.json

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)