forked from wcandillon/swagger-js-codegen
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
Description
Justification
Our API is going to be quite big and generating it all into one file will make the file very very large. I would like to avoid this, especially since a lot of the large sets will only be used on some specific pages (included admin pages).
Right now I don't commit the generated code to git, which is something that I would like to do in the future to allow us to follow code changes even if we can follow our swagger spec file.
API Proposal
Having a new way to generate code would be ideal in this situation. It would require a lot of changes to support, I can however see a good potential in being able to generate it per with the same ViewData
.
let compiler = new Compiler({
moduleName: "Test",
className: "Test",
swagger: swaggerSpec
});
compiler.compile("output_directory");
Something like that would generate a collection of files from the ViewData
and resolve the import paths.
Considerations
- Easier to maintain big projects
- Performance improvements for big projects