use of io.vertx.ext.web.validation.impl.parameter.SingleValueParameterParser in project vertx-web by vert-x3.
the class JsonParameterProcessorGenerator method generate.
@Override
public ParameterProcessor generate(JsonObject parameter, JsonObject fakeSchema, JsonPointer parameterPointer, ParameterLocation parsedLocation, String parsedStyle, GeneratorContext context) {
JsonObject originalSchema = (JsonObject) SCHEMA_POINTER.queryJsonOrDefault(parameter, new JsonObject());
SchemaHolder schemas = context.getSchemaHolder(originalSchema, context.fakeSchema(fakeSchema), parameterPointer.copy().append("content").append("application/json").append("schema"));
return new ParameterProcessorImpl(parameter.getString("name"), parsedLocation, !parameter.getBoolean("required", false), new SingleValueParameterParser(parsedLocation.lowerCaseIfNeeded(parameter.getString("name")), ValueParser.JSON_PARSER), schemas.getValidator());
}
Aggregations