Class OpenApiSchemaValidator

java.lang.Object
io.wcm.siteapi.openapi.validator.OpenApiSchemaValidator

public final class OpenApiSchemaValidator extends Object
Validates JSON response for a given path definition and suffix against the JSON. Create instance via OpenApiSpec class.
  • Method Details

    • getSuffix

      @NotNull public @NotNull String getSuffix()
      Returns:
      Suffix
    • validate

      public void validate(@NotNull @NotNull String jsonValue) throws ContentValidationException
      Validate the given JSON response against the operation's JSON schema.
      Parameters:
      jsonValue - JSON response
      Throws:
      ContentValidationException - Validation failed