kevinswiber / postman2openapi

Convert a Postman collection to an OpenAPI definition.
Apache License 2.0
340 stars 54 forks source link

Only generating one request from a collection of 8 #46

Closed DMaxter closed 1 year 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.3
info:
  title: Calculator
  description: |2+

  version: 1.0.0
  contact: {}
servers:
- url: http://www.dneonline.com
paths:
  /calculator.asmx:
    post:
      tags:
      - CalculatorSoap12
      summary: Divide
      description: Divide
      operationId: divide1
      parameters:
      - name: SOAPAction
        in: header
        schema:
          type: string
          example: http://tempuri.org/Divide
      requestBody:
        content:
          text/plain:
            example: |
              <?xml version="1.0" encoding="utf-8"?>
              <soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                <soap12:Body>
                  <Divide xmlns="http://tempuri.org/">
                    <intA>100</intA>
                    <intB>100</intB>
                  </Divide>
                </soap12:Body>
              </soap12:Envelope>
      responses:
        '200':
          description: Divide response
          content:
            text/plain:
              examples:
                Divide response:
                  value: |
                    <?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>
tags:
- name: CalculatorSoap
- name: CalculatorSoap12

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

kevinswiber commented 1 year ago

There will only be 1 path item in this, because of how SOAP Web Services work, but we could do better with request body and response body examples. That would make this a duplicate of https://github.com/kevinswiber/postman2openapi/issues/29. Thanks for reporting it!