Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Incorrect parsing of parameters object #43

Open
kevprice83 opened this issue Jun 16, 2017 · 2 comments
Open

Incorrect parsing of parameters object #43

kevprice83 opened this issue Jun 16, 2017 · 2 comments
Assignees
Labels

Comments

@kevprice83
Copy link
Contributor

The following excerpt of a valid Swagger spec fails when creating the mapping rule:

paths:
  /coffees/{id}:
    get:
      tags:
      - "CoffeeObject"
      description: ""
      operationId: "getCoffeeObject"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - name: "user_key"
        in: "query"
        description: ""
        required: false
        type: "string"
      responses:
        200:
          description: ""
          schema:
            $ref: "#/definitions/Coffee"
    parameters:
    - name: "id"
      in: "path"
      description: ""
      required: true
      type: "string"

The second parameter declaration is defined as a direct child of the path item which results in the following error:

ERROR encountered on creating Mapping rule: {"http_method":["is not included in the list"]}

On the output of the import command you can see that the method is created in 3scale with the wrong HTTP verb:

Method _coffees__id__PARAMETERS with system_name _coffees__id__PARAMETERS created on 3scale.

Once the parameters object is moved inside the operation item the tool is able to import the swagger spec successfully.

cc @picsoung

@picsoung
Copy link
Contributor

hey @kevprice83
did you try the newest version pushed yesterday?

This problem should have been resolved.
Let me know

@kevprice83
Copy link
Contributor Author

@picsoung no I didn't. I wasn't aware this was already fixed. I will try on Monday, thanks for the quick turnaround

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants