| OLD | NEW |
| 1 [ | 1 [ |
| 2 { | 2 { |
| 3 "namespace": "enums", | 3 "namespace": "enums", |
| 4 "description": "The enums API.", | 4 "description": "The enums API.", |
| 5 "types": [ | 5 "types": [ |
| 6 { | 6 { |
| 7 "id": "Enumeration", | 7 "id": "Enumeration", |
| 8 "type": "string", | 8 "type": "string", |
| 9 "enum": ["one", "two", "three"] | 9 "enum": ["one", "two", "three"] |
| 10 }, | 10 }, |
| 11 { | 11 { |
| 12 "id": "OtherEnumeration", |
| 13 "type": "string", |
| 14 "enum": ["spam", "ham", "eggs"] |
| 15 }, |
| 16 { |
| 12 "id": "EnumType", | 17 "id": "EnumType", |
| 13 "type": "object", | 18 "type": "object", |
| 14 "properties": { | 19 "properties": { |
| 15 "type": { | 20 "type": { |
| 16 "type": "string", | 21 "$ref": "Enumeration" |
| 17 "enum": ["one", "two", "three"] | |
| 18 } | 22 } |
| 19 } | 23 } |
| 20 }, | 24 }, |
| 21 { | 25 { |
| 22 "id": "HasEnumeration", | 26 "id": "HasEnumeration", |
| 23 "type": "object", | 27 "type": "object", |
| 24 "properties": { | 28 "properties": { |
| 25 "enumeration": { | 29 "enumeration": { |
| 26 "$ref": "Enumeration" | 30 "$ref": "Enumeration" |
| 27 }, | 31 }, |
| 28 "optional_enumeration": { | 32 "optional_enumeration": { |
| 29 "$ref": "Enumeration", | 33 "$ref": "Enumeration", |
| 30 "optional": true | 34 "optional": true |
| 31 } | 35 } |
| 32 } | 36 } |
| 33 }, | 37 }, |
| 34 { | 38 { |
| 35 "id": "InlineAndReferenceEnum", | 39 "id": "ReferenceEnum", |
| 36 "type": "object", | 40 "type": "object", |
| 37 "properties": { | 41 "properties": { |
| 38 "inline_enum": { | |
| 39 "type": "string", | |
| 40 "enum": ["test1", "test2", "test3"] | |
| 41 }, | |
| 42 "reference_enum": { | 42 "reference_enum": { |
| 43 "$ref": "Enumeration" | 43 "$ref": "Enumeration" |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 }, | 46 }, |
| 47 { | 47 { |
| 48 "id": "OptionalEnumType", | 48 "id": "OptionalEnumType", |
| 49 "type": "object", | 49 "type": "object", |
| 50 "properties": { | 50 "properties": { |
| 51 "type": { | 51 "type": { |
| 52 "type": "string", | 52 "$ref": "Enumeration", |
| 53 "enum": ["one", "two", "three"], | |
| 54 "optional": true | 53 "optional": true |
| 55 } | 54 } |
| 56 } | 55 } |
| 57 } | 56 } |
| 58 ], | 57 ], |
| 59 "functions": [ | 58 "functions": [ |
| 60 { | 59 { |
| 61 "name": "takesEnum", | 60 "name": "takesEnum", |
| 62 "type": "function", | 61 "type": "function", |
| 63 "description": "Takes an enum as its parameter.", | 62 "description": "Takes an enum as its parameter.", |
| 64 "parameters": [ | 63 "parameters": [ |
| 65 { | 64 { |
| 66 "name": "state", | 65 "name": "state", |
| 67 "type": "string", | 66 "$ref": "Enumeration" |
| 68 "enum": ["foo", "bar", "baz"] | |
| 69 }, | 67 }, |
| 70 { | 68 { |
| 71 "name": "callback", | 69 "name": "callback", |
| 72 "type": "function", | 70 "type": "function", |
| 73 "parameters": [] | 71 "parameters": [] |
| 74 } | 72 } |
| 75 ] | 73 ] |
| 76 }, | 74 }, |
| 77 { | 75 { |
| 78 "name": "takesEnumArray", | 76 "name": "takesEnumArray", |
| 79 "type": "function", | 77 "type": "function", |
| 80 "description": "Takes an enum array as its parameter.", | 78 "description": "Takes an enum array as its parameter.", |
| 81 "parameters": [ | 79 "parameters": [ |
| 82 { | 80 { |
| 83 "name": "values", | 81 "name": "values", |
| 84 "type": "array", | 82 "type": "array", |
| 85 "items": { | 83 "items": { |
| 86 "type": "string", | 84 "$ref": "Enumeration" |
| 87 "enum": ["foo", "bar", "baz"] | |
| 88 } | 85 } |
| 89 }, | 86 }, |
| 90 { | 87 { |
| 91 "name": "callback", | 88 "name": "callback", |
| 92 "type": "function", | 89 "type": "function", |
| 93 "parameters": [] | 90 "parameters": [] |
| 94 } | 91 } |
| 95 ] | 92 ] |
| 96 }, | 93 }, |
| 97 { | 94 { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 "name": "returnsEnum", | 130 "name": "returnsEnum", |
| 134 "type": "function", | 131 "type": "function", |
| 135 "description": "Returns an enum through the callback", | 132 "description": "Returns an enum through the callback", |
| 136 "parameters": [ | 133 "parameters": [ |
| 137 { | 134 { |
| 138 "name": "callback", | 135 "name": "callback", |
| 139 "type": "function", | 136 "type": "function", |
| 140 "parameters": [ | 137 "parameters": [ |
| 141 { | 138 { |
| 142 "name": "state", | 139 "name": "state", |
| 143 "type": "string", | 140 "$ref": "Enumeration" |
| 144 "enum": ["foo", "bar", "baz"] | |
| 145 } | 141 } |
| 146 ] | 142 ] |
| 147 } | 143 } |
| 148 ] | 144 ] |
| 149 }, | 145 }, |
| 150 { | 146 { |
| 151 "name": "returnsEnumAsType", | 147 "name": "returnsEnumAsType", |
| 152 "type": "function", | 148 "type": "function", |
| 153 "description": "Returns an enum through the callback", | 149 "description": "Returns an enum through the callback", |
| 154 "parameters": [ | 150 "parameters": [ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 168 "name": "returnsTwoEnums", | 164 "name": "returnsTwoEnums", |
| 169 "type": "function", | 165 "type": "function", |
| 170 "description": "Returns two enums through the callback", | 166 "description": "Returns two enums through the callback", |
| 171 "parameters": [ | 167 "parameters": [ |
| 172 { | 168 { |
| 173 "name": "callback", | 169 "name": "callback", |
| 174 "type": "function", | 170 "type": "function", |
| 175 "parameters": [ | 171 "parameters": [ |
| 176 { | 172 { |
| 177 "name": "firstState", | 173 "name": "firstState", |
| 178 "type": "string", | 174 "$ref": "Enumeration" |
| 179 "enum": ["foo", "bar", "baz"] | |
| 180 }, | 175 }, |
| 181 { | 176 { |
| 182 "name": "secondState", | 177 "name": "secondState", |
| 183 "type": "string", | 178 "$ref": "OtherEnumeration" |
| 184 "enum": ["spam", "ham", "eggs"] | |
| 185 } | 179 } |
| 186 ] | 180 ] |
| 187 } | 181 } |
| 188 ] | 182 ] |
| 189 }, | 183 }, |
| 190 { | 184 { |
| 191 "name": "takesOptionalEnum", | 185 "name": "takesOptionalEnum", |
| 192 "type": "function", | 186 "type": "function", |
| 193 "description": "Takes an enum as its parameter.", | 187 "description": "Takes an enum as its parameter.", |
| 194 "parameters": [ | 188 "parameters": [ |
| 195 { | 189 { |
| 196 "name": "state", | 190 "name": "state", |
| 197 "type": "string", | 191 "$ref": "Enumeration", |
| 198 "enum": ["foo", "bar", "baz"], | |
| 199 "optional": true | 192 "optional": true |
| 200 }, | 193 }, |
| 201 { | 194 { |
| 202 "name": "callback", | 195 "name": "callback", |
| 203 "type": "function", | 196 "type": "function", |
| 204 "parameters": [] | 197 "parameters": [] |
| 205 } | 198 } |
| 206 ] | 199 ] |
| 207 }, | 200 }, |
| 208 { | 201 { |
| 209 "name": "takesMultipleOptionalEnums", | 202 "name": "takesMultipleOptionalEnums", |
| 210 "type": "function", | 203 "type": "function", |
| 211 "description": "Takes two enums as parameters.", | 204 "description": "Takes two enums as parameters.", |
| 212 "parameters": [ | 205 "parameters": [ |
| 213 { | 206 { |
| 214 "name": "state", | 207 "name": "state", |
| 215 "type": "string", | 208 "$ref": "Enumeration", |
| 216 "enum": ["foo", "bar", "baz"], | |
| 217 "optional": true | 209 "optional": true |
| 218 }, | 210 }, |
| 219 { | 211 { |
| 220 "name": "type", | 212 "name": "type", |
| 221 "type": "string", | 213 "$ref": "OtherEnumeration", |
| 222 "enum": ["foo", "ding", "dong"], | |
| 223 "optional": true | 214 "optional": true |
| 224 }, | 215 }, |
| 225 { | 216 { |
| 226 "name": "callback", | 217 "name": "callback", |
| 227 "type": "function", | 218 "type": "function", |
| 228 "parameters": [] | 219 "parameters": [] |
| 229 } | 220 } |
| 230 ] | 221 ] |
| 231 } | 222 } |
| 232 ], | 223 ], |
| 233 "events": [ | 224 "events": [ |
| 234 { | 225 { |
| 235 "name": "onEnumFired", | 226 "name": "onEnumFired", |
| 236 "type": "function", | 227 "type": "function", |
| 237 "description": "Fired when an enum is ready.", | 228 "description": "Fired when an enum is ready.", |
| 238 "parameters": [ | 229 "parameters": [ |
| 239 { | 230 { |
| 240 "name": "someEnum", | 231 "name": "someEnum", |
| 241 "type": "string", | 232 "$ref": "Enumeration" |
| 242 "enum": ["foo", "bar", "baz"] | |
| 243 } | 233 } |
| 244 ] | 234 ] |
| 245 }, | 235 }, |
| 246 { | 236 { |
| 247 "name": "onTwoEnumsFired", | 237 "name": "onTwoEnumsFired", |
| 248 "type": "function", | 238 "type": "function", |
| 249 "description": "Fired when two enums are ready.", | 239 "description": "Fired when two enums are ready.", |
| 250 "parameters": [ | 240 "parameters": [ |
| 251 { | 241 { |
| 252 "name": "firstEnum", | 242 "name": "firstEnum", |
| 253 "type": "string", | 243 "$ref": "Enumeration" |
| 254 "enum": ["foo", "bar", "baz"] | |
| 255 }, | 244 }, |
| 256 { | 245 { |
| 257 "name": "secondEnum", | 246 "name": "secondEnum", |
| 258 "type": "string", | 247 "$ref": "OtherEnumeration" |
| 259 "enum": ["spam", "ham", "eggs"] | |
| 260 } | 248 } |
| 261 ] | 249 ] |
| 262 } | 250 } |
| 263 ] | 251 ] |
| 264 } | 252 } |
| 265 ] | 253 ] |
| OLD | NEW |