@spec2ts/openapi-client 3.1.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,74 +1,80 @@
1
1
  {
2
- "name": "@spec2ts/openapi-client",
3
- "version": "3.1.3",
4
- "description": "Utility to convert OpenAPI v3 specifications to Typescript HTTP client using TypeScript native compiler",
5
- "author": "Touchify <dev@touchify.co>",
6
- "license": "MIT",
7
- "main": "index.js",
8
- "homepage": "https://github.com/touchifyapp/spec2ts/blob/master/packages/openapi#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/touchifyapp/spec2ts"
2
+ "name": "@spec2ts/openapi-client",
3
+ "version": "4.0.0",
4
+ "description": "Utility to convert OpenAPI v3 specifications to Typescript HTTP client using TypeScript native compiler",
5
+ "keywords": [
6
+ "ast",
7
+ "client",
8
+ "compile",
9
+ "compiler",
10
+ "http",
11
+ "interface",
12
+ "openapi",
13
+ "openapi3",
14
+ "rest",
15
+ "share",
16
+ "spec",
17
+ "spec2ts",
18
+ "specification",
19
+ "transpile",
20
+ "typescript",
21
+ "typing"
22
+ ],
23
+ "homepage": "https://github.com/touchifyapp/spec2ts/blob/master/packages/openapi#readme",
24
+ "license": "MIT",
25
+ "author": "Touchify <dev@touchify.co>",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/touchifyapp/spec2ts"
29
+ },
30
+ "bin": {
31
+ "oapi2tsclient": "./dist/bin/oapi2tsclient.mjs"
32
+ },
33
+ "files": [
34
+ "dist/**/*.mjs",
35
+ "dist/**/*.d.mts"
36
+ ],
37
+ "type": "module",
38
+ "main": "dist/index.mjs",
39
+ "types": "dist/index.d.mts",
40
+ "exports": {
41
+ ".": {
42
+ "import": "./dist/index.mjs",
43
+ "types": "./dist/index.d.mts"
12
44
  },
13
- "publishConfig": {
14
- "access": "public"
45
+ "./cli": {
46
+ "import": "./dist/cli/index.mjs",
47
+ "types": "./dist/cli/index.d.mts"
15
48
  },
16
- "bin": {
17
- "oapi2tsclient": "./bin/oapi2tsclient.js"
49
+ "./bin/oapi2tsclient": {
50
+ "import": "./dist/bin/oapi2tsclient.mjs",
51
+ "types": "./dist/bin/oapi2tsclient.d.mts"
18
52
  },
19
- "files": [
20
- "*.js",
21
- "*.d.ts",
22
- "bin/**/*.js",
23
- "cli/**/*.js",
24
- "cli/**/*.d.ts",
25
- "lib/**/*.js",
26
- "lib/**/*.d.ts",
27
- "lib/templates/*.ts"
28
- ],
29
- "scripts": {
30
- "build": "npm run clean && npm run lint && npm run build:ts",
31
- "build:ts": "tsc -p .",
32
- "test": "npm run clean && npm run lint && npm run test:jest",
33
- "test:jest": "jest -c ../../jest.config.js --rootDir .",
34
- "test:coverage": "npm run test -- -- --coverage",
35
- "lint": "npm run lint:ts",
36
- "lint:ts": "eslint '*.ts' '{bin,cli,lib}/**/*.ts'",
37
- "lint:fix": "npm run lint -- -- --fix",
38
- "clean": "npm run clean:ts",
39
- "clean:ts": "del '*.{js,d.ts}' '{bin,cli,lib}/**/*.{js,d.ts}'",
40
- "prepublishOnly": "npm test && npm run build"
41
- },
42
- "dependencies": {
43
- "@spec2ts/core": "^3.0.2",
44
- "@spec2ts/jsonschema": "^3.0.5",
45
- "@spec2ts/openapi": "^3.1.3",
46
- "openapi3-ts": "^4.1.2",
47
- "typescript": "^5.0.0",
48
- "yargs": "^17.7.2"
49
- },
50
- "devDependencies": {
51
- "del-cli": "^5.1.0",
52
- "eslint": "^8.49.0",
53
- "jest": "^29.6.4"
54
- },
55
- "keywords": [
56
- "openapi",
57
- "specification",
58
- "openapi3",
59
- "spec",
60
- "typescript",
61
- "client",
62
- "http",
63
- "rest",
64
- "compile",
65
- "compiler",
66
- "ast",
67
- "transpile",
68
- "interface",
69
- "typing",
70
- "spec2ts",
71
- "share"
72
- ],
73
- "gitHead": "81f76779f541e0bc2ef8d7051a0121fff07916ae"
53
+ "./package.json": "./package.json"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "scripts": {
59
+ "build": "npm run lint && npm run build:ts",
60
+ "build:ts": "tsdown",
61
+ "test": "npm run lint && npm run format:check && npm run test:vitest",
62
+ "test:prepublish": "npm run lint && npm run test:vitest",
63
+ "test:vitest": "vitest run -c ../../vitest.config.ts",
64
+ "test:coverage": "npm run test -- -- --coverage",
65
+ "lint": "npm run lint:ts",
66
+ "lint:ts": "oxlint -c ../../oxlint.config.ts",
67
+ "lint:fix": "npm run lint -- -- --fix",
68
+ "format": "oxfmt -c ../../oxfmt.config.ts",
69
+ "format:check": "oxfmt -c ../../oxfmt.config.ts --check",
70
+ "prepublishOnly": "npm run test:prepublish && npm run build"
71
+ },
72
+ "dependencies": {
73
+ "@spec2ts/core": "^4.0.0",
74
+ "@spec2ts/jsonschema": "^4.0.0",
75
+ "@spec2ts/openapi": "^4.0.0",
76
+ "openapi3-ts": "^4.6.0",
77
+ "typescript": "^6.0.0",
78
+ "yargs": "^18.0.0"
79
+ }
74
80
  }
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- require("../cli");
package/cli/command.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { Argv } from "yargs";
2
- import { OApiGeneratorOptions } from "../lib/openapi-generator";
3
- export interface BuildClientFromOpenApiOptions extends OApiGeneratorOptions {
4
- input: string | string[];
5
- output?: string;
6
- banner?: string;
7
- importFetchVersion?: string;
8
- importFormDataVersion?: string;
9
- packageName?: string;
10
- packageVersion?: string;
11
- packageAuthor?: string;
12
- packageLicense?: string;
13
- packagePrivate?: boolean;
14
- packageBuildTarget?: string;
15
- packageBuildModule?: string;
16
- }
17
- export declare const usage = "$0 <input..>";
18
- export declare const describe = "Generate TypeScript HTTP client from OpenAPI specification";
19
- export declare function builder(argv: Argv): Argv<BuildClientFromOpenApiOptions>;
20
- export declare function handler(options: BuildClientFromOpenApiOptions): Promise<void>;
package/cli/command.js DELETED
@@ -1,168 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.describe = exports.usage = void 0;
4
- const path = require("path");
5
- const fs_1 = require("fs");
6
- const core_1 = require("@spec2ts/core");
7
- const openapi_generator_1 = require("../lib/openapi-generator");
8
- exports.usage = "$0 <input..>";
9
- exports.describe = "Generate TypeScript HTTP client from OpenAPI specification";
10
- function builder(argv) {
11
- return argv
12
- .positional("input", {
13
- array: true,
14
- type: "string",
15
- describe: "Path to OpenAPI Specification(s) to convert to TypeScript HTTP client",
16
- demandOption: true
17
- })
18
- .option("output", {
19
- type: "string",
20
- alias: "o",
21
- describe: "Output file for generated client"
22
- })
23
- .option("cwd", {
24
- type: "string",
25
- alias: "c",
26
- describe: "Root directory for resolving $refs"
27
- })
28
- .option("baseUrl", {
29
- type: "string",
30
- describe: "Base url of the server"
31
- })
32
- .option("prefix", {
33
- type: "string",
34
- describe: "Only generate paths with this prefix"
35
- })
36
- .option("avoidAny", {
37
- type: "boolean",
38
- describe: "Avoid the `any` type and use `unknown` instead"
39
- })
40
- .option("enableDate", {
41
- choices: [true, "strict", "lax"],
42
- describe: "Build `Date` for format `date` and `date-time`"
43
- })
44
- .option("inlineRequired", {
45
- type: "boolean",
46
- describe: "Create a method argument for each required parameter"
47
- })
48
- .option("importFetch", {
49
- choices: ["node-fetch", "cross-fetch", "isomorphic-fetch"],
50
- describe: "Use a custom fetch implementation"
51
- })
52
- .option("typesPath", {
53
- type: "string",
54
- describe: "Generate client types in external file relative to the output file"
55
- })
56
- .option("importFetchVersion", {
57
- type: "string",
58
- describe: "Use a custom fetch implementation version"
59
- })
60
- .option("importFormDataVersion", {
61
- type: "string",
62
- describe: "Use a custom form-data implementation version"
63
- })
64
- .option("packageName", {
65
- type: "string",
66
- describe: "Generate a package.json with given name"
67
- })
68
- .option("packageVersion", {
69
- type: "string",
70
- describe: "Set the version of the package.json"
71
- })
72
- .option("packageAuthor", {
73
- type: "string",
74
- describe: "Set the author of the package.json"
75
- })
76
- .option("packageLicense", {
77
- type: "string",
78
- describe: "Set the license of the package.json"
79
- })
80
- .option("packagePrivate", {
81
- type: "boolean",
82
- describe: "Set the package.json private"
83
- })
84
- .option("packageBuildTarget", {
85
- type: "string",
86
- describe: "Set the TypeScript build target"
87
- })
88
- .option("packageBuildModule", {
89
- type: "string",
90
- describe: "Set the TypeScript build module"
91
- })
92
- .option("banner", {
93
- type: "string",
94
- alias: "b",
95
- describe: "Comment prepended to the top of each generated file"
96
- });
97
- }
98
- exports.builder = builder;
99
- async function handler(options) {
100
- const files = await core_1.cli.findFiles(options.input);
101
- for (const file of files) {
102
- const output = options.output || core_1.cli.getOutputPath(file, options);
103
- await core_1.cli.mkdirp(output);
104
- if (options.typesPath) {
105
- if (!options.typesPath.startsWith(".")) {
106
- options.typesPath = "./" + options.typesPath;
107
- }
108
- const res = await (0, openapi_generator_1.generateClientFromFile)(file, options);
109
- printFile(res.client, output, options);
110
- const outputTypes = path.resolve(path.dirname(output), options.typesPath + ".ts");
111
- printFile(res.types, outputTypes, options);
112
- }
113
- else {
114
- const sourceFile = await (0, openapi_generator_1.generateClientFromFile)(file, options);
115
- printFile(sourceFile, output, options);
116
- }
117
- if (options.packageName) {
118
- await generatePackage(output, options);
119
- }
120
- }
121
- }
122
- exports.handler = handler;
123
- async function printFile(file, output, options) {
124
- const content = core_1.printer.printFile(file);
125
- await core_1.cli.mkdirp(output);
126
- await core_1.cli.writeFile(output, (options.banner || defaultBanner()) +
127
- "\n\n" +
128
- content);
129
- }
130
- function defaultBanner() {
131
- return `/**
132
- * DO NOT MODIFY
133
- * Generated using @spec2ts/openapi-client.
134
- * See https://www.npmjs.com/package/@spec2ts/openapi-client
135
- */
136
-
137
- /* eslint-disable */`;
138
- }
139
- async function generatePackage(output, options) {
140
- const outputDir = path.dirname(output);
141
- const main = path.relative(outputDir, output);
142
- const pkg = {
143
- name: options.packageName,
144
- version: options.packageVersion || "1.0.0",
145
- description: "OpenAPI v3 client for " + options.packageName,
146
- author: options.packageAuthor || "@spec2ts/openapi-client",
147
- license: options.packageLicense || "UNLICENSED",
148
- main: main.replace(/\.ts$/, ".js"),
149
- files: ["*.js", "*.d.ts"],
150
- scripts: {
151
- build: `tsc ${main} --strict --target ${options.packageBuildTarget || "ES2018"} --module ${options.packageBuildModule || "UMD"} --moduleResolution node --skipLibCheck`,
152
- prepublishOnly: "npm run build"
153
- },
154
- dependencies: {},
155
- devDependencies: {
156
- typescript: "^4.2.0"
157
- }
158
- };
159
- if (options.importFetch) {
160
- pkg.dependencies[options.importFetch] = options.importFetchVersion || "*";
161
- pkg.dependencies["form-data"] = options.importFormDataVersion || "*";
162
- pkg.devDependencies["@types/node"] = "*";
163
- }
164
- if (options.packagePrivate) {
165
- pkg.private = options.packagePrivate;
166
- }
167
- await fs_1.promises.writeFile(path.join(outputDir, "package.json"), JSON.stringify(pkg, null, 2), "utf8");
168
- }
package/cli/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/cli/index.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const yargs = require("yargs");
4
- const command_1 = require("../cli/command");
5
- yargs
6
- .command(command_1.usage, command_1.describe, command_1.builder, command_1.handler)
7
- .help("help", "Show help usage")
8
- .demandCommand()
9
- .argv;
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./lib/openapi-generator";
package/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./lib/openapi-generator"), exports);
@@ -1,7 +0,0 @@
1
- import * as ts from "typescript";
2
- import type { OpenAPIObject } from "openapi3-ts/oas31";
3
- import { OApiGeneratorContext } from "./core-parser";
4
- export type Formatter = "space" | "pipe" | "deep" | "explode" | "form";
5
- export declare function generateServers(file: ts.SourceFile, { servers }: OpenAPIObject, context: OApiGeneratorContext): ts.SourceFile;
6
- export declare function generateDefaults(file: ts.SourceFile, context: OApiGeneratorContext): ts.SourceFile;
7
- export declare function generateFunctions(file: ts.SourceFile, spec: OpenAPIObject, context: OApiGeneratorContext): ts.SourceFile;
@@ -1,155 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateFunctions = exports.generateDefaults = exports.generateServers = void 0;
4
- const ts = require("typescript");
5
- const core = require("@spec2ts/core");
6
- const core_parser_1 = require("@spec2ts/jsonschema/lib/core-parser");
7
- const server_parser_1 = require("./server-parser");
8
- const core_parser_2 = require("./core-parser");
9
- const util_1 = require("./util");
10
- //#region Public
11
- function generateServers(file, { servers }, context) {
12
- servers = servers || [];
13
- if (context.options.baseUrl)
14
- servers = [{ url: context.options.baseUrl }];
15
- const serversConst = core.findFirstVariableStatement(file.statements, "servers");
16
- const defaultsConst = core.findFirstVariableStatement(file.statements, "defaults");
17
- if (!serversConst || !defaultsConst) {
18
- throw new Error("Invalid template: missing servers or defaults const");
19
- }
20
- file = core.replaceSourceFileStatement(file, serversConst, core.updateVariableStatementValue(serversConst, "servers", (0, server_parser_1.parseServers)(servers)));
21
- file = core.replaceSourceFileStatement(file, defaultsConst, core.updateVariableStatementPropertyValue(defaultsConst, "defaults", "baseUrl", (0, server_parser_1.defaultBaseUrl)(servers)));
22
- return file;
23
- }
24
- exports.generateServers = generateServers;
25
- function generateDefaults(file, context) {
26
- if (context.options.importFetch) {
27
- const defaultsConst = core.findFirstVariableStatement(file.statements, "defaults");
28
- if (!defaultsConst) {
29
- throw new Error("Invalid template: missing defaults const");
30
- }
31
- file = core.prependSourceFileStatements(file, core.createDefaultImportDeclaration({
32
- moduleSpecifier: context.options.importFetch,
33
- name: "fetch",
34
- bindings: ["RequestInit", "Headers"]
35
- }), core.createNamespaceImportDeclaration({
36
- moduleSpecifier: "form-data",
37
- name: "FormData"
38
- }));
39
- file = core.replaceSourceFileStatement(file, defaultsConst, core.updateVariableStatementPropertyValue(defaultsConst, "defaults", "fetch", core.toExpression("fetch")));
40
- }
41
- return file;
42
- }
43
- exports.generateDefaults = generateDefaults;
44
- function generateFunctions(file, spec, context) {
45
- var _a;
46
- const paths = Object.fromEntries(Object.entries((_a = spec.paths) !== null && _a !== void 0 ? _a : {})
47
- .filter(([path]) => !context.options.prefix || path.startsWith(context.options.prefix)));
48
- const functions = Object.entries(paths).map(([path, pathSpec]) => {
49
- const item = (0, core_parser_1.resolveReference)(pathSpec, context);
50
- return Object.entries(item)
51
- .filter(([verb,]) => (0, core_parser_2.isMethod)(verb.toUpperCase()))
52
- .map(([verb, entry]) => generateFunction(path, item, verb.toUpperCase(), entry, context));
53
- }).flat();
54
- if (context.options.typesPath && context.typesFile) {
55
- context.typesFile = core.updateSourceFileStatements(context.typesFile, context.aliases);
56
- file = core.updateSourceFileStatements(file, [
57
- core.createNamedImportDeclaration({
58
- moduleSpecifier: context.options.typesPath,
59
- bindings: context.aliases.map(a => a.name.text)
60
- }),
61
- ...file.statements,
62
- ...functions
63
- ]);
64
- }
65
- else {
66
- file = core.appendSourceFileStatements(file, ...context.aliases, ...functions);
67
- }
68
- return file;
69
- }
70
- exports.generateFunctions = generateFunctions;
71
- function generateFunction(path, item, method, operation, context) {
72
- const { name, query, header, paramsVars, args, bodyMode, bodyVar, response, responseVoid, responseJSON } = (0, core_parser_2.parseOperation)(path, item, method, operation, context);
73
- const qs = generateQs(query, paramsVars);
74
- const url = generateUrl(path, qs);
75
- const init = [
76
- ts.factory.createSpreadAssignment(ts.factory.createIdentifier("options")),
77
- ];
78
- if (method !== "GET") {
79
- init.push(ts.factory.createPropertyAssignment("method", ts.factory.createStringLiteral(method)));
80
- }
81
- if (bodyVar) {
82
- init.push(core.createPropertyAssignment("body", ts.factory.createIdentifier(bodyVar)));
83
- }
84
- if (header.length) {
85
- init.push(ts.factory.createPropertyAssignment("headers", ts.factory.createObjectLiteralExpression([
86
- ts.factory.createSpreadAssignment(ts.factory.createPropertyAccessChain(ts.factory.createIdentifier("options"), core.questionDotToken, ts.factory.createIdentifier("headers"))),
87
- ...header.map(({ name }) => core.createPropertyAssignment(name, ts.factory.createIdentifier(paramsVars[name]))),
88
- ], true)));
89
- }
90
- const fetchArgs = [url];
91
- if (init.length) {
92
- const initObj = ts.factory.createObjectLiteralExpression(init, true);
93
- fetchArgs.push(bodyMode ? callFunction("http", bodyMode, [initObj]) : initObj);
94
- }
95
- return core.addComment(core.createFunctionDeclaration(name, {
96
- modifiers: [core.modifier.export, core.modifier.async],
97
- type: ts.factory.createTypeReferenceNode("Promise", [
98
- ts.factory.createTypeReferenceNode("ApiResponse", [response])
99
- ])
100
- }, args, core.block(ts.factory.createReturnStatement(ts.factory.createAwaitExpression(callFunction("http", responseJSON ? "fetchJson" :
101
- responseVoid ? "fetchVoid" :
102
- "fetch", fetchArgs))))), operation.summary || operation.description);
103
- }
104
- function generateQs(parameters, paramsVars) {
105
- if (!parameters.length) {
106
- return;
107
- }
108
- const paramsByFormatter = groupByFormatter(parameters);
109
- return callFunction("QS", "query", Object.entries(paramsByFormatter).map(([format, params]) => {
110
- return callFunction("QS", format, [
111
- core.createObjectLiteral(params.map((p) => [p.name, paramsVars[p.name]])),
112
- ]);
113
- }));
114
- }
115
- function generateUrl(path, qs) {
116
- const spans = [];
117
- // Use a replacer function to collect spans as a side effect:
118
- const head = path.replace(/(.*?)\{(.+?)\}(.*?)(?=\{|$)/g, (_, head, name, literal) => {
119
- const expression = (0, util_1.camelCase)(name);
120
- spans.push({ expression: ts.factory.createIdentifier(expression), literal });
121
- return head;
122
- });
123
- if (qs) {
124
- // add the query string as last span
125
- spans.push({ expression: qs, literal: "" });
126
- }
127
- return core.createTemplateString(head, spans);
128
- }
129
- //#endregion
130
- //#region Utils
131
- function callFunction(ns, name, args) {
132
- return core.createCall(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(ns), name), { args });
133
- }
134
- function groupByFormatter(parameters) {
135
- const res = {};
136
- parameters.forEach(param => {
137
- const formatter = getFormatter(param);
138
- res[formatter] = res[formatter] || [];
139
- res[formatter].push(param);
140
- });
141
- return res;
142
- }
143
- function getFormatter({ style, explode }) {
144
- if (style === "spaceDelimited")
145
- return "space";
146
- if (style === "pipeDelimited")
147
- return "pipe";
148
- if (style === "deepObject")
149
- return "deep";
150
- if (style === "form") {
151
- return explode === false ? "form" : "explode";
152
- }
153
- return explode ? "explode" : "form";
154
- }
155
- //#endregion
@@ -1,24 +0,0 @@
1
- import * as ts from "typescript";
2
- import type { PathItemObject, OperationObject, ParameterObject } from "openapi3-ts/oas31";
3
- import { ParserContext } from "@spec2ts/jsonschema/lib/core-parser";
4
- import type { OApiGeneratorOptions } from "./openapi-generator";
5
- export type Method = "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH" | "TRACE";
6
- export type ContentTypeMode = "json" | "form" | "multipart";
7
- export interface OApiGeneratorContext extends ParserContext {
8
- options: OApiGeneratorOptions;
9
- typesFile?: ts.SourceFile;
10
- }
11
- export interface ParsedOperation {
12
- name: string;
13
- paramsVars: Record<string, string>;
14
- args: ts.ParameterDeclaration[];
15
- query: ParameterObject[];
16
- header: ParameterObject[];
17
- response: ts.TypeNode;
18
- responseJSON?: boolean;
19
- responseVoid?: boolean;
20
- bodyMode?: ContentTypeMode;
21
- bodyVar?: string;
22
- }
23
- export declare function parseOperation(path: string, item: PathItemObject, method: Method, operation: OperationObject, context: OApiGeneratorContext): ParsedOperation;
24
- export declare function isMethod(method: string): method is Method;