App now automagicly displays the current package version as the openapi version
ref #76
This commit is contained in:
parent
343cd8b772
commit
9355138a8c
@ -7,7 +7,8 @@ export const config = {
|
|||||||
development: process.env.NODE_ENV === "production",
|
development: process.env.NODE_ENV === "production",
|
||||||
jwt_secret: process.env.JWT_SECRET || "secretjwtsecret",
|
jwt_secret: process.env.JWT_SECRET || "secretjwtsecret",
|
||||||
phone_validation_countrycode: process.env.PHONE_COUNTRYCODE || "ZZ",
|
phone_validation_countrycode: process.env.PHONE_COUNTRYCODE || "ZZ",
|
||||||
postalcode_validation_countrycode: getPostalCodeLocale()
|
postalcode_validation_countrycode: getPostalCodeLocale(),
|
||||||
|
package_version: process.env.npm_package_version
|
||||||
}
|
}
|
||||||
let errors = 0
|
let errors = 0
|
||||||
if (typeof config.internal_port !== "number") {
|
if (typeof config.internal_port !== "number") {
|
||||||
|
@ -3,6 +3,7 @@ import express, { Application } from "express";
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { getMetadataArgsStorage } from "routing-controllers";
|
import { getMetadataArgsStorage } from "routing-controllers";
|
||||||
import { routingControllersToSpec } from "routing-controllers-openapi";
|
import { routingControllersToSpec } from "routing-controllers-openapi";
|
||||||
|
import { config } from '../config';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader for everything openapi related - from creating the schema to serving it via a static route and swaggerUiExpress.
|
* Loader for everything openapi related - from creating the schema to serving it via a static route and swaggerUiExpress.
|
||||||
@ -51,7 +52,7 @@ export default async (app: Application) => {
|
|||||||
info: {
|
info: {
|
||||||
description: "The the backend API for the LfK! runner system.",
|
description: "The the backend API for the LfK! runner system.",
|
||||||
title: "LfK! Backend API",
|
title: "LfK! Backend API",
|
||||||
version: "0.0.8",
|
version: config.package_version,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user