@oslo-flanders/swagger-generator 1.0.1 → 1.0.3
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/bin/runner.js
CHANGED
|
File without changes
|
|
@@ -98,7 +98,7 @@ let SwaggerGenerationService = class SwaggerGenerationService {
|
|
|
98
98
|
let requiredAttributes = {};
|
|
99
99
|
/* Get all attributes in a recursive manner for inheritance */
|
|
100
100
|
let attributeIds = [];
|
|
101
|
-
attributeIds = (0,
|
|
101
|
+
attributeIds = (0, core_1.findAllAttributes)(classId, attributeIds, this.store, this.logger);
|
|
102
102
|
if (!label) {
|
|
103
103
|
this.logger.error(`Unknown class label for ${classId.value}`);
|
|
104
104
|
continue;
|
|
@@ -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 =
|
|
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', {
|
|
28
|
-
|
|
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.
|
|
3
|
+
"version": "1.0.3",
|
|
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",
|