You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📝 Add docstrings to validator-json-schema-parser-migration
Docstrings generation was requested by @predic8.
* #2225 (comment)
The following files were modified:
* `core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/ValidatorInterceptor.java`
* `core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/json/JSONSchemaVersionParser.java`
* `core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/json/JSONYAMLSchemaValidator.java`
* `core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/json/MembraneSchemaLoader.java`
Copy file name to clipboardExpand all lines: core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/json/JSONSchemaVersionParser.java
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,28 @@
9
9
10
10
publicclassJSONSchemaVersionParser {
11
11
12
+
/**
13
+
* Resolve a JSON Schema version alias to its corresponding SpecVersion.VersionFlag.
14
+
*
15
+
* @param version a version alias such as "04", "draft-04", "07", "draft-2019-09" or "2020-12"
16
+
* @return the SpecVersion.VersionFlag that corresponds to the given alias
17
+
* @throws com.predic8.membrane.core.util.ConfigurationException if the alias is not a recognized JSON Schema version
Copy file name to clipboardExpand all lines: core/src/main/java/com/predic8/membrane/core/interceptor/schemavalidation/json/JSONYAMLSchemaValidator.java
+87Lines changed: 87 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,22 +59,50 @@ public class JSONYAMLSchemaValidator extends AbstractMessageValidator {
59
59
*/
60
60
JsonSchemaschema;
61
61
62
+
/**
63
+
* Construct a JSONYAMLSchemaValidator configured with a resolver, the JSON Schema source, a failure handler, and the schema version.
64
+
*
65
+
* @param resolver resolver used to load referenced schemas and resources
66
+
* @param jsonSchema the schema location or JSON/YAML schema content to validate against
67
+
* @param failureHandler handler used to build problem-detail responses on validation failures
68
+
* @param schemaVersion JSON Schema version identifier (e.g., "2020-12"); parsed into the validator's internal schemaId
0 commit comments