forked from mirror/Riven
Do not support methods with header parameters
This commit is contained in:
parent
4f575530c7
commit
32082b0a62
2 changed files with 8 additions and 2 deletions
|
@ -65,8 +65,11 @@ impl<'a> {{= endpoint }}<'a> {
|
|||
for (let [ route, path ] of endpointMethods)
|
||||
{
|
||||
let get = path.get;
|
||||
if (!get)
|
||||
if (!get) /* Only support GET parameters. */
|
||||
continue;
|
||||
if ((get.parameters || []).some(p => 'header' === p.in)) /* Do not support header parameter methods. */
|
||||
continue;
|
||||
|
||||
let operationId = get.operationId;
|
||||
let method = dotUtils.changeCase.snakeCase(operationId.slice(operationId.indexOf('.') + 1));
|
||||
|
||||
|
|
|
@ -20,8 +20,11 @@ lazy_static! {
|
|||
{{
|
||||
for (const [ route, path ] of Object.entries(spec.paths)) {
|
||||
const get = path.get;
|
||||
if (!get)
|
||||
if (!get) /* Only support GET parameters. */
|
||||
continue;
|
||||
if ((get.parameters || []).some(p => 'header' === p.in)) /* Do not support header parameter methods. */
|
||||
continue;
|
||||
|
||||
const operationId = get.operationId;
|
||||
}}
|
||||
map.insert("{{= route }}", "{{= operationId }}");
|
||||
|
|
Loading…
Reference in a new issue