Skip to content

Commit

Permalink
Make bearerFile field of auth nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
sukesh2000 committed Feb 12, 2025
1 parent bf2a8a6 commit 8f51de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/kotlin/io/specmatic/core/SpecmaticConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ data class SpecmaticConfig(

@JsonIgnore
fun getAuthBearerFile(): String? {
return auth?.bearerFile
return auth?.let { it.bearerFile ?: "bearer.txt" }
}

@JsonIgnore
Expand Down Expand Up @@ -588,7 +588,7 @@ data class ResiliencyTestsConfig(
}

data class Auth(
@param:JsonProperty("bearer-file") val bearerFile: String = "bearer.txt",
@param:JsonProperty("bearer-file") val bearerFile: String? = null,
@param:JsonProperty("bearer-environment-variable") val bearerEnvironmentVariable: String? = null
)

Expand Down

0 comments on commit 8f51de4

Please sign in to comment.