Comments (4)
Hi @tswaters. Thanks for opening the issue. Honestly, I don't think the problem is related to the library. You said:
So, my IDE really doesn't like it when I look at these template js files - it whines and complains about syntax errors and it's really hard to see where real problems are.
What you're describing is a problem with your IDE. Please, open an issue in their repo.
Thank you!
from swagger-node-codegen.
For posterity -- this can be accomplished with npm scripts and a bit of bash --
"pregenerate": "rimraf ./stub",
"generate": "snc --templates ./template --output ./stub path/to/swagger.yml",
"postgenerate": "for file in ./stub/*.hbs; do mv \"$file\" \"./stub/$(basename \"$file\" .hbs).js\"; done"
Not the cleanest, nor cross-platform but it works for my use case.
from swagger-node-codegen.
Hey {IDE Maintainer}, can you treat js files as handlebar templates ?
I'm fairly sure that this type of things crops up in pretty much any ide with filetype recognition and syntax highlighting. Baring any pre-existing configuration option to interpret certain files as different types (I know intellij can do this, still a pain to configure), I'm fairly certain any issue I add would fall on deaf ears.
The workaround I have works well for me, so I'll continue to use it.
It would be great if there was an option for this. Right now the UX of this tool leaves a bit to be desired.... when you open one of these template js files in an IDE, do you just ignore all the underlines and syntax errors? Drives me bonkers looking at them.
from swagger-node-codegen.
What can I say, man? Just see how it looks like in Atom:
It's not the problem of a library that your IDE doesn't colour syntax correctly. It's like when you have HTML + CSS + JS in a single file and the file extension is .html
. Your IDE still works, right? Go blame them or just use another editor. For sure it's not the problem of this or any other library.
Right now the UX of this tool leaves a bit to be desired...
Obviously. It's free, open source and done on my spare time. There are plenty of paid code generators out there. Feel free.
from swagger-node-codegen.
Related Issues (20)
- OpenAPI v3: Not properly supported HOT 2
- Issue on generation HOT 3
- Target dir can't handle relative paths properly HOT 5
- Getting an exception on Mac HOT 3
- Command line tool cannot accept a URL HOT 5
- Pass the whole swagger/openapi spec into the operation files HOT 6
- Custom handlebar helpers HOT 4
- Error on update of openapi spec HOT 3
- openapi 3.0.0 Can not load the content of the Swagger specification file HOT 8
- path template with hypen produces invalid json object in the routes file HOT 1
- open api 3.x - requestBody not read, generates blank options HOT 1
- does not work with APIs versioning HOT 2
- Creating a new version HOT 2
- Service template shouldn't advise the user to return an error object HOT 3
- HEAD methods should be before GET methods HOT 1
- UnhandledPromiseRejectionWarning: ReferenceError: req is not defined HOT 3
- Feat request: add ability to generate model files HOT 1
- No routes nor services are generated HOT 3
- Maintaining
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-node-codegen.