apigee-127 / swagger-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
701 stars 375 forks source link

Validation: disallow repeated path parameter name #178

Open mohsen1 opened 9 years ago

mohsen1 commented 9 years ago

raise a warning or error for this


---
swagger: '2.0'
info:
  version: 1.0.0
  title: Pets Store

paths:
  /{name}/{name}:
    get:
      parameters:
        - name: name
          in: path
          description: name
          type: string

      responses:
        200:
          description: Returns all the pets
whitlockjc commented 9 years ago

I wonder what @webron thinks about this.

webron commented 9 years ago

Definitely invalid.

whitlockjc commented 9 years ago

Works for me, I'll get on it.