Getry
Getry

Reputation: 31

Swagger: Duplicated mapping key definitions

Hello I'm pretty new to swagger and for the life of me I cannot find out how to fix the code for this error. I keep getting I'm having a duplicated mapping key and its at the bottom of the code linked below.

/channels/{country_code}/{category_slug}:
get:
  tags:
  - "Channels"
  summary: Get a list of all channels that a company has added to spotlight for a given category
  description: "This GET will return a list of all channels which are aviable to your API key and Category"
  operationID: "channels_slug_GET"
  parameters:
  - name: "country_code"
    in: "path"
    description: "The country the user is located in (retrievable via Geolocation service call)"
    required: true
    type: "string"
  - name: "category_slug"
    in: "path"
    description: "the category the channel(s) belong to"
    required: true
    type: "string"
  - name: "detail"
    in: "query"
    description: "As channel objects are fairly large, an optional parameter detail is introduced to most Spotlight API calls. It has two possible values - lean and partial.\n lean - specifying lean will return just the _id,title,slug, description, company, company_logo,poster, spotlight_poster,videos_thumb properties for a channel.\npartial - specifying partial will return the lean data for the channel plus limited data for the channel's video, playlist, and child channels"
    required: false
    type: "string"
  - name: "token"
    in: "query"
    description: "Your API access token (see /token route)"
    required: true
    type: "string"
  responses:
    200:
      description: "List of all available channels"
      schema:
        type: "array"
        items:
          $ref: "#/definitions/Channel"
    default:
      description: "Unexpected error"
      schema:
        $ref: "#/definitions/Error"

Upvotes: 3

Views: 9617

Answers (1)

bonthala deepu
bonthala deepu

Reputation: 21

you might have declared following url multiple times in the YAML.

"/channels/{country_code}/{category_slug}:"

Upvotes: 2

Related Questions