Skip to content

Commit 3a5d8a9

Browse files
JsonIgnore and Deprecate scan request Config in favor of Policy. (#48)
JsonIgnore and Deprecate scan request Config in favor of Policy.
1 parent 39e3ba2 commit 3a5d8a9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/main/java/ai/nightfall/scan/model/ScanTextRequest.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package ai.nightfall.scan.model;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnore;
34
import com.fasterxml.jackson.annotation.JsonProperty;
45

56
import java.util.List;
@@ -61,10 +62,14 @@ public void setPayload(List<String> payload) {
6162
}
6263

6364
/**
64-
* Get the request scan policy. Same as <code>getPolicy</code>, just provided for backwards compatibility.
65+
* Get the request scan policy.
6566
*
6667
* @return the configuration to use to scan the <code>payload</code> data
68+
*
69+
* @deprecated alias for <code>getPolicy</code>, just provided for backwards compatibility.
6770
*/
71+
@Deprecated
72+
@JsonIgnore
6873
public ScanTextConfig getConfig() {
6974
return getPolicy();
7075
}
@@ -79,10 +84,14 @@ public ScanTextConfig getPolicy() {
7984
}
8085

8186
/**
82-
* Set the request scan policy. Same as <code>setPolicy</code>, just provided for backwards compatibility.
87+
* Set the request scan policy.
8388
*
8489
* @param config the configuration to use to scan the <code>payload</code> data
90+
*
91+
* @deprecated alias for <code>setPolicy</code>, just provided for backwards compatibility.
8592
*/
93+
@Deprecated
94+
@JsonIgnore
8695
public void setConfig(ScanTextConfig config) {
8796
setPolicy(config);
8897
}

0 commit comments

Comments
 (0)