Package Services.ResponseAnalyzer
Class JsonSchemaGenerator
java.lang.Object
Services.ResponseAnalyzer.JsonSchemaGenerator
Provides utilities to generate a JSON Schema from a JSON string.
This class uses an external service (running on localhost:4000) to convert a JSON payload into a corresponding JSON Schema representation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateJSONSchema(String json) Generates a JSON Schema for the given JSON string by sending it to an external service.
-
Constructor Details
-
JsonSchemaGenerator
public JsonSchemaGenerator()
-
-
Method Details
-
generateJSONSchema
Generates a JSON Schema for the given JSON string by sending it to an external service.- Parameters:
json- the JSON string to generate a schema for- Returns:
- the JSON Schema as a string
- Throws:
IOException- if there is a network or I/O error while contacting the schema service
-