Paw-OpenAPI3Importer icon indicating copy to clipboard operation
Paw-OpenAPI3Importer copied to clipboard

Import is empty - almost

Open jezzdk opened this issue 4 years ago • 11 comments

First off, I dont have a menu item in "File" that says "Import OpenAPI 3", so I've tried the File, Text and URL options instead. The result is the same.

This is my json file: https://gsv-navision-api.herokuapp.com/docs/api.json

This is how it looks after an import:

Screenshot 2021-06-16 at 15 32 53

All the request groups are empty and the only created request is deficient.

jezzdk avatar Jun 16 '21 13:06 jezzdk

Hi,

The same problem, I get this message:

Screenshot 2021-06-16 at 17 17 01

imclint21 avatar Jun 16 '21 14:06 imclint21

the same 👎 , Paw seems to be useful for some people ... I've paid for it 3 years ago and yet every time I try to make use of it , it disappoints. Response times on issues on twitter and emails are really slow. will be great news if we get inputs on this.

Thanks in advance

mshahat avatar Jun 17 '21 20:06 mshahat

@jezzdk @clintnetwork I've stub a patch to potentially fix your issues. Please see 0.1.1-beta.2, Downloadable Zip

Let me know if there are any other issues, we'll try our best to get this extension stable. Thanks!

pongstr avatar Jun 19 '21 10:06 pongstr

Hi

Still have this message:

Import process has successfully completed but no new items have been added to your document.

My Open API swagger file is: https://pastebin.com/raw/uV9TeVz8

imclint21 avatar Jun 20 '21 18:06 imclint21

hi @clintnetwork, I tried to validate your schema using these openapi validator tools:

  • https://apitools.dev/swagger-parser/online/
  • https://validator.swagger.io/

it seems that "paths.events.responses" cannot be an empty object (see the required field here), adding a description field should fix the issue like so:

{
  ...
  "paths": {
      "/events": {
      "summary": "Events",
      "get": {
        "tags": [
          "Events"
        ],
        "summary": " WebSocket Real-Time Notifications (SignalR)",

        // Please see OpenAPI docs in regards to responses: https://swagger.io/specification/#responses-object 
        // - The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.
        // - The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.
        "responses": {

          // In addition, a response object cannot be an empty object, the "description" 
          // field is required see https://swagger.io/specification/#response-object 
          "default": { 
            "description": ""
          },
 
          // optional responses...

          "200": {
            "description": "..."
          },

          "401": {
            "description": "..."
          }
        }
      }
    }
  }
}

after these corrections, the document imports the requests successfully. Please do note though that the plugin right now doesn't have a way to fill-in required fields (and perhaps we should add that feature as well).

thanks

pongstr avatar Jun 21 '21 07:06 pongstr

@pongstr I've been able to import my schema with the version you linked to. However I still don't have the option to explicitly import OpenAPI 3. I get an option to select the format after the import has started, however, because it fails to recognise it as OpenAPI 3.

jezzdk avatar Jun 21 '21 07:06 jezzdk

@jezzdk I understand your issue. I'll ask around with the team on how we can add the option to the File Menu, and will get back with you as I figured something out.

pongstr avatar Jun 21 '21 08:06 pongstr

Oh okey, thank you!

In fact I use swashbuckle and I created a custom endpoint so I surely do mistakes.

imclint21 avatar Jun 21 '21 08:06 imclint21

Finally I removed this /events endpoint, the import is done but I only see that:

Screenshot 2021-06-21 at 12 21 21

imclint21 avatar Jun 21 '21 09:06 imclint21

@clintnetwork please try to validate your openapi document first (please see the validators tools above), as pointed out earlier, this extension does not support fixing invalid documents/schemas, or filling-in required object fields.

pongstr avatar Jun 21 '21 09:06 pongstr

Hi, I also get the message No items imported when loading the official Apple App Store Connect API documentation.

It can be found here:

  • https://developer.apple.com/documentation/appstoreconnectapi
  • https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip

philprime avatar Nov 18 '21 09:11 philprime