Package com.jetdrone.vertx.yoke.annotations

Examples of com.jetdrone.vertx.yoke.annotations.JsonSchema


        super(Router.class);
    }

    @Override
    public void process(Router router, Object instance, Class<?> clazz, Method method) {
        JsonSchema jsonSchema = Processor.getAnnotation(method, JsonSchema.class);

        if (jsonSchema == null) {
            return;
        }

        if (Processor.isCompatible(method, POST.class, YokeRequest.class, Handler.class)) {
            router.post(Processor.getAnnotation(method, POST.class).value(), wrap(JsonSchemaResolver.resolveSchema(jsonSchema.value())));
        }
        if (Processor.isCompatible(method, PUT.class, YokeRequest.class, Handler.class)) {
            router.put(Processor.getAnnotation(method, PUT.class).value(), wrap(JsonSchemaResolver.resolveSchema(jsonSchema.value())));
        }
        if (Processor.isCompatible(method, PATCH.class, YokeRequest.class, Handler.class)) {
            router.patch(Processor.getAnnotation(method, PATCH.class).value(), wrap(JsonSchemaResolver.resolveSchema(jsonSchema.value())));
        }
    }
View Full Code Here

TOP

Related Classes of com.jetdrone.vertx.yoke.annotations.JsonSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.