handleSwaggerResponse(
    transition, method, methodValue, transitionParams,
    responseValue, statusCode, schemes, resourceParams
  ) {
    const requestContentTypes = this.gatherRequestContentTypes(methodValue);
    const responseContentTypes = this
      .gatherResponseContentTypes(methodValue, responseValue.examples);

    responseContentTypes.forEach((responseContentType) => {
      let responseBody;

      if (responseContentType && responseValue.examples
          && responseValue.examples[responseContentType]) {
        responseBody = responseValue.examples[responseContentType];
      }

      requestContentTypes.forEach((requestContentType) => {
        const transaction = this.createTransaction(transition, method, schemes);

        this.handleSwaggerExampleRequest(
          transaction, methodValue, transitionParams,
          resourceParams, requestContentType, responseContentType, responseBody === undefined
        );

        this.handleSwaggerExampleResponse(
          transaction, methodValue, responseValue,
          statusCode, responseBody, responseContentType
        );
      });
    });
  }
// Convert a Swagger response & status code into Refract transactions.
Convert a Swagger response & status code into Refract transactions.
Convert a Swagger response & status code into Refract transactions .
handleSwaggerResponse(
    transition, method, methodValue, transitionParams,
    responseValue, statusCode, schemes, resourceParams
  ) {
    const requestContentTypes = this.gatherRequestContentTypes(methodValue);
    const responseContentTypes = this
      .gatherResponseContentTypes(methodValue, responseValue.examples);
    responseContentTypes.forEach((responseContentType) => {
      let responseBody;
      if (responseContentType && responseValue.examples
          && responseValue.examples[responseContentType]) {
        responseBody = responseValue.examples[responseContentType];
      }
      requestContentTypes.forEach((requestContentType) => {
        const transaction = this.createTransaction(transition, method, schemes);
        this.handleSwaggerExampleRequest(
          transaction, methodValue, transitionParams,
          resourceParams, requestContentType, responseContentType, responseBody === undefined
        );
        this.handleSwaggerExampleResponse(
          transaction, methodValue, responseValue,
          statusCode, responseBody, responseContentType
        );
      });
    });
  }
handleSwaggerResponse ( transition , method , methodValue , transitionParams , responseValue , statusCode , schemes , resourceParams ) { const requestContentTypes = this . gatherRequestContentTypes ( methodValue ) ; const responseContentTypes = this . gatherResponseContentTypes ( methodValue , responseValue . examples ) ; responseContentTypes . forEach ( ( responseContentType ) => { let responseBody ; if ( responseContentType && responseValue . examples && responseValue . examples [ responseContentType ] ) { responseBody = responseValue . examples [ responseContentType ] ; } requestContentTypes . forEach ( ( requestContentType ) => { const transaction = this . createTransaction ( transition , method , schemes ) ; this . handleSwaggerExampleRequest ( transaction , methodValue , transitionParams , resourceParams , requestContentType , responseContentType , responseBody === undefined ) ; this . handleSwaggerExampleResponse ( transaction , methodValue , responseValue , statusCode , responseBody , responseContentType ) ; } ) ; } ) ; }
Convert a Swagger response & status code into Refract transactions.
Convert a Swagger response & status code into Refract transactions .