kjayasa / swagger-ts-client

A tool to generate typescript http clients and types from swagger definitions
MIT License
27 stars 24 forks source link

Is there a way to check condition and then generate a template in the handle bar? #1

Closed srirajmadhavan closed 6 years ago

srirajmadhavan commented 6 years ago

really handy tool - helped me setup angular 4 services in less than half hour for a full project rebuild. By default handle bars does not allow if comparisons - so how to get a custom filter injected to the process. like

handlebars.registerHelper('xif', function(v1, v2, options) { if(v1 === v2) { return options.fn(this); } return options.inverse(this); });

kjayasa commented 6 years ago

Unfortunately swaggerer-ts-client does not have a way to register custom handle bar extensions for now.This is some thing that we can look at in the future.

kjayasa commented 6 years ago

Added this feature in the release 0.9.5