mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
add swagger support
- install swaggo - add swagger config option
This commit is contained in:
@@ -42,6 +42,7 @@ type ConfigStructure struct { // nolint: maligned
|
||||
LogFormat string `json:"logFormat"`
|
||||
ServeInAPIMode bool `json:"serveInAPIMode"`
|
||||
DatabaseBackend DBConfig `json:"databaseBackend"`
|
||||
EnableSwaggerEndpoint bool `json:"enableSwaggerEndpoint"`
|
||||
}
|
||||
|
||||
// DBConfig
|
||||
@@ -180,6 +181,7 @@ var Config = ConfigStructure{
|
||||
LogLevel: "debug",
|
||||
LogFormat: "default",
|
||||
ServeInAPIMode: false,
|
||||
EnableSwaggerEndpoint: false,
|
||||
}
|
||||
|
||||
// LoadConfig loads configuration from json file
|
||||
|
||||
@@ -148,7 +148,8 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
" \"type\": \"\",\n"+
|
||||
" \"url\": \"\",\n"+
|
||||
" \"dbPath\": \"\"\n" +
|
||||
" }\n"+
|
||||
" },\n"+
|
||||
" \"enableSwaggerEndpoint\": false\n" +
|
||||
"}")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user