public JsonSchemaBodyDTO(JsonSchemaBody jsonSchemaBody, Boolean not) { super(Body.Type.JSON_SCHEMA, not); this.jsonSchema = jsonSchemaBody.getValue(); }
@Override public void serialize(JsonSchemaBody jsonSchemaBody, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeStartObject(); if (jsonSchemaBody.getNot() != null && jsonSchemaBody.getNot()) { jgen.writeBooleanField("not", jsonSchemaBody.getNot()); } jgen.writeStringField("type", jsonSchemaBody.getType().name()); jgen.writeStringField("jsonSchema", jsonSchemaBody.getValue()); jgen.writeEndObject(); } }
output.append(".withBody("); JsonSchemaBody jsonSchemaBody = (JsonSchemaBody) request.getBody(); output.append("new JsonSchemaBody(\"").append(StringEscapeUtils.escapeJava(jsonSchemaBody.getValue())).append("\")"); output.append(")"); } else if (request.getBody() instanceof XmlBody) {
JsonSchemaBody jsonSchemaBody = (JsonSchemaBody) body; bodyDTOMatcher = new JsonSchemaBodyDTO(jsonSchemaBody); this.bodyMatcher = new JsonSchemaMatcher(mockServerLogger, jsonSchemaBody.getValue()); break; case JSON_PATH:
public JsonSchemaBodyDTO(JsonSchemaBody jsonSchemaBody, Boolean not) { super(Body.Type.JSON_SCHEMA, not); this.jsonSchema = jsonSchemaBody.getValue(); }
@Override public void serialize(JsonSchemaBody jsonSchemaBody, JsonGenerator jgen, SerializerProvider provider) throws IOException { jgen.writeStartObject(); if (jsonSchemaBody.getNot() != null && jsonSchemaBody.getNot()) { jgen.writeBooleanField("not", jsonSchemaBody.getNot()); } jgen.writeStringField("type", jsonSchemaBody.getType().name()); jgen.writeStringField("jsonSchema", jsonSchemaBody.getValue()); jgen.writeEndObject(); } }
output.append(".withBody("); JsonSchemaBody jsonSchemaBody = (JsonSchemaBody) request.getBody(); output.append("new JsonSchemaBody(\"").append(StringEscapeUtils.escapeJava(jsonSchemaBody.getValue())).append("\")"); output.append(")"); } else if (request.getBody() instanceof XmlBody) {
JsonSchemaBody jsonSchemaBody = (JsonSchemaBody) body; bodyDTOMatcher = new JsonSchemaBodyDTO(jsonSchemaBody); this.bodyMatcher = new JsonSchemaMatcher(mockServerLogger, jsonSchemaBody.getValue()); break; case JSON_PATH: