 
 extension EndpointProcedure {
 
+    /// Creates `EndpointProcedure` connecting with HTTP endpoint.
+    ///
+    /// - Parameters:
+    ///   - requestData: specifies attributes of HTTP request.
+    ///   - validationProcedure: receives `HTTPResponseData` as an input.
+    /// Stops `EndpointProcedure`, if finishes with errors.
+    ///   - configuration: determines what `dataLoadingProcedureFactory`, `dataDeserializationProcedureFactory`
+    /// and `responseMappingProcedureFactory` should be used for coresponding procedures creation.
+    /// `Configuration.default` used if no value passed.
+    /// If no value passed and `Configuration.default` is not initialize,
+    /// `EndpointProcedure` will finish with `EndpointProcedureError.missingConfiguration
+    ///
     public convenience init<V: Procedure>(requestData: HTTPRequestData, validationProcedure: V, configuration: ConfigurationProtocol! = nil)
         where V: InputProcedure, V.Input == HTTPResponseData {
             let interceptionProcedure = HTTPDataFlowProcedure<Result>.createEmptyInterceptionProcedure()


import ProcedureKit

public enum EndpointProcedureError: Error {
    case missingConfiguration
    case pendingOutputAfterCompletion
}

private enum EndpointProcedureInitialization<Result> {
    case error(Error)
    case dataFlowProcedure(DataFlowProcedure<Result>)
}

open class EndpointProcedure<Result>: GroupProcedure, OutputProcedure {
    public var output: Pending<ProcedureResult<Result>> {
        get {
            switch self.initialization {

                      interceptionProcedure: interceptionProcedure, configuration: configuration)
    }

    /// Creates `EndpointProcedure` connecting with HTTP endpoint.
    ///
    /// - Parameters:
    ///   - requestData: specifies attributes of HTTP request.
    ///   - interceptionProcedure: receives deserialized response data as an input.
    /// Should transform input to a format expected by `mappingProcedure`.
    /// Stops `EndpointProcedure`, if finishes with errors.
    ///   - configuration: determines what `dataLoadingProcedureFactory`, `dataDeserializationProcedureFactory`
    /// and `responseMappingProcedureFactory` should be used for coresponding procedures creation.
    /// `Configuration.default` used if no value passed.
    /// If no value passed and `Configuration.default` is not initialize,
    /// `EndpointProcedure` will finish with `EndpointProcedureError.missingConfiguration
    ///
    public convenience init<I: Procedure>(requestData: HTTPRequestData, interceptionProcedure: I, configuration: ConfigurationProtocol! = nil)
        where I: InputProcedure & OutputProcedure, I.Input == Any, I.Output == Any {
            let validationProcedure = HTTPDataFlowProcedure<Result>.createEmptyValidationProcedure()
