updated the API, fixed the config docs, added a method list to the API pages
This commit is contained in:
@ -2,6 +2,7 @@ var cp = require('child_process');
|
||||
var async = require('async');
|
||||
var estream = require('event-stream');
|
||||
var chalk = require('chalk');
|
||||
var _ = require('lodash');
|
||||
var argv = require('optimist')
|
||||
.options({
|
||||
force: {
|
||||
@ -22,10 +23,9 @@ var argv = require('optimist')
|
||||
default: true,
|
||||
boolean: true
|
||||
},
|
||||
es_branch: {
|
||||
default: 'master',
|
||||
string: true,
|
||||
alias: 'b'
|
||||
update: {
|
||||
default: true,
|
||||
boolean: true
|
||||
}
|
||||
});
|
||||
|
||||
@ -109,12 +109,18 @@ function generateBranch(branch, done) {
|
||||
], done);
|
||||
}
|
||||
|
||||
async.series([
|
||||
var steps = [
|
||||
initSubmodule,
|
||||
fetch,
|
||||
async.apply(generateBranch, '0.90'),
|
||||
async.apply(generateBranch, 'master')
|
||||
], function (err) {
|
||||
];
|
||||
|
||||
if (!argv.update) {
|
||||
steps = _.without(steps, fetch);
|
||||
}
|
||||
|
||||
async.series(steps, function (err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
@ -244,6 +244,7 @@ module.exports = function (branch, done) {
|
||||
location: location,
|
||||
docUrl: def.documentation,
|
||||
name: spec.name,
|
||||
namespace: spec.name.split('.').slice(0, -1).join('.'),
|
||||
allParams: allParams
|
||||
};
|
||||
|
||||
|
||||
@ -3,17 +3,29 @@
|
||||
if ( branch === 'master' ) {%>
|
||||
== 1.0 API
|
||||
|
||||
NOTE: At this time, you must opt into the 1.0 API by setting the `apiVerion` config parameter.<%
|
||||
NOTE: At this time, you must opt into the 1.0 API by setting the `apiVerion` config parameter.
|
||||
|
||||
<%
|
||||
} else {%>
|
||||
== 0.90 API
|
||||
|
||||
NOTE: This is currently the default API, but with the upcoming release of Elasticsearch 1.0 that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change when the default does.<%
|
||||
NOTE: This is currently the default API, but with the upcoming release of Elasticsearch 1.0 that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change when the default does.
|
||||
|
||||
<%
|
||||
}
|
||||
|
||||
// method index%>
|
||||
[[js-api-method-index]]<%
|
||||
actions = _.sortBy(actions, 'namespace');
|
||||
_.each(actions, function (action) {
|
||||
action.index = 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix; %>
|
||||
* <%= '<<' + action.index + ',' + action.name + '>>' %><%
|
||||
})
|
||||
|
||||
_.each(actions, function (action) {
|
||||
%>
|
||||
|
||||
[[<%= 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix %>]]
|
||||
[[<%= action.index %>]]
|
||||
=== `<%= action.name %>`
|
||||
|
||||
[source,js]
|
||||
@ -35,7 +47,10 @@ _.each(action.allParams, function (param, paramName) { %>
|
||||
`<%= paramWithDefault(paramName, param.default) %>`::
|
||||
`<%= paramType(param.type) %>` -- <%= joinParagraphs(param.description || '', 4) %><%
|
||||
|
||||
}); // endeach
|
||||
}); // endeach %>
|
||||
|
||||
link:#[back to top]<%
|
||||
|
||||
} // endif
|
||||
|
||||
}); // endeach
|
||||
|
||||
Reference in New Issue
Block a user