简体   繁体   中英

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"

您可能已在YAML中多次声明了以下网址。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM