Provide a Way to Validate Templates
See original GitHub issueIt’s very easy to build and deploy a broken template. In particular, you might add complicated symbols that cause the project to fail to build when the user selects certain options. One way to help solve this is to validate the template. The validator would
- Validate the
template.json
file. - Create the template with the default symbols, build it, maybe run it using the ASP.NET Core TestHost API to ensure it works.
- Foreach symbol, provide a non-default value, then build it, maybe run it using the ASP.NET Core TestHost API.
I’m currently planning to do the above using xUnit tests. However, you might know a better way using the templating internals and Roslyn perhaps?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Validating a template - AWS CloudFormation
The aws cloudformation validate-template command is designed to check only the syntax of your template. It does not ensure that the property values...
Read more >Is there a way to validate CloudFormation templates before ...
After installing Perun, to validate the template you can use the command validate: ~ $ perun validate <PATH TO THE TEMPLATE>.
Read more >validate-template — AWS CLI 2.13.11 Command Reference
Description¶. Validates a specified template. CloudFormation first checks if the template is valid JSON. If it isn't, CloudFormation checks if the template ......
Read more >Validating a Template - Using Oracle Cloud Stack
Access the Oracle Cloud Stack console, and then click Templates. Click Unpublished. Click the template that you want to validate. The Template Builder...
Read more >Resolve template validation or template format errors in ...
How do I resolve template validation or template format errors in CloudFormation? ... make sure that you're using the most recent version of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve written some code to run tests against a template that lets you do this:
Right now it all works but with one issue remaining.
DotnetRun
dynamically loads the published assemblies and attempts to bootstrap the Startup class using the ASP.NET Core TestHost. Unfortunately, loadingSwashbuckle.AspNetCore
causes aTypeLoadException
. It seems to have trouble with third party libraries. I’d really appreciate any help as I’m at a loss.@mlorbetske My framework is still work in progress. I managed to get it working (including starting up an ASP.NET Core site using the
TestHost
API and executing some requests) but I had to restore, build and pubslish it as a standalone app, so it includes all the DLL’s in one folder.I currently have issue https://github.com/dotnet/corefx/issues/21982 open in the corefx repository to see if I can do the above using a normal non-standalone publish. Once I’ve sorted this issue, I’ll release my code as a NuGet package for all to play use and profit from.