All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pub.codex.apix.build.OperationBuilder Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package pub.codex.apix.build;

import org.springframework.http.HttpMethod;
import pub.codex.apix.schema.Operation;

import java.util.List;
import java.util.Map;

/**
 * api 选项内容构造器
 */
public class OperationBuilder {
    private HttpMethod method = HttpMethod.GET;
    private String summary;
    private List> params;
    private Map paramsBody;


    public OperationBuilder setMethod(HttpMethod method) {
        this.method = method;
        return this;
    }

    public OperationBuilder setSummary(String summary) {
        this.summary = summary;
        return this;
    }

    public OperationBuilder setParams(List> params) {
        this.params = params;
        return this;
    }

    public OperationBuilder setParamsBody(Map paramsBody) {
        this.paramsBody = paramsBody;
        return this;
    }

    public Operation build(){
        return new Operation(method, summary, params, paramsBody);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy