1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
---
swagger: "2.0"
info:
title: "Spec with many duplicate things"
description: |
Check the following rules:
- params in path are unique
- no more than one param in body
- paths stripped from params are unique
- operationId is Unique
- params in operation are unique
version: "20170115"
basePath: /20170115
paths:
# Error: path params not unique
/loadBalancers/{loadBalancerId}/backendSets/{loadBalancerId}/get:
get:
description: Lists all backend sets associated with a given load balancer.
operationId: ope1
parameters:
- name: loadBalancerId
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
description: The list is being retrieved.
headers:
opc-response-id:
description: |
Unique identifier for the response.
type: string
# Error more than 1 param in body
/bigbody/get:
get:
description: Lists all backend sets associated with a given load balancer.
operationId: ope2
parameters:
- name: loadBalancerId2
in: body
type: string
required: true
- name: loadBalancerId3
in: body
type: string
required: true
produces:
- "application/json"
responses:
200:
# Error duplicate path
/duplpath/{id1}/get:
get:
description: Lists all backend sets associated with a given load balancer.
operationId: ope3
parameters:
- name: id1
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
/duplpath/{id2}/get:
get:
operationId: ope4
parameters:
- name: id2
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
# Error duplicate operationId (paths are different)
/duplope/{id1}/get:
get:
description: Lists all backend sets associated with a given load balancer (dupl).
operationId: ope5
parameters:
- name: id1
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
/duplope/{id2}/getThemAll:
get:
description: Lists all backend sets associated with a given load balancer (dupl).
operationId: ope5
parameters:
- name: id2
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
# Error duplicate operationId (same path, different methods)
/duplope2/{id1}/get:
get:
description: Lists all backend sets associated with a given load balancer (dupl).
operationId: ope6
parameters:
- name: id1
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
post:
description: Lists all backend sets associated with a given load balancer (dupl).
operationId: ope6
parameters:
- name: id1
in: path
type: string
required: true
produces:
- "application/json"
responses:
200:
# Error : duplicate params
/dupparam/get:
get:
description: Lists all backend sets associated with a given load balancer (dupl).
operationId: ope7
parameters:
- name: id2
in: query
type: string
- name: id2
in: query
type: string
produces:
- "application/json"
responses:
200:
|