Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate config for unevaluatedItems and unevaluatedProperties #1059

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions src/main/java/com/networknt/schema/SchemaValidatorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,54 +168,52 @@ public class SchemaValidatorsConfig {

/************************ START OF UNEVALUATED CHECKS **********************************/

// These are costly in terms of performance so we provide a way to disable them.
private boolean disableUnevaluatedItems = false;
private boolean disableUnevaluatedProperties = false;

@Deprecated
public SchemaValidatorsConfig disableUnevaluatedAnalysis() {
disableUnevaluatedItems();
disableUnevaluatedProperties();
return this;
}

@Deprecated
public SchemaValidatorsConfig disableUnevaluatedItems() {
this.disableUnevaluatedItems = true;
return this;
}

@Deprecated
public SchemaValidatorsConfig disableUnevaluatedProperties() {
this.disableUnevaluatedProperties = true;
return this;
}

@Deprecated
public SchemaValidatorsConfig enableUnevaluatedAnalysis() {
enableUnevaluatedItems();
enableUnevaluatedProperties();
return this;
}

@Deprecated
public SchemaValidatorsConfig enableUnevaluatedItems() {
this.disableUnevaluatedItems = false;
return this;
}

@Deprecated
public SchemaValidatorsConfig enableUnevaluatedProperties() {
this.disableUnevaluatedProperties = false;
return this;
}

@Deprecated
public boolean isUnevaluatedItemsAnalysisDisabled() {
return this.disableUnevaluatedItems;
return false;
}

@Deprecated
public boolean isUnevaluatedItemsAnalysisEnabled() {
return !isUnevaluatedItemsAnalysisDisabled();
}

@Deprecated
public boolean isUnevaluatedPropertiesAnalysisDisabled() {
return this.disableUnevaluatedProperties;
return false;
}

@Deprecated
public boolean isUnevaluatedPropertiesAnalysisEnabled() {
return !isUnevaluatedPropertiesAnalysisDisabled();
}
Expand Down