Skip to content

Commit 4cd230e

Browse files
committed
Generated api schema for feature flags
1 parent 04b8b02 commit 4cd230e

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

controllers/featureFlags.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const featureFlagQuery = require('../models/featureFlags')
1010
const getFeatureFlags = async (req, res) => {
1111
try {
1212
const allFeatureFlags = await featureFlagQuery.fetchFeatureFlag()
13-
// console.log(res.status);
1413
return res.json({
1514
message: 'FeatureFlags returned successfully!',
1615
featureflags: allFeatureFlags.length > 0 ? allFeatureFlags : []

docs/swaggerDefinition.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,36 @@ const swaggerOptions = {
590590
}
591591
}
592592
},
593+
featureFlag: {
594+
type: 'object',
595+
properties: {
596+
name: {
597+
type: 'string'
598+
},
599+
id: {
600+
type: 'string'
601+
},
602+
title: {
603+
type: 'string'
604+
},
605+
created_at: {
606+
type: 'number'
607+
},
608+
updated_at: {
609+
type: 'number'
610+
},
611+
config: {
612+
type: 'object'
613+
},
614+
owner: {
615+
type: 'string'
616+
},
617+
launched_at: {
618+
type: 'number'
619+
}
620+
621+
}
622+
},
593623
errors: {
594624
unAuthorized: {
595625
type: 'object',

0 commit comments

Comments
 (0)