Skip to content

Commit

Permalink
Merge pull request #56 from aerogear/framework-field
Browse files Browse the repository at this point in the history
feat: AppMetric struct accepts a Framework field
  • Loading branch information
wtrocki committed May 10, 2018
2 parents f2dd0e9 + 38c524e commit c37fb04
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ curl -i -X POST \
"app": {
"appId": "com.example.someApp",
"sdkVersion": "2.4.6",
"appVersion": "256"
"appVersion": "256",
"framework": "native"
},
"device": {
"platform": "android",
Expand Down
3 changes: 3 additions & 0 deletions pkg/mobile/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func TestCreateCallsDAOWithCorrectArgs(t *testing.T) {
ID: "12345678",
SDKVersion: "1.0.0",
AppVersion: "1",
Framework: "native",
},
Device: &DeviceMetric{
Platform: "Android",
Expand Down Expand Up @@ -77,6 +78,7 @@ func TestCreateReturnsErrorFromDAO(t *testing.T) {
ID: "12345678",
SDKVersion: "1.0.0",
AppVersion: "1",
Framework: "native",
},
Device: &DeviceMetric{
Platform: "Android",
Expand Down Expand Up @@ -115,6 +117,7 @@ func TestCreateCallsDaoWithCorrectTimestamp(t *testing.T) {
ID: "12345678",
SDKVersion: "1.0.0",
AppVersion: "1",
Framework: "native",
},
Device: &DeviceMetric{
Platform: "Android",
Expand Down
3 changes: 3 additions & 0 deletions pkg/mobile/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type AppMetric struct {
// required: true
// example: 2.1.0
AppVersion string `json:"appVersion"`
// required : true
// example: cordova
Framework string `json:"framework"`
}

// swagger:model
Expand Down

0 comments on commit c37fb04

Please sign in to comment.