├── examples └── v0.1 │ ├── api_project.json │ ├── api_project.js │ ├── api_data.json │ └── api_data.js ├── README.md ├── LICENSE.md └── specs └── v0.1.md /examples/v0.1/api_project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apidoc-example", 3 | "version": "0.3.0", 4 | "description": "apiDoc example project", 5 | "title": "Custom apiDoc browser title", 6 | "url": "https://api.github.com/v1", 7 | "sampleUrl": "https://playground.github.com/v1", 8 | "generator": { 9 | "version": "0.7.1", 10 | "time": "2014-08-22T16:15:45.522Z" 11 | }, 12 | "template": { 13 | "withCompare": true, 14 | "withGenerator": true 15 | }, 16 | "header": { 17 | "title": "Introduction", 18 | "content": "
Please visit apidocjs.com for the full documentation.
\n" 19 | }, 20 | "footer": { 21 | "title": "Epilogue", 22 | "content": "Suggestions, contact, support and error reporting on GitHub
\n" 23 | } 24 | } -------------------------------------------------------------------------------- /examples/v0.1/api_project.js: -------------------------------------------------------------------------------- 1 | define({ 2 | "name": "apidoc-example", 3 | "version": "0.3.0", 4 | "description": "apiDoc example project", 5 | "title": "Custom apiDoc browser title", 6 | "url": "https://api.github.com/v1", 7 | "sampleUrl": "https://playground.github.com/v1", 8 | "generator": { 9 | "version": "0.7.1", 10 | "time": "2014-08-22T16:15:45.522Z" 11 | }, 12 | "template": { 13 | "withCompare": true, 14 | "withGenerator": true 15 | }, 16 | "header": { 17 | "title": "Introduction", 18 | "content": "Please visit apidocjs.com for the full documentation.
\n" 19 | }, 20 | "footer": { 21 | "title": "Epilogue", 22 | "content": "Suggestions, contact, support and error reporting on GitHub
\n" 23 | } 24 | }); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # apiDoc Specification 2 | 3 | ## Welcome to apiDoc RESTful web API Documentation 4 | 5 | This project describe the specification of apiDoc, more precisely, the format returned by [apidoc](https://github.com/apidoc/apidoc). 6 | 7 | If you are an end user, please proceed to the [apidoc-documentation](http://apidocjs.com). 8 | 9 | 10 | ## Version 0.1 11 | 12 | apidoc-spec has its own version history, independent from the [apidoc](https://github.com/apidoc/apidoc) documentation generator. 13 | 14 | While apidoc-spec starts with version 0.1 the apidoc generator still is in version 0.x. 15 | 16 | Each specification has its own file in the [specs/](specs/) dir and each contain the changes to the previous. 17 | 18 | ### [apiDoc 0.1 Specification](specs/v0.1.md) 19 | 20 | 21 | ## Projects 22 | 23 | - [apidoc](https://github.com/apidoc/apidoc) Documentation generator 24 | - [apidocjs.com](http://apidocjs.com) End user documentation 25 | - [grunt-apidoc](https://github.com/apidoc/grunt-apidoc) Grunt module 26 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 inveris OHG 2 | Author Peter RottmannThe Users-ID.
" 213 | } 214 | ] 215 | } 216 | ``` 217 | _Hint: Yes it was a stupid idea, it was implemented because of the simpler processing in the handlebar template and will definitely changed in a future version._ 218 | 219 | 220 | 221 | ### Field object 222 | 223 | A single parameter field. 224 | 225 | | Name | Type | Description | 226 | | ---- | ---- | ----------- | 227 | | group | string | Group name of the field. The group is used for a grouped output of all fields that belong to a group, e.g. it can be used to show public and private fields. | 228 | | type | string | User defined field type, `"String"`, `"Number"`, `"Boolean"` | 229 | | field | string | Name of the.Please visit apidocjs.com for the full documentation.
\n" 261 | }, 262 | "footer": { 263 | "title": "Epilogue", 264 | "content": "Suggestions, contact, support and error reporting on GitHub
\n" 265 | } 266 | } 267 | ``` 268 | 269 | 270 | 271 | ### Project object 272 | 273 | | Name | Type | Description | 274 | | ---- | ---- | ----------- | 275 | | name | string | Name of the application. | 276 | | version | string | Version of the application (*not the apiDoc Specification or Generator version!*) - [semver 2](http://semver.org).Compare Verison 0.3.0 with 0.2.0 and you will see the green markers with new items in version 0.3.0 and red markers with removed items since 0.2.0.
", 15 | "parameter": { 16 | "fields": { 17 | "Parameter": [ 18 | { 19 | "group": "Parameter", 20 | "type": "String", 21 | "field": "id", 22 | "optional": false, 23 | "description": "The Users-ID.
" 24 | } 25 | ] 26 | } 27 | }, 28 | "examples": [ 29 | { 30 | "title": "Example usage:", 31 | "content": "curl -i http://localhost/user/4711\n" 32 | } 33 | ], 34 | "success": { 35 | "fields": { 36 | "Success 200": [ 37 | { 38 | "group": "Success 200", 39 | "type": "String", 40 | "field": "id", 41 | "optional": false, 42 | "description": "The Users-ID.
" 43 | }, 44 | { 45 | "group": "Success 200", 46 | "type": "Date", 47 | "field": "registered", 48 | "optional": false, 49 | "description": "Registration Date.
" 50 | }, 51 | { 52 | "group": "Success 200", 53 | "type": "Date", 54 | "field": "name", 55 | "optional": false, 56 | "description": "Fullname of the User.
" 57 | }, 58 | { 59 | "group": "Success 200", 60 | "type": "String[]", 61 | "field": "nicknames", 62 | "optional": false, 63 | "description": "List of Users nicknames (Array of Strings).
" 64 | }, 65 | { 66 | "group": "Success 200", 67 | "type": "Object", 68 | "field": "profile", 69 | "optional": false, 70 | "description": "Profile data (example for an Object)
" 71 | }, 72 | { 73 | "group": "Success 200", 74 | "type": "Number", 75 | "field": "profile.age", 76 | "optional": false, 77 | "description": "Users age.
" 78 | }, 79 | { 80 | "group": "Success 200", 81 | "type": "String", 82 | "field": "profile.image", 83 | "optional": false, 84 | "description": "Avatar-Image.
" 85 | }, 86 | { 87 | "group": "Success 200", 88 | "type": "Object[]", 89 | "field": "options", 90 | "optional": false, 91 | "description": "List of Users options (Array of Objects).
" 92 | }, 93 | { 94 | "group": "Success 200", 95 | "type": "String", 96 | "field": "options.name", 97 | "optional": false, 98 | "description": "Option Name.
" 99 | }, 100 | { 101 | "group": "Success 200", 102 | "type": "String", 103 | "field": "options.value", 104 | "optional": false, 105 | "description": "Option Value.
" 106 | } 107 | ] 108 | } 109 | }, 110 | "error": { 111 | "fields": { 112 | "Error 4xx": [ 113 | { 114 | "group": "Error 4xx", 115 | "field": "NoAccessRight", 116 | "optional": false, 117 | "description": "Only authenticated Admins can access the data.
" 118 | }, 119 | { 120 | "group": "Error 4xx", 121 | "field": "UserNotFound", 122 | "optional": false, 123 | "description": "The id of the User was not found.
Here you can describe the function.Multilines are possible.
", 149 | "parameter": { 150 | "fields": { 151 | "Parameter": [ 152 | { 153 | "group": "Parameter", 154 | "type": "String", 155 | "field": "id", 156 | "optional": false, 157 | "description": "The Users-ID.
" 158 | } 159 | ] 160 | } 161 | }, 162 | "success": { 163 | "fields": { 164 | "Success 200": [ 165 | { 166 | "group": "Success 200", 167 | "type": "String", 168 | "field": "id", 169 | "optional": false, 170 | "description": "The Users-ID.
" 171 | }, 172 | { 173 | "group": "Success 200", 174 | "type": "Date", 175 | "field": "name", 176 | "optional": false, 177 | "description": "Fullname of the User.
" 178 | } 179 | ] 180 | } 181 | }, 182 | "error": { 183 | "fields": { 184 | "Error 4xx": [ 185 | { 186 | "group": "Error 4xx", 187 | "field": "UserNotFound", 188 | "optional": false, 189 | "description": "The id of the User was not found.
Here you can describe the function.Multilines are possible.
", 209 | "parameter": { 210 | "fields": { 211 | "Parameter": [ 212 | { 213 | "group": "Parameter", 214 | "type": "String", 215 | "field": "id", 216 | "optional": false, 217 | "description": "The Users-ID.
" 218 | } 219 | ] 220 | } 221 | }, 222 | "success": { 223 | "fields": { 224 | "Success 200": [ 225 | { 226 | "group": "Success 200", 227 | "type": "String", 228 | "field": "id", 229 | "optional": false, 230 | "description": "The Users-ID.
" 231 | }, 232 | { 233 | "group": "Success 200", 234 | "type": "Date", 235 | "field": "name", 236 | "optional": false, 237 | "description": "Fullname of the User.
" 238 | } 239 | ] 240 | } 241 | }, 242 | "error": { 243 | "fields": { 244 | "Error 4xx": [ 245 | { 246 | "group": "Error 4xx", 247 | "field": "UserNotFound", 248 | "optional": false, 249 | "description": "The error description text in version 0.1.0.
" 250 | } 251 | ] 252 | } 253 | }, 254 | "filename": "source/example_full/_apidoc.js" 255 | }, 256 | { 257 | "type": "post", 258 | "url": "/user", 259 | "title": "Create a new User", 260 | "version": "0.3.0", 261 | "name": "PostUser", 262 | "group": "User", 263 | "permission": "none", 264 | "description": "In this case "apiErrorStructure" is defined and used.Define blocks with params that will be used in several functions, so you dont have to rewrite them.
", 265 | "parameter": { 266 | "fields": { 267 | "Parameter": [ 268 | { 269 | "group": "Parameter", 270 | "type": "String", 271 | "field": "name", 272 | "optional": false, 273 | "description": "Name of the User.
" 274 | } 275 | ] 276 | } 277 | }, 278 | "success": { 279 | "fields": { 280 | "Success 200": [ 281 | { 282 | "group": "Success 200", 283 | "type": "String", 284 | "field": "id", 285 | "optional": false, 286 | "description": "The new Users-ID.
" 287 | } 288 | ] 289 | } 290 | }, 291 | "error": { 292 | "fields": { 293 | "Error 4xx": [ 294 | { 295 | "group": "Error 4xx", 296 | "field": "NoAccessRight", 297 | "optional": false, 298 | "description": "Only authenticated Admins can access the data.
" 299 | }, 300 | { 301 | "group": "Error 4xx", 302 | "field": "UserNameTooShort", 303 | "optional": false, 304 | "description": "Minimum of 5 characters required.
" 305 | } 306 | ] 307 | }, 308 | "examples": [ 309 | { 310 | "title": " Response (example):", 311 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 312 | } 313 | ] 314 | }, 315 | "filename": "source/example_full/example.js" 316 | }, 317 | { 318 | "type": "post", 319 | "url": "/user", 320 | "title": "Create a User", 321 | "version": "0.2.0", 322 | "name": "PostUser", 323 | "group": "User", 324 | "permission": "none", 325 | "description": "In this case "apiErrorStructure" is defined and used.Define blocks with params that will be used in several functions, so you dont have to rewrite them.
", 326 | "parameter": { 327 | "fields": { 328 | "Parameter": [ 329 | { 330 | "group": "Parameter", 331 | "type": "String", 332 | "field": "name", 333 | "optional": false, 334 | "description": "Name of the User.
" 335 | } 336 | ] 337 | } 338 | }, 339 | "success": { 340 | "fields": { 341 | "Success 200": [ 342 | { 343 | "group": "Success 200", 344 | "type": "String", 345 | "field": "id", 346 | "optional": false, 347 | "description": "The Users-ID.
" 348 | } 349 | ] 350 | } 351 | }, 352 | "error": { 353 | "fields": { 354 | "Error 4xx": [ 355 | { 356 | "group": "Error 4xx", 357 | "field": "NoAccessRight", 358 | "optional": false, 359 | "description": "Only authenticated Admins can access the data.
" 360 | }, 361 | { 362 | "group": "Error 4xx", 363 | "field": "UserNameTooShort", 364 | "optional": false, 365 | "description": "Minimum of 5 characters required.
" 366 | } 367 | ] 368 | }, 369 | "examples": [ 370 | { 371 | "title": " Response (example):", 372 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 373 | } 374 | ] 375 | }, 376 | "filename": "source/example_full/_apidoc.js" 377 | }, 378 | { 379 | "type": "put", 380 | "url": "/user/:id", 381 | "title": "Change a new User", 382 | "version": "0.3.0", 383 | "name": "PutUser", 384 | "group": "User", 385 | "permission": "none", 386 | "description": "This function has same errors like POST /user, but errors not defined again, they were included with "apiErrorStructure"
", 387 | "parameter": { 388 | "fields": { 389 | "Parameter": [ 390 | { 391 | "group": "Parameter", 392 | "type": "String", 393 | "field": "name", 394 | "optional": false, 395 | "description": "Name of the User.
" 396 | } 397 | ] 398 | } 399 | }, 400 | "error": { 401 | "fields": { 402 | "Error 4xx": [ 403 | { 404 | "group": "Error 4xx", 405 | "field": "NoAccessRight", 406 | "optional": false, 407 | "description": "Only authenticated Admins can access the data.
" 408 | }, 409 | { 410 | "group": "Error 4xx", 411 | "field": "UserNameTooShort", 412 | "optional": false, 413 | "description": "Minimum of 5 characters required.
" 414 | } 415 | ] 416 | }, 417 | "examples": [ 418 | { 419 | "title": " Response (example):", 420 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 421 | } 422 | ] 423 | }, 424 | "filename": "source/example_full/example.js" 425 | }, 426 | { 427 | "version": "0.3.0", 428 | "group": "_apidoc.js", 429 | "type": "", 430 | "url": "", 431 | "filename": "source/example_full/_apidoc.js" 432 | }, 433 | { 434 | "version": "0.2.0", 435 | "error": { 436 | "fields": { 437 | "Error 4xx": [ 438 | { 439 | "group": "Error 4xx", 440 | "field": "NoAccessRight", 441 | "optional": false, 442 | "description": "Only authenticated Admins can access the data.
" 443 | }, 444 | { 445 | "group": "Error 4xx", 446 | "field": "UserNameTooShort", 447 | "optional": false, 448 | "description": "Minimum of 5 characters required.
" 449 | } 450 | ] 451 | }, 452 | "examples": [ 453 | { 454 | "title": " Response (example):", 455 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 456 | } 457 | ] 458 | }, 459 | "group": "_apidoc.js", 460 | "type": "", 461 | "url": "", 462 | "filename": "source/example_full/_apidoc.js" 463 | }, 464 | { 465 | "version": "0.1.0", 466 | "group": "_apidoc.js", 467 | "type": "", 468 | "url": "", 469 | "filename": "source/example_full/_apidoc.js" 470 | } 471 | ] -------------------------------------------------------------------------------- /examples/v0.1/api_data.js: -------------------------------------------------------------------------------- 1 | define({ api: [ 2 | { 3 | "type": "get", 4 | "url": "/user/:id", 5 | "title": "Read data of a User", 6 | "version": "0.3.0", 7 | "name": "GetUser", 8 | "group": "User", 9 | "permission": { 10 | "name": "admin", 11 | "title": "Admin access rights needed. ", 12 | "description": "Optionally you can write here further Informations about the permission.\n\nAn \"apiDefinePermission\"-block can have an \"apiVersion\", so you can attach the block to a specific version.\n" 13 | }, 14 | "description": "Compare Verison 0.3.0 with 0.2.0 and you will see the green markers with new items in version 0.3.0 and red markers with removed items since 0.2.0.
", 15 | "parameter": { 16 | "fields": { 17 | "Parameter": [ 18 | { 19 | "group": "Parameter", 20 | "type": "String", 21 | "field": "id", 22 | "optional": false, 23 | "description": "The Users-ID.
" 24 | } 25 | ] 26 | } 27 | }, 28 | "examples": [ 29 | { 30 | "title": "Example usage:", 31 | "content": "curl -i http://localhost/user/4711\n" 32 | } 33 | ], 34 | "success": { 35 | "fields": { 36 | "Success 200": [ 37 | { 38 | "group": "Success 200", 39 | "type": "String", 40 | "field": "id", 41 | "optional": false, 42 | "description": "The Users-ID.
" 43 | }, 44 | { 45 | "group": "Success 200", 46 | "type": "Date", 47 | "field": "registered", 48 | "optional": false, 49 | "description": "Registration Date.
" 50 | }, 51 | { 52 | "group": "Success 200", 53 | "type": "Date", 54 | "field": "name", 55 | "optional": false, 56 | "description": "Fullname of the User.
" 57 | }, 58 | { 59 | "group": "Success 200", 60 | "type": "String[]", 61 | "field": "nicknames", 62 | "optional": false, 63 | "description": "List of Users nicknames (Array of Strings).
" 64 | }, 65 | { 66 | "group": "Success 200", 67 | "type": "Object", 68 | "field": "profile", 69 | "optional": false, 70 | "description": "Profile data (example for an Object)
" 71 | }, 72 | { 73 | "group": "Success 200", 74 | "type": "Number", 75 | "field": "profile.age", 76 | "optional": false, 77 | "description": "Users age.
" 78 | }, 79 | { 80 | "group": "Success 200", 81 | "type": "String", 82 | "field": "profile.image", 83 | "optional": false, 84 | "description": "Avatar-Image.
" 85 | }, 86 | { 87 | "group": "Success 200", 88 | "type": "Object[]", 89 | "field": "options", 90 | "optional": false, 91 | "description": "List of Users options (Array of Objects).
" 92 | }, 93 | { 94 | "group": "Success 200", 95 | "type": "String", 96 | "field": "options.name", 97 | "optional": false, 98 | "description": "Option Name.
" 99 | }, 100 | { 101 | "group": "Success 200", 102 | "type": "String", 103 | "field": "options.value", 104 | "optional": false, 105 | "description": "Option Value.
" 106 | } 107 | ] 108 | } 109 | }, 110 | "error": { 111 | "fields": { 112 | "Error 4xx": [ 113 | { 114 | "group": "Error 4xx", 115 | "field": "NoAccessRight", 116 | "optional": false, 117 | "description": "Only authenticated Admins can access the data.
" 118 | }, 119 | { 120 | "group": "Error 4xx", 121 | "field": "UserNotFound", 122 | "optional": false, 123 | "description": "The id of the User was not found.
Here you can describe the function.Multilines are possible.
", 149 | "parameter": { 150 | "fields": { 151 | "Parameter": [ 152 | { 153 | "group": "Parameter", 154 | "type": "String", 155 | "field": "id", 156 | "optional": false, 157 | "description": "The Users-ID.
" 158 | } 159 | ] 160 | } 161 | }, 162 | "success": { 163 | "fields": { 164 | "Success 200": [ 165 | { 166 | "group": "Success 200", 167 | "type": "String", 168 | "field": "id", 169 | "optional": false, 170 | "description": "The Users-ID.
" 171 | }, 172 | { 173 | "group": "Success 200", 174 | "type": "Date", 175 | "field": "name", 176 | "optional": false, 177 | "description": "Fullname of the User.
" 178 | } 179 | ] 180 | } 181 | }, 182 | "error": { 183 | "fields": { 184 | "Error 4xx": [ 185 | { 186 | "group": "Error 4xx", 187 | "field": "UserNotFound", 188 | "optional": false, 189 | "description": "The id of the User was not found.
Here you can describe the function.Multilines are possible.
", 209 | "parameter": { 210 | "fields": { 211 | "Parameter": [ 212 | { 213 | "group": "Parameter", 214 | "type": "String", 215 | "field": "id", 216 | "optional": false, 217 | "description": "The Users-ID.
" 218 | } 219 | ] 220 | } 221 | }, 222 | "success": { 223 | "fields": { 224 | "Success 200": [ 225 | { 226 | "group": "Success 200", 227 | "type": "String", 228 | "field": "id", 229 | "optional": false, 230 | "description": "The Users-ID.
" 231 | }, 232 | { 233 | "group": "Success 200", 234 | "type": "Date", 235 | "field": "name", 236 | "optional": false, 237 | "description": "Fullname of the User.
" 238 | } 239 | ] 240 | } 241 | }, 242 | "error": { 243 | "fields": { 244 | "Error 4xx": [ 245 | { 246 | "group": "Error 4xx", 247 | "field": "UserNotFound", 248 | "optional": false, 249 | "description": "The error description text in version 0.1.0.
" 250 | } 251 | ] 252 | } 253 | }, 254 | "filename": "source/example_full/_apidoc.js" 255 | }, 256 | { 257 | "type": "post", 258 | "url": "/user", 259 | "title": "Create a new User", 260 | "version": "0.3.0", 261 | "name": "PostUser", 262 | "group": "User", 263 | "permission": "none", 264 | "description": "In this case "apiErrorStructure" is defined and used.Define blocks with params that will be used in several functions, so you dont have to rewrite them.
", 265 | "parameter": { 266 | "fields": { 267 | "Parameter": [ 268 | { 269 | "group": "Parameter", 270 | "type": "String", 271 | "field": "name", 272 | "optional": false, 273 | "description": "Name of the User.
" 274 | } 275 | ] 276 | } 277 | }, 278 | "success": { 279 | "fields": { 280 | "Success 200": [ 281 | { 282 | "group": "Success 200", 283 | "type": "String", 284 | "field": "id", 285 | "optional": false, 286 | "description": "The new Users-ID.
" 287 | } 288 | ] 289 | } 290 | }, 291 | "error": { 292 | "fields": { 293 | "Error 4xx": [ 294 | { 295 | "group": "Error 4xx", 296 | "field": "NoAccessRight", 297 | "optional": false, 298 | "description": "Only authenticated Admins can access the data.
" 299 | }, 300 | { 301 | "group": "Error 4xx", 302 | "field": "UserNameTooShort", 303 | "optional": false, 304 | "description": "Minimum of 5 characters required.
" 305 | } 306 | ] 307 | }, 308 | "examples": [ 309 | { 310 | "title": " Response (example):", 311 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 312 | } 313 | ] 314 | }, 315 | "filename": "source/example_full/example.js" 316 | }, 317 | { 318 | "type": "post", 319 | "url": "/user", 320 | "title": "Create a User", 321 | "version": "0.2.0", 322 | "name": "PostUser", 323 | "group": "User", 324 | "permission": "none", 325 | "description": "In this case "apiErrorStructure" is defined and used.Define blocks with params that will be used in several functions, so you dont have to rewrite them.
", 326 | "parameter": { 327 | "fields": { 328 | "Parameter": [ 329 | { 330 | "group": "Parameter", 331 | "type": "String", 332 | "field": "name", 333 | "optional": false, 334 | "description": "Name of the User.
" 335 | } 336 | ] 337 | } 338 | }, 339 | "success": { 340 | "fields": { 341 | "Success 200": [ 342 | { 343 | "group": "Success 200", 344 | "type": "String", 345 | "field": "id", 346 | "optional": false, 347 | "description": "The Users-ID.
" 348 | } 349 | ] 350 | } 351 | }, 352 | "error": { 353 | "fields": { 354 | "Error 4xx": [ 355 | { 356 | "group": "Error 4xx", 357 | "field": "NoAccessRight", 358 | "optional": false, 359 | "description": "Only authenticated Admins can access the data.
" 360 | }, 361 | { 362 | "group": "Error 4xx", 363 | "field": "UserNameTooShort", 364 | "optional": false, 365 | "description": "Minimum of 5 characters required.
" 366 | } 367 | ] 368 | }, 369 | "examples": [ 370 | { 371 | "title": " Response (example):", 372 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 373 | } 374 | ] 375 | }, 376 | "filename": "source/example_full/_apidoc.js" 377 | }, 378 | { 379 | "type": "put", 380 | "url": "/user/:id", 381 | "title": "Change a new User", 382 | "version": "0.3.0", 383 | "name": "PutUser", 384 | "group": "User", 385 | "permission": "none", 386 | "description": "This function has same errors like POST /user, but errors not defined again, they were included with "apiErrorStructure"
", 387 | "parameter": { 388 | "fields": { 389 | "Parameter": [ 390 | { 391 | "group": "Parameter", 392 | "type": "String", 393 | "field": "name", 394 | "optional": false, 395 | "description": "Name of the User.
" 396 | } 397 | ] 398 | } 399 | }, 400 | "error": { 401 | "fields": { 402 | "Error 4xx": [ 403 | { 404 | "group": "Error 4xx", 405 | "field": "NoAccessRight", 406 | "optional": false, 407 | "description": "Only authenticated Admins can access the data.
" 408 | }, 409 | { 410 | "group": "Error 4xx", 411 | "field": "UserNameTooShort", 412 | "optional": false, 413 | "description": "Minimum of 5 characters required.
" 414 | } 415 | ] 416 | }, 417 | "examples": [ 418 | { 419 | "title": " Response (example):", 420 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 421 | } 422 | ] 423 | }, 424 | "filename": "source/example_full/example.js" 425 | }, 426 | { 427 | "version": "0.3.0", 428 | "group": "_apidoc.js", 429 | "type": "", 430 | "url": "", 431 | "filename": "source/example_full/_apidoc.js" 432 | }, 433 | { 434 | "version": "0.2.0", 435 | "error": { 436 | "fields": { 437 | "Error 4xx": [ 438 | { 439 | "group": "Error 4xx", 440 | "field": "NoAccessRight", 441 | "optional": false, 442 | "description": "Only authenticated Admins can access the data.
" 443 | }, 444 | { 445 | "group": "Error 4xx", 446 | "field": "UserNameTooShort", 447 | "optional": false, 448 | "description": "Minimum of 5 characters required.
" 449 | } 450 | ] 451 | }, 452 | "examples": [ 453 | { 454 | "title": " Response (example):", 455 | "content": " HTTP/1.1 400 Bad Request\n {\n \"error\": \"UserNameTooShort\"\n }\n" 456 | } 457 | ] 458 | }, 459 | "group": "_apidoc.js", 460 | "type": "", 461 | "url": "", 462 | "filename": "source/example_full/_apidoc.js" 463 | }, 464 | { 465 | "version": "0.1.0", 466 | "group": "_apidoc.js", 467 | "type": "", 468 | "url": "", 469 | "filename": "source/example_full/_apidoc.js" 470 | } 471 | ] }); --------------------------------------------------------------------------------