Skip to content

Commit

Permalink
feat(reports): Add Front50 API to retrieve all apps + fields in Appli…
Browse files Browse the repository at this point in the history
…cation model (#1818)

* feat(reports): Add Front50 API to retrieve all apps, add fields to Application model

* fix(pr): Default Application.createTs to null
  • Loading branch information
luispollo committed Feb 22, 2021
1 parent 474437a commit 390a1ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ interface Front50Service {
@Path("name") name: String,
@Header("X-SPINNAKER-USER") user: String = DEFAULT_SERVICE_ACCOUNT
): Application

@GET("/v2/applications")
suspend fun allApplications(
@Header("X-SPINNAKER-USER") user: String = DEFAULT_SERVICE_ACCOUNT
): List<Application>
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
package com.netflix.spinnaker.keel.front50.model

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter

/**
* A Spinnaker application, as represented in Front50.
*/
data class Application(
val name: String,
val email: String,
val dataSources: DataSources?,
val repoProjectKey: String? = null,
val repoSlug: String? = null,
val repoType: String? = null
)
val repoType: String? = null,
val createTs: String? = null,
@get:JsonAnyGetter val details: MutableMap<String, Any?> = mutableMapOf()
) {
@JsonAnySetter
fun setDetail(key: String, value: Any?) {
details[key] = value
}
}

data class DataSources(
val enabled: List<String>,
Expand Down

0 comments on commit 390a1ad

Please sign in to comment.