-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Sandor edited this page Dec 23, 2016
·
12 revisions
Welcome to the gl-swagger-generator wiki!
Three different approaches are now available to use this generator.
npm install node-swagger-generator@beta --save-dev
npm install gulp-swagger-generator@beta --save-dev
var gulp = require("gulp"),
path = require("path"),
swaggerGenerator = require('gulp-swagger-generator'),
gulp.task('swagger:ts', function () {
return gulp.src('./api-swagger.json')
.pipe(swaggerGenerator({
"language": "typescript",
"framework": "angular",
"version": "1.5",
"mode": "singleFile",
"dependencies": {
},
"mediaTypesPriorities": {
"application/json": 1
},
"ambientTypes": [
],
"templateOptions": {
"clientName": "MyClient",
"module": "MyModule"
}
}))
.pipe(gulp.dest("./ClientDirectory"));
});
Coming soon.
node-swagger-generator is built as a node module you can directly integrate in your node based scripts or tools.
Coming soon.
- CSharp : Note the generic support is currently extremely limited. *
- Typescript : Generics are not supported atm.
- Not advanced date/time management especially in TypeScript
- Generics are mostly not supported atm.
As opposed to former gulp-swagger-generator, this new version will support writing custom templates out of the box.
Checkout detailed instructions
Coming soon.
input : swagger schema
swagger visitors :
- customVisitors (extensibility point) ;
- detect definitions (both explicit and anonymous) and build operations --> users definition and operation filters (extensibility point);
generation context visitors
- type trimmer -> uses dependencies
- type mapper -> uses language provider
extensibility points
todo ->
- generation context should keep track of underlying swagger schema objects.
- templates: fix indentation
- Home
- Jane's story
- Templates
- Csharp
- Angular
- Customization
- Custom Templates
- Custom Languages