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

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

Open
OnkelTem opened this issue Sep 23, 2024 · 1 comment
Open

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

OnkelTem opened this issue Sep 23, 2024 · 1 comment

Comments

@OnkelTem
Copy link

OnkelTem commented Sep 23, 2024

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)

@smorodin-it
Copy link

Have same problem. When I run generate command, all custom content that I add to http-client.ejs template - generated, but all modifications in interface-data-contract.ejs template completely ignored.

I run swagger-typescript-api -p http://127.0.0.1:3000/swagger/doc.json -o ./src/data-access -t ./sta-templates --axios --modular,

sta-templates dir have all templates.

Can't use newer version of library because this bug #853

"swagger-typescript-api": "12.0.4"

node: 20.16.0
pnpm: 9.7.0

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

No branches or pull requests

2 participants