question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to override a template?

See original GitHub issue

I read the docs but still have no clue what I do to edit for example interfaces generation. I copied templates/default/* from the repo into my project templates/* But in there I don’t see any interface generation. Because it happens in the base/*. But I didn’t copy base/*. And if I do, it uses some defaults via @base… which is not the base/* that I copied, isn’t it? So how it is assumed to override things from the @base space?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
OnkelTemcommented, Aug 9, 2022

Yep, @marko-hologram. Thanks for being persistent 😃 Now we know that the problem was actually in bad console feedback.

1reaction
marko-hologramcommented, Aug 3, 2022

As docs mention, you just copy individual files, not the whole folder structure. https://github.com/acacode/swagger-typescript-api#--templates

So I can give one example how I did this, but I only updated api client and route names, not others. At the root of my project, this is the folder structure for templates:

image

And I’ve just added template path to the command I run npx swagger-typescript-api --templates ./swaggerGenerateTemplates I’ve omitted other arguments because they are not important here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template structure & Overriding templates via a theme
Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /woocommerce keeping the same file...
Read more >
How to override templates - Django documentation
First, we'll explore overriding templates by creating replacement templates in your project's templates directory. ... The TEMPLATES setting and BASE_DIR will ...
Read more >
Overriding Templates - SlickRemix
Go to the root of your WordPress via FTP and wp-content > plugins > feed-them-gallery > templates > now select and copy the...
Read more >
How to override the template from a theme - WordPress.org
Hi,. I've used a theme name: Yoku and in that theme, there is learnpress folder that I what to override to the child...
Read more >
NetSuite Applications Suite - Override a Template File
To customize a template, you must use the override method provided by the SCA developer tools. Because there is no mechanism for overriding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found