Search in sources :

Example 1 with ParameterEmitter

use of org.raml.jaxrs.emitters.ParameterEmitter in project raml-for-jax-rs by mulesoft-labs.

the class ModelEmitter method writeQueryParameters.

private void writeQueryParameters(Iterable<RamlQueryParameter> queryParameters, MethodBuilder builder) throws IOException {
    for (RamlQueryParameter parameter : queryParameters) {
        TypeHandler typeHandler = pickTypeHandler(parameter.getEntity().getType());
        ParameterEmitter parameterEmitter = new ParameterEmitter(typeRegistry, typeHandler);
        ParameterBuilder parameterBuilder = parameterEmitter.emit(parameter);
        builder.withQueryParameter(parameterBuilder);
    }
}
Also used : RamlToPojoTypeHandler(org.raml.emitter.plugins.RamlToPojoTypeHandler) TypeHandler(org.raml.jaxrs.plugins.TypeHandler) ParameterEmitter(org.raml.jaxrs.emitters.ParameterEmitter)

Example 2 with ParameterEmitter

use of org.raml.jaxrs.emitters.ParameterEmitter in project raml-for-jax-rs by mulesoft-labs.

the class ModelEmitter method writeHeaderParameters.

private void writeHeaderParameters(Iterable<RamlHeaderParameter> headerParameters, MethodBuilder builder) throws IOException {
    for (RamlHeaderParameter parameter : headerParameters) {
        TypeHandler typeHandler = pickTypeHandler(parameter.getEntity().getType());
        ParameterEmitter parameterEmitter = new ParameterEmitter(typeRegistry, typeHandler);
        ParameterBuilder parameterBuilder = parameterEmitter.emit(parameter);
        builder.withHeaderParameters(parameterBuilder);
    }
}
Also used : RamlToPojoTypeHandler(org.raml.emitter.plugins.RamlToPojoTypeHandler) TypeHandler(org.raml.jaxrs.plugins.TypeHandler) ParameterEmitter(org.raml.jaxrs.emitters.ParameterEmitter)

Aggregations

RamlToPojoTypeHandler (org.raml.emitter.plugins.RamlToPojoTypeHandler)2 ParameterEmitter (org.raml.jaxrs.emitters.ParameterEmitter)2 TypeHandler (org.raml.jaxrs.plugins.TypeHandler)2