-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathraml-python-generator.js
31 lines (29 loc) · 1.29 KB
/
raml-python-generator.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var join = require('path').join
var readFileSync = require('fs').readFileSync
var generator = require('raml-generator')
function read (path) {
return readFileSync(join(__dirname, 'lib', path), 'utf8')
}
module.exports = generator({
templates: {
'__init__.py' : read('templates/__init__.py.hbs'),
'example.py' : read('templates/example.py.hbs'),
'rpc_gae.py' : read('templates/rpc_gae.py.hbs'),
'rpc_geventhttpclient.py': read('templates/rpc_geventhttpclient.py.hbs'),
'rpc_httplib.py' : read('templates/rpc_httplib.py.hbs'),
'rpc_httplib2.py' : read('templates/rpc_httplib2.py.hbs'),
'rpc_requests.py' : read('templates/rpc_requests.py.hbs'),
'rpc_tornado.py' : read('templates/rpc_tornado.py.hbs'),
'rpc_urlfetch.py' : read('templates/rpc_urlfetch.py.hbs'),
'server_mock.py' : read('templates/server_mock.py.hbs'),
'server_tornado.py' : read('templates/server_tornado.py.hbs'),
'server_wsgi.py' : read('templates/server_wsgi.py.hbs')
},
partials: {
},
helpers: {
fullPath: require('./lib/helpers/fullPath'),
flatPath: require('./lib/helpers/flatPath'),
getUriList: require('./lib/helpers/getUriList')
}
})