github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/codegen/todolist.models.yml (about) 1 swagger: '2.0' 2 3 info: 4 version: "1.0.0" 5 title: Private to-do list 6 description: | 7 A very simple api description that makes a json only API to submit to do's. 8 9 produces: 10 - application/json 11 12 consumes: 13 - application/json 14 15 paths: 16 /models: 17 get: 18 operationId: modelOp 19 summary: many model variations 20 description: Used to see if a codegen can render all the possible parameter variations for a header param 21 tags: 22 - testcgen 23 responses: 24 default: 25 description: Generic Out 26 27 definitions: 28 flag: 29 type: string 30 minLength: 1 31 maxLength: 10 32 33 flags_list: 34 type: array 35 items: 36 $ref: "#/definitions/flag" 37 38 ImageTar: 39 type: string 40 format: binary 41 42 Tag: 43 type: "object" 44 required: 45 - name 46 properties: 47 name: 48 type: string 49 minLength: 2 50 maxLength: 50 51 Pattern: "[A-Za-z0-9][\\w- ]+" 52 53 Notable: 54 type: object 55 properties: 56 notes: 57 type: string 58 minLength: 5 59 60 Scores: 61 type: array 62 items: 63 type: number 64 format: float 65 66 JaggedScores: 67 type: array 68 items: 69 type: array 70 items: 71 type: array 72 items: 73 type: number 74 format: float 75 76 Notables: 77 type: array 78 items: 79 $ref: "#/definitions/Notable" 80 81 Notablix: 82 type: array 83 items: 84 type: array 85 items: 86 type: array 87 items: 88 $ref: "#/definitions/Notable" 89 90 Stats: 91 type: array 92 items: 93 type: object 94 properties: 95 points: 96 type: array 97 items: 98 type: integer 99 format: int64 100 101 Statix: 102 type: array 103 items: 104 type: array 105 items: 106 type: array 107 items: 108 type: object 109 properties: 110 points: 111 type: array 112 items: 113 type: integer 114 format: int64 115 116 WithItems: 117 type: object 118 properties: 119 tags: 120 type: array 121 items: 122 type: string 123 124 WithComplexItems: 125 type: object 126 properties: 127 tags: 128 type: array 129 items: 130 type: object 131 properties: 132 points: 133 type: array 134 items: 135 type: integer 136 format: int64 137 138 WithItemsAndAdditional2: 139 type: object 140 properties: 141 tags: 142 type: array 143 items: 144 - type: string 145 additionalItems: 146 type: integer 147 format: int32 148 149 WithComplexAdditional: 150 type: object 151 properties: 152 tags: 153 type: array 154 items: 155 - type: string 156 additionalItems: 157 type: object 158 properties: 159 points: 160 type: array 161 items: 162 type: integer 163 format: int64 164 165 WithItemsAndAdditional: 166 type: object 167 properties: 168 tags: 169 type: array 170 items: 171 - type: string 172 additionalItems: true 173 Age: 174 type: integer 175 format: int32 176 177 Nota: 178 type: object 179 additionalProperties: 180 type: integer 181 format: int32 182 183 NotaWithRef: 184 type: object 185 additionalProperties: 186 $ref: "#/definitions/Notable" 187 188 NotaWithMeta: 189 type: object 190 additionalProperties: 191 type: object 192 required: ["comment"] 193 properties: 194 comment: 195 type: string 196 count: 197 type: integer 198 format: int32 199 200 NotaWithName: 201 type: object 202 required: ["name"] 203 properties: 204 name: 205 type: string 206 additionalProperties: 207 type: integer 208 format: int32 209 210 NotaWithRefRegistry: 211 type: object 212 additionalProperties: 213 type: object 214 additionalProperties: 215 type: object 216 additionalProperties: 217 $ref: "#/definitions/Notable" 218 219 NotaWithMetaRegistry: 220 type: object 221 additionalProperties: 222 type: object 223 additionalProperties: 224 type: object 225 additionalProperties: 226 type: object 227 required: ["comment"] 228 properties: 229 comment: 230 type: string 231 count: 232 type: integer 233 format: int32 234 235 WithRef: 236 type: object 237 properties: 238 notes: 239 $ref: "#/definitions/Notable" 240 241 WithNullableRef: 242 type: object 243 properties: 244 notes: 245 allOf: 246 - $ref: "#/definitions/Notable" 247 - x-isnullable: true 248 249 WithMap: 250 type: object 251 properties: 252 data: 253 type: object 254 additionalProperties: 255 type: string 256 257 WithMapRef: 258 type: object 259 properties: 260 data: 261 type: object 262 additionalProperties: 263 $ref: "#/definitions/Notable" 264 265 WithMapInterface: 266 type: object 267 required: ["extraInfo"] 268 properties: 269 extraInfo: 270 type: object 271 additionalProperties: 272 type: object 273 274 275 WithMapComplex: 276 type: object 277 properties: 278 data: 279 type: object 280 additionalProperties: 281 type: object 282 properties: 283 comment: 284 type: string 285 count: 286 type: integer 287 format: int32 288 289 WithMapRegistry: 290 type: object 291 properties: 292 data: 293 type: object 294 additionalProperties: 295 type: object 296 additionalProperties: 297 type: object 298 additionalProperties: 299 type: string 300 301 WithMapRegistryRef: 302 type: object 303 properties: 304 data: 305 type: object 306 additionalProperties: 307 type: object 308 additionalProperties: 309 type: object 310 additionalProperties: 311 $ref: "#/definitions/Notable" 312 313 WithMapComplexRegistry: 314 type: object 315 properties: 316 data: 317 type: object 318 additionalProperties: 319 type: object 320 additionalProperties: 321 type: object 322 additionalProperties: 323 type: object 324 properties: 325 comment: 326 type: string 327 count: 328 type: integer 329 format: int32 330 331 WithAdditional: 332 type: object 333 properties: 334 data: 335 type: object 336 required: ["name"] 337 properties: 338 name: 339 type: string 340 additionalProperties: 341 type: string 342 343 SimpleTuple: 344 type: array 345 items: 346 - type: integer 347 format: int64 348 - type: string 349 - type: string 350 format: date-time 351 - $ref: "#/definitions/Notable" 352 - allOf: 353 - $ref: "#/definitions/Notable" 354 - x-isnullable: true 355 356 TupleWithExtra: 357 type: array 358 items: 359 - type: integer 360 format: int64 361 - type: string 362 - type: string 363 format: date-time 364 - $ref: "#/definitions/Notable" 365 additionalItems: 366 type: number 367 format: double 368 369 TupleWithComplex: 370 type: array 371 items: 372 - type: integer 373 format: int64 374 - type: string 375 - type: string 376 format: date-time 377 - $ref: "#/definitions/Notable" 378 additionalItems: 379 type: object 380 properties: 381 args: 382 type: array 383 items: 384 - type: string 385 additionalItems: 386 type: number 387 format: float 388 389 WithTuple: 390 type: object 391 properties: 392 flags: 393 type: array 394 items: 395 - type: integer 396 format: int64 397 - type: string 398 399 WithTupleWithExtra: 400 type: object 401 properties: 402 flags: 403 type: array 404 items: 405 - type: integer 406 format: int64 407 - type: string 408 additionalItems: 409 type: number 410 format: float 411 412 JustRef: 413 $ref: "#/definitions/Notable" 414 415 WithAllOf: 416 type: object 417 allOf: 418 - $ref: "#/definitions/Notable" 419 - type: object 420 additionalProperties: 421 type: integer 422 format: int32 423 - type: object 424 properties: 425 name: 426 type: string 427 additionalProperties: 428 type: integer 429 format: int64 430 - type: object 431 properties: 432 score: 433 type: number 434 format: float 435 count: 436 type: integer 437 format: int64 438 remark: 439 type: string 440 additionalProperties: 441 type: object 442 properties: 443 points: 444 type: array 445 items: 446 type: number 447 format: double 448 - type: array 449 items: 450 - type: number 451 format: float 452 - type: string 453 format: date-time 454 - type: array 455 items: 456 - type: number 457 format: double 458 - type: string 459 format: date 460 additionalItems: 461 type: string 462 format: password 463 - type: object 464 properties: 465 title: 466 type: string 467 minLength: 5 468 maxLength: 140 469 body: 470 type: string 471 minLength: 5 472 maxLength: 2048 473 params: 474 type: object 475 maxProperties: 20 476 additionalProperties: 477 type: object 478 properties: 479 opinion: 480 type: string 481 extra: 482 type: object 483 properties: 484 score: 485 type: number 486 format: float 487 count: 488 type: integer 489 format: int64 490 remark: 491 type: string 492 additionalProperties: 493 type: object 494 properties: 495 points: 496 type: array 497 items: 498 type: number 499 format: double 500 501 RecursiveThing: 502 type: object 503 properties: 504 parent: 505 $ref: "#/definitions/RecursiveThing" 506 WithPet: 507 type: object 508 properties: 509 id: 510 type: integer 511 format: int64 512 pet: 513 $ref: "#/definitions/Pet" 514 Pet: 515 type: object 516 discriminator: petType 517 properties: 518 name: 519 type: string 520 petType: 521 type: string 522 required: 523 - name 524 - petType 525 526 Cat: 527 type: object 528 description: A representation of a cat 529 allOf: 530 - $ref: '#/definitions/Pet' 531 - properties: 532 huntingSkill: 533 type: string 534 description: The measured skill for hunting 535 default: lazy 536 enum: 537 - clueless 538 - lazy 539 - adventurous 540 - aggressive 541 required: 542 - huntingSkill 543 544 Dog: 545 type: object 546 description: A representation of a dog 547 allOf: 548 - $ref: '#/definitions/Pet' 549 - properties: 550 packSize: 551 type: integer 552 format: int32 553 description: the size of the pack the dog is from 554 default: 0 555 minimum: 0 556 required: 557 - packSize 558 559 PetWithPets: 560 type: object 561 description: A representation of a Pet that keeps many pets 562 allOf: 563 - $ref: '#/definitions/Pet' 564 - properties: 565 pets: 566 type: array 567 items: 568 $ref: '#/definitions/Pet' 569 color: 570 type: string 571 required: 572 - pets 573 574 # provided as part of issue 72, it incorrectly detects this as an object with 575 # additional properties 576 RunParameters: 577 additionalProperties: false 578 type: object 579 description: Optional run parameters for activating the build trigger 580 properties: 581 branch_name: 582 type: string 583 description: '(SCM only) If specified, the name of the branch to build.' 584 refs: 585 type: object 586 description: '(SCM Only) If specified, the ref to build.' 587 commit_sha: 588 type: string 589 description: '(Custom Only) If specified, the ref/SHA1 used to checkout a git repository.' 590 591 Comment: 592 type: "object" 593 required: 594 - content 595 allOf: 596 - $ref: "#/definitions/Notable" 597 - type: object 598 additionalProperties: 599 type: integer 600 format: int32 601 - type: object 602 properties: 603 name: 604 type: string 605 additionalProperties: 606 type: integer 607 format: int32 608 - type: array 609 items: 610 - type: integer 611 format: int64 612 - type: string 613 format: date-time 614 - type: object 615 properties: 616 id: 617 title: The id of the comment. 618 description: A unique identifier for the comment. These are created in ascending order. 619 type: integer 620 format: int64 621 readOnly: true 622 scores: 623 $ref: "#/definitions/Scores" 624 age: 625 $ref: "#/definitions/Age" 626 latestTag: 627 type: object 628 allOf: 629 - $ref: "#/definitions/Tag" 630 - x-isnullable: true 631 tags: 632 type: array 633 uniqueItems: true 634 minItems: 1 635 maxItems: 5 636 items: 637 $ref: "#/definitions/Tag" 638 createdAt: 639 title: The time at which this comment was created. 640 description: This field is autogenerated when the content is posted. 641 type: string 642 format: date-time 643 readOnly: true 644 content: 645 type: object 646 allOf: 647 - $ref: "#/definitions/Notable" 648 - type: object 649 additionalProperties: 650 type: integer 651 format: int32 652 - type: object 653 properties: 654 name: 655 type: string 656 additionalProperties: 657 type: integer 658 format: int32 659 - type: array 660 items: 661 - type: integer 662 format: int64 663 - type: string 664 format: date-time 665 - type: object 666 properties: 667 title: 668 type: string 669 minLength: 5 670 maxLength: 140 671 body: 672 type: string 673 minLength: 5 674 maxLength: 2048 675 scores: 676 $ref: "#/definitions/Scores" 677 age: 678 $ref: "#/definitions/Age" 679 latestTag: 680 type: object 681 allOf: 682 - $ref: "#/definitions/Tag" 683 - x-isnullable: true 684 DynamicMetaData: 685 type: object 686 additionalProperties: 687 type: object 688 689 HasDynMeta: 690 type: object 691 properties: 692 metadata: 693 $ref: "#/definitions/DynamicMetaData" 694 695 WithCustomTag: 696 type: object 697 properties: 698 customtag: 699 type: string 700 x-go-custom-tag: mytag:"foo,bar" 701 702 HasSpecialCharProp: 703 type: object 704 properties: 705 type: 706 type: string 707 '@type': 708 type: string 709 710 ActionName: 711 type: string 712 minLength: 1 713 readOnly: true 714 715 ActionItem: 716 type: object 717 readOnly: true 718 required: 719 - name 720 properties: 721 name: 722 $ref: "#/definitions/ActionName" 723 724 Property: 725 description: A property of a resource 726 properties: 727 propType: 728 type: string 729 description: discriminating type of the property 730 computed: 731 type: boolean 732 description: is property computed 733 intval: 734 type: integer 735 format: int64 736 strval: 737 type: string 738 required: 739 - propType 740 - intval 741 - strval