@povio/openapi-codegen-cli 3.0.0-rc.4 → 3.0.0-rc.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Profiler, h as deepMerge, i as writeGenerateFileData, p as DEFAULT_GENERATE_OPTIONS, r as removeStaleGeneratedFiles, t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-
|
|
1
|
+
import { S as Profiler, h as deepMerge, i as writeGenerateFileData, p as DEFAULT_GENERATE_OPTIONS, r as removeStaleGeneratedFiles, t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-C0O8NiqP.mjs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import SwaggerParser from "@apidevtools/swagger-parser";
|
|
4
4
|
|
package/dist/{generateCodeFromOpenAPIDoc-CjVJQDyw.mjs → generateCodeFromOpenAPIDoc-C0O8NiqP.mjs}
RENAMED
|
@@ -2593,6 +2593,7 @@ function resolveExtractedEnumZodSchemaTags(resolver) {
|
|
|
2593
2593
|
//#endregion
|
|
2594
2594
|
//#region src/generators/core/zod/enumExtraction/updateExtractedEnumZodSchemaData.ts
|
|
2595
2595
|
function updateExtractedEnumZodSchemaData({ schema, nameSegments = [], includeSelf, ...params }) {
|
|
2596
|
+
if (!isReferenceObject(schema) && schema?.["x-domain-error-domain"]) return;
|
|
2596
2597
|
if (includeSelf) handleExtractedEnumZodSchemaDataUpdate({
|
|
2597
2598
|
schema,
|
|
2598
2599
|
nameSegments,
|
|
@@ -3062,7 +3063,7 @@ function sortZodSchemasByTopology(resolver, zodSchemas) {
|
|
|
3062
3063
|
function getDataFromOpenAPIDoc(openApiDoc, options, profiler) {
|
|
3063
3064
|
const p = profiler ?? new Profiler(false);
|
|
3064
3065
|
const resolver = p.runSync("data.resolver.init", () => new SchemaResolver(openApiDoc, options, p));
|
|
3065
|
-
const endpoints = p.runSync("data.endpoints.extract", () => getEndpointsFromOpenAPIDoc(resolver
|
|
3066
|
+
const endpoints = p.runSync("data.endpoints.extract", () => getEndpointsFromOpenAPIDoc(resolver));
|
|
3066
3067
|
const zodSchemasFromDocSchemas = p.runSync("data.zod.extract", () => getZodSchemasFromOpenAPIDoc(resolver, p));
|
|
3067
3068
|
let zodSchemas = {
|
|
3068
3069
|
...zodSchemasFromDocSchemas.zodSchemas,
|
|
@@ -3849,7 +3850,7 @@ function generateEndpoints({ resolver, data, tag }) {
|
|
|
3849
3850
|
const endpointConfig = renderEndpointConfig(resolver, endpoint, tag);
|
|
3850
3851
|
lines.push(`export const ${getEndpointName(endpoint)} = (${endpointParams}${hasAxiosRequestConfig ? `${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => {`);
|
|
3851
3852
|
lines.push(` return ${APP_REST_CLIENT_NAME}.${endpoint.method}(`);
|
|
3852
|
-
lines.push(` { resSchema: ${getImportedZodSchemaName(resolver, endpoint.response
|
|
3853
|
+
lines.push(` { resSchema: ${getImportedZodSchemaName(resolver, endpoint.response)} },`);
|
|
3853
3854
|
lines.push(` \`${getEndpointPath(endpoint)}\`,`);
|
|
3854
3855
|
if (endpointBody) lines.push(` ${generateParse ? renderEndpointParamParse(resolver, endpointBody, endpointBody.name, tag) : endpointBody.name},`);
|
|
3855
3856
|
else if (hasUndefinedEndpointBody) lines.push(" undefined,");
|
package/dist/generator.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as getNamespaceName, a as getDataFromOpenAPIDoc, b as isParamMediaTypeAllowed, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, g as invalidVariableNameCharactersToCamel, l as getTsTypeBase, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as GenerateType, x as formatTag, y as isMediaTypeAllowed } from "./generateCodeFromOpenAPIDoc-
|
|
1
|
+
import { _ as getNamespaceName, a as getDataFromOpenAPIDoc, b as isParamMediaTypeAllowed, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, g as invalidVariableNameCharactersToCamel, l as getTsTypeBase, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as GenerateType, x as formatTag, y as isMediaTypeAllowed } from "./generateCodeFromOpenAPIDoc-C0O8NiqP.mjs";
|
|
2
2
|
import SwaggerParser from "@apidevtools/swagger-parser";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/core/getMetadataFromOpenAPIDoc.ts
|
package/dist/sh.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as VALIDATION_ERROR_TYPE_TITLE, S as Profiler, a as getDataFromOpenAPIDoc, m as groupByType, n as getOutputFileName, u as getTagFileName, v as GenerateType } from "./generateCodeFromOpenAPIDoc-
|
|
3
|
-
import { n as resolveConfig, t as runGenerate } from "./generate.runner-
|
|
2
|
+
import { C as VALIDATION_ERROR_TYPE_TITLE, S as Profiler, a as getDataFromOpenAPIDoc, m as groupByType, n as getOutputFileName, u as getTagFileName, v as GenerateType } from "./generateCodeFromOpenAPIDoc-C0O8NiqP.mjs";
|
|
3
|
+
import { n as resolveConfig, t as runGenerate } from "./generate.runner-n8169vZL.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import yargs from "yargs";
|
|
6
6
|
import { hideBin } from "yargs/helpers";
|
|
@@ -39,7 +39,7 @@ function logBanner(message) {
|
|
|
39
39
|
* Fetch the version from package.json
|
|
40
40
|
*/
|
|
41
41
|
function getVersion() {
|
|
42
|
-
return "3.0.0-rc.
|
|
42
|
+
return "3.0.0-rc.5";
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
//#endregion
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Profiler } from "./generateCodeFromOpenAPIDoc-
|
|
2
|
-
import { t as runGenerate } from "./generate.runner-
|
|
1
|
+
import { S as Profiler } from "./generateCodeFromOpenAPIDoc-C0O8NiqP.mjs";
|
|
2
|
+
import { t as runGenerate } from "./generate.runner-n8169vZL.mjs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
//#region src/vite/openapi-codegen.plugin.ts
|