I can easily turn on the swagger option on the app navbar for any deployment through defining an environment variable SHOW_SWAGGER_UI_LINK
so that it is easy to access swagger when I need it, but I can easily turn it off when I don't.
Discussion
There is already code in the AppNavbar.js file that checks the value returned by /api/systemInfo for turning the Swagger link on and off. But, at the moment, the resource file isn't set up to pull that value from an environment variable.
This PR shows what changes are needed to make this work:
Your job is just to make similar changes in this repo.
You could also make a similar issue that allows users to turn on/off the H2 console via a variable called H2_CONSOLE_ENABLED. But it would be smart to do that in a separate PR so you get more points!
Acceptance Criteria
As a developer
[ ] When the config variable on dokku SHOW_SWAGGER_UI_LINK is set to true, the swagger link shows up
[ ] When the config variable on dokku SHOW_SWAGGER_UI_LINK is set to false, the swagger link does NOT show up.
User Story
SHOW_SWAGGER_UI_LINK
Discussion
There is already code in the AppNavbar.js file that checks the value returned by /api/systemInfo for turning the Swagger link on and off. But, at the moment, the resource file isn't set up to pull that value from an environment variable.
This PR shows what changes are needed to make this work:
https://github.com/ucsb-cs156/proj-courses/pull/93
Your job is just to make similar changes in this repo.
You could also make a similar issue that allows users to turn on/off the H2 console via a variable called
H2_CONSOLE_ENABLED
. But it would be smart to do that in a separate PR so you get more points!Acceptance Criteria
As a developer