Closed Vaelor closed 6 years ago
Correction:
https://github.com/fmvilas/swagger-node-codegen/blob/83cee35d23dd19986f4ec22d207d03026d4f8db5/lib/codegen.js#L70
Leaving out subdir
, fixes the issue. Guess subdir
is needed if templates are in subdirectories..
I guess checking if subdir
is the same as config.templates_dir
and then 'leave subdir out for the path.resolve' could fix this issue by not breaking anything else.. Not 100% sure though.
Oh, good catch @Vaelor. Will investigate and try to fix it. Thanks for reporting!
This is now fixed, released and on npm. Thanks!
Well that was really fast! Thanks a lot! Can confirm this works now!
Great! You're welcome!
Running
snc -t ./api-templates -o ./src/app/services/gen/ schema.yaml
Results in some files being moved to the output folder, but not all. Update Only files that do not begin with
___
are moved to the correct folder.The rest is put into the template folder.
My folder structure:
Edit: The below was not correct! See my other comment
Location of the issue seems to be
Where
templates:
uses path.resolve,target_dir:
does not.