@oslo-flanders/swagger-generator 1.0.1 → 1.0.2

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,16 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.SwaggerGenerationServiceRunner = void 0;
7
4
  const core_1 = require("@oslo-flanders/core");
8
- const yargs_1 = __importDefault(require("yargs"));
9
5
  const DependencyInjectionConfig_1 = require("./config/DependencyInjectionConfig");
10
6
  class SwaggerGenerationServiceRunner extends core_1.AppRunner {
11
7
  async runCli(argv) {
12
- const yargv = (0, yargs_1.default)(argv.slice(2))
13
- .usage('node ./bin/runner.js [args]')
8
+ const yargv = this.createYargsInstance(argv.slice(2))
14
9
  .option('input', {
15
10
  describe: 'The input file to generate a Swagger OpenAPI JSON file from.',
16
11
  default: 'input.jsonld',
@@ -24,8 +19,12 @@ class SwaggerGenerationServiceRunner extends core_1.AppRunner {
24
19
  })
25
20
  .option('versionAPI', { describe: 'API version.' })
26
21
  .option('language', { describe: 'API language tag.', default: 'nl' })
27
- .option('title', { describe: 'API title.' })
28
- .option('description', { describe: 'API description.' })
22
+ .option('title', {
23
+ describe: 'API title.',
24
+ type: 'string',
25
+ array: false,
26
+ })
27
+ .option('description', { describe: 'API description.', array: false })
29
28
  .option('contextURL', { describe: 'API JSON-LD Context URL.' })
30
29
  .option('baseURL', { describe: 'API base URL.' })
31
30
  .option('contactName', { describe: 'API contact name.' })
@@ -10,6 +10,7 @@ exports.SwaggerGenerationServiceConfiguration = void 0;
10
10
  const inversify_1 = require("inversify");
11
11
  let SwaggerGenerationServiceConfiguration = class SwaggerGenerationServiceConfiguration {
12
12
  async createFromCli(params) {
13
+ console.log(params.title);
13
14
  this._input = params.input;
14
15
  this._output = params.output;
15
16
  this._language = params.language;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslo-flanders/swagger-generator",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Generate OpenAPI Swagger YAML documentation.",
5
5
  "author": "Digitaal Vlaanderen <https://data.vlaanderen.be/id/organisatie/OVO002949>",
6
6
  "homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-swagger#readme",