Forum Discussion

zx11ninja's avatar
zx11ninja
New Contributor
3 months ago

Consistent HTTP 500 Error When I Click Export API To SwaggerHUB

Hi all.

I am having an issue exporting my API to SwaggerHub.  I properly fill out the required fields (Name, API Version, Owner, Visibility).  However, each time I click the blue "Export API To SwaggerHub" button, I consistently get the response "Failex exporting testAPI 1version into SwaggerHub.  Error 500:"

I'm growing a little desparate, as I need to generate an OAS file to continue my development.  This 500 error is halting my progress.  I have rechecked my JSON for accuracy, and I see no errors.

Can someone please explain whether or not the issue is on my side or the SwaggerHub server side?

Thanks.

-Z

4 Replies

  • chewbika's avatar
    chewbika
    New Contributor

    I took the json file from export-spaces and import it in SwaggerHub using the web GUI.

    However, we noticed the imported OAS has 1) extra layers of spaces-related fields before  and after paths and 2) within paths, there is no responses included. We wanted to confirm this is the expected behaviour of the export-spaces then import via SwaggerHub.

    The SwaggerHub Explore's spaces with the postman is going to help cut-time on the documentation time tremendously. I wanted to check if I missed a step before I get too deep into the process. Ty.

    exploreSpaces:
      - id: 66465971-e5b6-41ac-8025-xxxx
        name: Okos
        apis:
          - connections:
              - id: 6ba1c3d2-2993-41fb-95c2-xxxx
                type: null
                name: REST
                schema: OpenAPI
                schemaVersion: 3.0.1
                connectionDefinition:
                  openapi: 3.0.0
                  servers:
                    - url: https://{removed}
                        responses: []
                        parameters:
                          - in: header
                            name: Content-Type
                            schema:
                              type: string
                            examples:
                              example:
                                value: application/json
  • Hi zx11ninja 

    Are you able to view any information already in SwaggerHub via the SwaggerHub option in the left menu pane of Explore?

    If your integration with SwaggerHub looks good, the perhaps you could 'export' your space using the Explore.CLI (https://www.nuget.org/packages/Explore.Cli) and attach it here?

    • chewbika's avatar
      chewbika
      New Contributor

      Morning frankkilcommins , i am facing the same issue now as the "export API to SwaggerHub" button consistantly returns 500. I see the API in SwaggerHub tab.

      Has this been fixed? or is the recommended approach just to use ExploreCLI? Ty

      Also, I notice I am getting quite a few websocket err logs even though I am not using any local API. Not sure if this may be related to 500 response code issue.

       

  • zx11ninja's avatar
    zx11ninja
    New Contributor

    Hi all.

    Additionally, I have created all of my HTTP requests and saved them in my space.  The last part is to export to SwaggerHub so that I can create an OAS file.

    Thoughts?

    Take care.

    -Z