joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
577 stars 99 forks source link

Only generating one request from a collection of 8 #256

Closed DMaxter closed 11 months ago

DMaxter commented 1 year ago

I have imported this WSDL API as a collection and then exported it using Collections V2.1. When I run the command against the exported API, I only get this:

openapi: 3.0.0
info:
  title: Calculator
  description: |+

  version: 1.0.0
servers:
  - url: http://{{calculatorsoapbaseurl}}
  - url: http://{{calculatorsoap12baseurl}}
tags:
  - name: CalculatorSoap
  - name: CalculatorSoap12
paths:
  /calculator.asmx:
    post:
      tags:
        - CalculatorSoap12
      summary: Divide
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: >-
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap12:Envelope
                xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\n
                <soap12:Body>\n    <Divide xmlns=\"http://tempuri.org/\">\n
                <intA>100</intA>\n      <intB>100</intB>\n    </Divide>\n
                </soap12:Body>\n</soap12:Envelope>\n"
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: text/xml; charset=utf-8
        - name: SOAPAction
          in: header
          schema:
            type: string
          example: http://tempuri.org/Divide
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: text/xml; charset=utf-8
          content:
            text/plain:
              schema:
                type: string
              example: >
                <?xml version="1.0" encoding="utf-8"?>

                <soap12:Envelope
                xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                  <soap12:Body>
                    <DivideResponse xmlns="http://tempuri.org/">
                      <DivideResult>100</DivideResult>
                    </DivideResponse>
                  </soap12:Body>
                </soap12:Envelope>

So, only one request is generated from a collection that contains 8. Does anyone have any idea?

joolfe commented 1 year ago

Hi @DMaxter,

Can you upload the Postman collection that you are using? To reproduce the problem I need to postman collection not the WSDL, because maybe the problem is in "imported this WSDL API as a collection" and not in the library.

Best Regards.

terzicaglar commented 1 year ago

Hi, I couldn't access to the link provided but I assume that it is similar to https://www.postman.com/rozumba-au/workspace/api-testing/documentation/10894997-6b6a1cee-4a5f-4886-8352-90c96b650a29 , therefore the reason may be related to WSDL. Since it is not REST API, and there is only one path "http://www.dneonline.com/calculator.asmx", this application may generate only one request. If there were more than one path, there could be more requests generated.

DMaxter commented 1 year ago

Now that you mention it. Seems like it. And the WSDL from link corresponds to that collection. But the generated collection has more than 1 request per path