api-farmer 0.0.26 → 0.0.27

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.
@@ -231,7 +231,9 @@ function renderApiModules(apiModules, options) {
231
231
  );
232
232
  }
233
233
  async function generateTypes(schema, output, typesFilename) {
234
- const ast = await openapiTS(schema);
234
+ const ast = await openapiTS(schema, {
235
+ defaultNonNullable: false
236
+ });
235
237
  const contents = astToString(ast);
236
238
  const typesFilepath = resolve(CWD, output, typesFilename);
237
239
  fse.outputFileSync(typesFilepath, contents);
package/dist/cli.cjs CHANGED
@@ -359,7 +359,9 @@ function renderApiModules(apiModules, options) {
359
359
  );
360
360
  }
361
361
  async function generateTypes(schema, output, typesFilename) {
362
- const ast = await (0, import_openapi_typescript.default)(schema);
362
+ const ast = await (0, import_openapi_typescript.default)(schema, {
363
+ defaultNonNullable: false
364
+ });
363
365
  const contents = (0, import_openapi_typescript.astToString)(ast);
364
366
  const typesFilepath = (0, import_path3.resolve)(CWD, output, typesFilename);
365
367
  import_fs_extra2.default.outputFileSync(typesFilepath, contents);
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import { Command } from "commander";
8
8
  var program = new Command();
9
9
  program.version(getCliVersion());
10
10
  program.action(async () => {
11
- const { generate } = await import("./generate-KSN6M7JH.js");
11
+ const { generate } = await import("./generate-LL4DHOHA.js");
12
12
  return generate();
13
13
  });
14
14
  program.parse();
@@ -4,7 +4,7 @@ import {
4
4
  partitionApiModules,
5
5
  renderApiModules,
6
6
  transformPayloads
7
- } from "./chunk-POFI6LCY.js";
7
+ } from "./chunk-WD3VOWJP.js";
8
8
  import "./chunk-56NOW5DM.js";
9
9
  export {
10
10
  generate,
package/dist/index.cjs CHANGED
@@ -398,7 +398,9 @@ function renderApiModules(apiModules, options) {
398
398
  );
399
399
  }
400
400
  async function generateTypes(schema, output, typesFilename) {
401
- const ast = await (0, import_openapi_typescript.default)(schema);
401
+ const ast = await (0, import_openapi_typescript.default)(schema, {
402
+ defaultNonNullable: false
403
+ });
402
404
  const contents = (0, import_openapi_typescript.astToString)(ast);
403
405
  const typesFilepath = (0, import_path3.resolve)(CWD, output, typesFilename);
404
406
  import_fs_extra2.default.outputFileSync(typesFilepath, contents);
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  transformTypeValue,
21
21
  transformUrl,
22
22
  transformVerb
23
- } from "./chunk-POFI6LCY.js";
23
+ } from "./chunk-WD3VOWJP.js";
24
24
  import {
25
25
  createStatusCodesByStrategy,
26
26
  findObjectKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-farmer",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "API module generation tool based on Openapi3/Swagger2.",
5
5
  "keywords": [
6
6
  "cli",