mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
lint: openapi.js
This commit is contained in:
parent
25d4faddd9
commit
86c938cae2
1 changed files with 3 additions and 3 deletions
|
@ -491,7 +491,7 @@ const generateDefinitionForVersion = (version, style = APIPathStyle.FLAT) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// build operations
|
// build operations
|
||||||
for (const funcName in apiHandler.version[version]) {
|
for (const funcName of Object.keys(apiHandler.version[version])) {
|
||||||
let operation = {};
|
let operation = {};
|
||||||
if (operations[funcName]) {
|
if (operations[funcName]) {
|
||||||
operation = {...operations[funcName]};
|
operation = {...operations[funcName]};
|
||||||
|
@ -545,7 +545,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
const {app} = args;
|
const {app} = args;
|
||||||
|
|
||||||
// create openapi-backend handlers for each api version under /api/{version}/*
|
// 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
|
// we support two different styles of api: flat + rest
|
||||||
// TODO: do we really want to support both?
|
// TODO: do we really want to support both?
|
||||||
|
|
||||||
|
@ -591,7 +591,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// register operation handlers
|
// 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) => {
|
const handler = async (c, req, res) => {
|
||||||
// parse fields from request
|
// parse fields from request
|
||||||
const {header, params, query} = c.request;
|
const {header, params, query} = c.request;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue