dlcs / protagonist

MIT License
7 stars 2 forks source link

Validate appsettings #154

Open donaldgray opened 3 years ago

donaldgray commented 3 years ago

Protagonist uses Options pattern for accessing strongly typed appSettings.

These should be validated on startup to ensure apps are only started when config meets expected requirements.

See DataAnnotations validation and FluentValidator validation options - there are likely alternatives too.

donaldgray commented 11 months ago

Note that an initial implementation of this has been added to API and it is preventing startup if validation fails but error/reason is not output. This may be down to serilog log config but unsure