acacode / swagger-typescript-api

Generate the API Client for Fetch or Axios from an OpenAPI Specification
MIT License
3.37k stars 361 forks source link

Claims to be using a template, but actually - not #935

Open OnkelTem opened 1 month ago

OnkelTem commented 1 month ago

I use STA via its API like this:

generateApi({ input: this.specLocalPath,, templates: 'templates', })

where templates directory contains all the templates copied from templates/base and templates/base.

In interface-data-contract I added a line:

<%
throw new Error('here')
%>

Now when I run the generator, I see that the template was located:

✨   "interface data contract" template found in "/projects/project/templates"

however the added line isn't being hit. Which means that the template isn't used.

What is going on here?

Version: 13.0.16 (the recent working one, see #934)