luckymarmot / API-Flow

Universal data structure and converter for API formats (Swagger, RAML, Paw, Postman…)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only parse valid HTTP methods and ignore others

lumaxis opened this issue · comments

We are using Swagger in an admittedly unusual way by annotating our swagger.yaml with some internal info, e.g. which controller class of our service will handle the request.

This looks something like this:

  /somePath:
    x-swagger-router-controller: somePathController
    get:
      description: Returns the some data

Now when using the Swagger Importer, it parses x-swagger-router-controller as just another HTTP method which us understandable but doesn't make sense in our case.
Would you be open to maybe add either a filtering for e.g. everything that starts with x- or maybe simply ignore anything that's not in a valid-HTTP-methods whitelist?

@lumaxis I'll look into it. shouldn't be too hard to fix. Thanks for the report!

@lumaxis This should be fixed in today's release (ETA: 2h)

here's a preview of what it should gives you if you import this kind of swagger files in Paw:

image

As you can see, we tried to keep that data by adding it to the description of the methods that have the same parent. If you're using the console tool, we'll work on a way of disabling this functionality in a later iteration, but that's not the priority right now.

fixed in PR #53

That looks perfect! Thanks a bunch, especially for the quick turnaround 🚀