Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing swagger in horusec-analytics #27

Merged
merged 1 commit into from
Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions horusec-analytic/cmd/app/main.go
Original file line number Diff line number Diff line change
@@ -32,6 +32,10 @@ import (
// @contact.name Horusec
// @contact.url https://github.com/ZupIT/horusec
// @contact.email horusec@zup.com.br

// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func main() {
postgresRead := adapter.NewRepositoryRead()

82 changes: 82 additions & 0 deletions horusec-analytic/docs/docs.go
Original file line number Diff line number Diff line change
@@ -46,6 +46,11 @@ var doc = `{
"paths": {
"/api/dashboard/companies/{companyID}/all-vulnerabilities": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by severity",
"consumes": [
"application/json"
@@ -93,6 +98,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/details": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln details",
"consumes": [
"application/json"
@@ -143,6 +153,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/all-vulnerabilities": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by severity",
"consumes": [
"application/json"
@@ -197,6 +212,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/total-developers": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total developers",
"consumes": [
"application/json"
@@ -251,6 +271,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/total-repositories": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total repositories",
"consumes": [
"application/json"
@@ -305,6 +330,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-author": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by developer",
"consumes": [
"application/json"
@@ -359,6 +389,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-language": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by language",
"consumes": [
"application/json"
@@ -413,6 +448,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-repository": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by repository",
"consumes": [
"application/json"
@@ -467,6 +507,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-time": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by time",
"consumes": [
"application/json"
@@ -521,6 +566,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/total-developers": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total developers",
"consumes": [
"application/json"
@@ -568,6 +618,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/total-repositories": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total repositories",
"consumes": [
"application/json"
@@ -615,6 +670,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-author": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by author",
"consumes": [
"application/json"
@@ -662,6 +722,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-language": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by language",
"consumes": [
"application/json"
@@ -709,6 +774,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-repository": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by repository",
"consumes": [
"application/json"
@@ -756,6 +826,11 @@ var doc = `{
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-time": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by time",
"consumes": [
"application/json"
@@ -870,6 +945,13 @@ var doc = `{
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`

82 changes: 82 additions & 0 deletions horusec-analytic/docs/swagger.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,11 @@
"paths": {
"/api/dashboard/companies/{companyID}/all-vulnerabilities": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by severity",
"consumes": [
"application/json"
@@ -61,6 +66,11 @@
},
"/api/dashboard/companies/{companyID}/details": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln details",
"consumes": [
"application/json"
@@ -111,6 +121,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/all-vulnerabilities": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by severity",
"consumes": [
"application/json"
@@ -165,6 +180,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/total-developers": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total developers",
"consumes": [
"application/json"
@@ -219,6 +239,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/total-repositories": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total repositories",
"consumes": [
"application/json"
@@ -273,6 +298,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-author": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by developer",
"consumes": [
"application/json"
@@ -327,6 +357,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-language": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by language",
"consumes": [
"application/json"
@@ -381,6 +416,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-repository": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by repository",
"consumes": [
"application/json"
@@ -435,6 +475,11 @@
},
"/api/dashboard/companies/{companyID}/repositories/{repositoryID}/vulnerabilities-by-time": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get vuln by time",
"consumes": [
"application/json"
@@ -489,6 +534,11 @@
},
"/api/dashboard/companies/{companyID}/total-developers": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total developers",
"consumes": [
"application/json"
@@ -536,6 +586,11 @@
},
"/api/dashboard/companies/{companyID}/total-repositories": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total repositories",
"consumes": [
"application/json"
@@ -583,6 +638,11 @@
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-author": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by author",
"consumes": [
"application/json"
@@ -630,6 +690,11 @@
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-language": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by language",
"consumes": [
"application/json"
@@ -677,6 +742,11 @@
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-repository": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by repository",
"consumes": [
"application/json"
@@ -724,6 +794,11 @@
},
"/api/dashboard/companies/{companyID}/vulnerabilities-by-time": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get total vulnerabilities by time",
"consumes": [
"application/json"
@@ -838,5 +913,12 @@
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}
Loading