lint: openapi.js

pull/4842/head
John McLear 2021-02-21 19:56:19 +00:00 committed by Richard Hansen
parent 25d4faddd9
commit 86c938cae2
1 changed files with 3 additions and 3 deletions

View File

@ -491,7 +491,7 @@ const generateDefinitionForVersion = (version, style = APIPathStyle.FLAT) => {
};
// build operations
for (const funcName in apiHandler.version[version]) {
for (const funcName of Object.keys(apiHandler.version[version])) {
let operation = {};
if (operations[funcName]) {
operation = {...operations[funcName]};
@ -545,7 +545,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
const {app} = args;
// create openapi-backend handlers for each api version under /api/{version}/*
for (const version in apiHandler.version) {
for (const version of Object.keys(apiHandler.version)) {
// we support two different styles of api: flat + rest
// TODO: do we really want to support both?
@ -591,7 +591,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
});
// register operation handlers
for (const funcName in apiHandler.version[version]) {
for (const funcName of Object.keys(apiHandler.version[version])) {
const handler = async (c, req, res) => {
// parse fields from request
const {header, params, query} = c.request;