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

Template configuration does not work #890

Open
snuup opened this issue Aug 13, 2024 · 1 comment
Open

Template configuration does not work #890

snuup opened this issue Aug 13, 2024 · 1 comment

Comments

@snuup
Copy link

snuup commented Aug 13, 2024

My Api has name "getDog" which the tool renames into getDogList although its a single dog, so that makes no sense at all.

I copied the templates folder from the repo and pointed to my own templates folder like so:

... -t tools/swaggerts/templates/default

Then I changed the route-name.ejs to

const methodAliases = {
     get: (pathName, hasPathInserts) => _.camelCase(`${pathName}_${hasPathInserts ? "detailaaaa" : "listxxxxx"}`),

But those changes do not appear in the generated api. How do custom templates work?

@duola8789
Copy link

I have encountered a similar issue as well.

I edit the api.ejs like this:

image

the result is

image

where is “import x from "../../utils/request";

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