2021-09-09 21:31:39 +00:00
|
|
|
{{
|
|
|
|
const spec = require('./.spec.json');
|
|
|
|
const dotUtils = require('./dotUtils.js');
|
|
|
|
|
|
|
|
const operations = [];
|
|
|
|
for (const [ route, path ] of Object.entries(spec.paths)) {
|
|
|
|
for (const [ method, operation ] of Object.entries(path)) {
|
|
|
|
if (method.startsWith('x-')) continue;
|
|
|
|
operations.push({ route, method, operation });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}}{{= dotUtils.preamble() }}
|
|
|
|
|
|
|
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
|
|
|
// Version {{= spec.info.version }}
|
|
|
|
|
|
|
|
//! Metadata about the Riot API and Riven.
|
|
|
|
//!
|
|
|
|
//! Note: this modules is automatically generated.
|
|
|
|
|
2021-10-30 05:38:48 +00:00
|
|
|
pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); {{= operations.length }}] = [
|
2021-09-09 21:31:39 +00:00
|
|
|
{{
|
|
|
|
for (const { route, method, operation } of operations) {
|
|
|
|
}}
|
|
|
|
(reqwest::Method::{{= method.toUpperCase() }}, "{{= route }}", "{{= operation.operationId }}"),
|
|
|
|
{{
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
];
|