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 3027790 commit 6a572fa
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 @@ -443,7 +443,7 @@ data class SpecmaticConfig(

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

@JsonIgnore
Expand Down Expand Up @@ -570,7 +570,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 6a572fa

Please sign in to comment.