Skip to content

Commit

Permalink
api,database: updated version_format documentation.
Browse files Browse the repository at this point in the history
Version format documentation is updated in the example of feature
struct and created in clair.proto along with accordingly generated
swagger and protobuf files.

Fixes #514
  • Loading branch information
Sida Chen committed Feb 2, 2018
1 parent 52a42b8 commit a75b8ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions api/v3/clairpb/clair.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions api/v3/clairpb/clair.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ message Feature{
string name = 1;
string namespace_name = 2;
string version = 3;

// version_format is the format used by installer package manager to store
// package versions.
string version_format = 4;
repeated Vulnerability vulnerabilities = 5;
}
Expand Down
3 changes: 2 additions & 1 deletion api/v3/clairpb/clair.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@
"type": "string"
},
"version_format": {
"type": "string"
"type": "string",
"description": "version_format is the format used by installer package manager to store\npackage versions."
},
"vulnerabilities": {
"type": "array",
Expand Down
4 changes: 2 additions & 2 deletions database/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ type Namespace struct {
// determined.
//
// e.g. Name: OpenSSL, Version: 1.0, VersionFormat: dpkg.
// dpkg implies the installer package manager but the namespace (might be
// debian:7, debian:8, ...) could not be determined.
// dpkg is the version format of the installer package manager, which in this
// case could be dpkg or apk.
type Feature struct {
Name string
Version string
Expand Down

0 comments on commit a75b8ac

Please sign in to comment.