Skip to content

Commit

Permalink
chore(advisor): Remove Jackson annotations from configuration classes
Browse files Browse the repository at this point in the history
Remove the Jackson annotation from the advice provider configuration
classes as the configurations are not used for serialization anymore.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
  • Loading branch information
mnonnenmacher committed Oct 16, 2023
1 parent a8d501e commit 48ea526
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@

package org.ossreviewtoolkit.advisor.advisors

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonProperty

/**
* The configuration for the GitHub Defects advisor.
*/
data class GitHubDefectsConfiguration(
/**
* The access token to authenticate against the GitHub GraphQL endpoint.
*/
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
val token: String? = null,

/**
* The URL of the GraphQL endpoint to be accessed by the service. If undefined, default is the endpoint of the
* official GitHub GraphQL API.
*/
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
val endpointUrl: String? = null,

/**
Expand All @@ -59,7 +54,6 @@ data class GitHubDefectsConfiguration(
* Per default, some of GitHub's default labels are excluded that typically indicate that an issue is not a defect
* (see https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#about-default-labels)
*/
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
val labelFilter: List<String> = listOf("!duplicate", "!enhancement", "!invalid", "!question", "*"),

/**
Expand Down
5 changes: 0 additions & 5 deletions advisor/src/main/kotlin/advisors/NexusIqConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

package org.ossreviewtoolkit.advisor.advisors

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonProperty

/**
* The configuration for Nexus IQ as a security vulnerability provider.
*/
Expand All @@ -34,7 +31,6 @@ data class NexusIqConfiguration(
/**
* A URL to use as a base for browsing vulnerability details. Defaults to the server URL.
*/
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
val browseUrl: String = serverUrl,

Check warning on line 34 in advisor/src/main/kotlin/advisors/NexusIqConfiguration.kt

View check run for this annotation

Codecov / codecov/patch

advisor/src/main/kotlin/advisors/NexusIqConfiguration.kt#L34

Added line #L34 was not covered by tests

/**
Expand All @@ -47,6 +43,5 @@ data class NexusIqConfiguration(
* The password to use for authentication. If not both [username] and [password] are provided, authentication is
* disabled.
*/
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
val password: String? = null
)

Check warning on line 47 in advisor/src/main/kotlin/advisors/NexusIqConfiguration.kt

View check run for this annotation

Codecov / codecov/patch

advisor/src/main/kotlin/advisors/NexusIqConfiguration.kt#L46-L47

Added lines #L46 - L47 were not covered by tests
3 changes: 0 additions & 3 deletions advisor/src/main/kotlin/advisors/OssIndexConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

package org.ossreviewtoolkit.advisor.advisors

import com.fasterxml.jackson.annotation.JsonProperty

/**
* The configuration for the OSS Index provider.
*/
Expand All @@ -41,6 +39,5 @@ data class OssIndexConfiguration(
* The password to use for authentication. If not both [username] and [password] are provided, authentication is
* disabled.
*/
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
val password: String? = null
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

package org.ossreviewtoolkit.advisor.advisors

import com.fasterxml.jackson.annotation.JsonProperty

/**
* The configuration for VulnerableCode as security vulnerability provider.
*/
Expand All @@ -33,6 +31,5 @@ data class VulnerableCodeConfiguration(
/**
* The optional API key to use.
*/
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
val apiKey: String? = null
)

Check warning on line 35 in advisor/src/main/kotlin/advisors/VulnerableCodeConfiguration.kt

View check run for this annotation

Codecov / codecov/patch

advisor/src/main/kotlin/advisors/VulnerableCodeConfiguration.kt#L35

Added line #L35 was not covered by tests

0 comments on commit 48ea526

Please sign in to comment.