We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9103a82 commit d8cc189Copy full SHA for d8cc189
2 files changed
VERSION
@@ -1 +1 @@
1
-1.0.2
+1.0.3
src/swaggerDefinition.js
@@ -1,17 +1,20 @@
+const fs = require('fs');
2
const swaggerJsdoc = require('swagger-jsdoc');
3
4
+// Read version from the VERSION file in the parent directory
5
+const version = fs.readFileSync('../VERSION', 'utf8').trim();
6
+
7
const options = {
8
swaggerDefinition: {
- openapi: '3.0.0',
9
+ openapi: '3.0.0',
10
info: {
11
title: 'GitHub Metadata API',
- version: '0.0.1',
12
+ version: version, // Use the version read from the file
13
},
14
15
apis: ['./src/metadataExtractor/routes.js', './src/metadataUpdater/routes.js'],
16
};
17
18
const swaggerSpecification = swaggerJsdoc(options);
19
-module.exports = swaggerSpecification;
-
20
+module.exports = swaggerSpecification;
0 commit comments