-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider YAML as template format #43
Labels
enhancement
New feature or request
Comments
I think we should stick to Razor for templating as it is almost native to aspnet core. |
Hey, it's actually a nice idea! I'll take a closer look on this possiblity as it would be better aligned with Mockaco's proposal instead of YAML format, which I've been resistant to embrace, to be honest. I would appreciate if you could provide more details, maybe some kind of template examples of how your approach would look like. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
To use the scripting engine on mock templates, most of times there is a need to write an invalid JSON structure, like this:
Describe the solution you'd like
YAML seems to be suitable alternative to write templates with C# scripts, as it is more permissive on content, like the example bellow, which is a completely valid YAML:
There is a C# implementation: YamlDotNet
Describe alternatives you've considered
To use mustache or handlebars templating alternatives would require a DSL to be created. This alternative is not suitable for Mockaco as its proposal is to reduce the learning curve, keeping C# as the scripting language.
Additional context
There are some disadvantages using YAML:
The text was updated successfully, but these errors were encountered: