Skip to content
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

Epic: Replace template engine #263

Closed
RicoSuter opened this issue Aug 31, 2016 · 6 comments
Closed

Epic: Replace template engine #263

RicoSuter opened this issue Aug 31, 2016 · 6 comments

Comments

@RicoSuter
Copy link
Owner

RicoSuter commented Aug 31, 2016

Missing feature: Compile template at runtime... so that templates can be customized on a per template basis

In the future, we will use DotLiquid as template engine in NSwag and NJsonSchema to support template customizations, etc.

Documentation: https://github.com/RSuter/NSwag/wiki/Templates
Also see https://github.com/NSwag/NSwag/wiki/Roadmap

Implications:

  • The template model classes are part of the public API and must be stable after this changes (because people start to customize parts of the templates which are coupled to the model classes).
@RicoSuter RicoSuter changed the title Find good PCL 259 template engine to generate code Replace T4 templates with customizable template engine May 5, 2017
@RicoSuter RicoSuter self-assigned this May 5, 2017
@RicoSuter RicoSuter added this to the vNext milestone May 24, 2017
@RicoSuter RicoSuter changed the title Replace T4 templates with customizable template engine Replace T4 templates with customizable template engine, v12 May 24, 2017
@RicoSuter RicoSuter changed the title Replace T4 templates with customizable template engine, v12 Epic: Replace T4 templates with customizable template engine, v12 Oct 5, 2017
@RicoSuter
Copy link
Owner Author

Ref: RicoSuter/NJsonSchema#404

@RicoSuter RicoSuter changed the title Epic: Replace T4 templates with customizable template engine, v12 Epic: Replace template engine Oct 10, 2017
@RicoSuter
Copy link
Owner Author

@RicoSuter
Copy link
Owner Author

RicoSuter commented Oct 19, 2017

T4 to Liquid regexes:

<#=Model.(.*?)#>
{{ $1 }}

<#=(.*?)#>
{{ $1 }}

<#(.*?)#>
{% $1 -%}

@RicoSuter
Copy link
Owner Author

@RicoSuter
Copy link
Owner Author

RicoSuter commented Oct 20, 2017

Notepad++ language for liquid:

liquid_notepadpp.zip

@RicoSuter
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant