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

io.muserver.openapi.CallbackObjectBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package io.muserver.openapi;

import java.util.Map;

/**
 * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object
 * that describes a set of requests that may be initiated by the API provider and the expected responses. The key value
 * used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
 */
public class CallbackObjectBuilder {
    private Map callbacks;

    /**
     * @param callbacks A mapping of runtime expressions to path items.
     *                  See the spec
     *                  for details.
     * @return The current builder
     */
    public CallbackObjectBuilder withCallbacks(Map callbacks) {
        this.callbacks = callbacks;
        return this;
    }

    public CallbackObject build() {
        return new CallbackObject(callbacks);
    }

    /**
     * Creates a builder for a {@link CallbackObject}
     *
     * @return A new builder
     */
    public static CallbackObjectBuilder callbackObject() {
        return new CallbackObjectBuilder();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy