Refactor flight and distance models, enhance OpenAPI documentation, and improve Wear OS integrationffa46ec2 years ago1188 lines · 27.4 KB | 1 | { |
| 2 | "openapi": "3.0.0", |
| 3 | "paths": |
| 4 | "/v1": |
| 5 | "get": |
| 6 | "operationId": |
| 7 | "parameters": |
| 8 | "responses": |
| 9 | "200": |
| 10 | "description": |
| 11 | }, |
| 12 | "500": |
| 13 | "description": |
| 14 | "content": |
| 15 | "application/json": |
| 16 | "schema": |
| 17 | "$ref": |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | }, |
| 23 | "security": |
| 24 | { |
| 25 | "JWT-auth": |
| 26 | } |
| 27 | ], |
| 28 | "tags": |
| 29 | "App" |
| 30 | ] |
| 31 | } |
| 32 | }, |
| 33 | "/v1/auth/login": |
| 34 | "post": |
| 35 | "description": |
| 36 | "operationId": |
| 37 | "parameters": |
| 38 | "requestBody": |
| 39 | "required": |
| 40 | "content": |
| 41 | "application/json": |
| 42 | "schema": |
| 43 | "$ref": |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | }, |
| 48 | "responses": |
| 49 | "201": |
| 50 | "description": |
| 51 | "content": |
| 52 | "application/json": |
| 53 | "schema": |
| 54 | "$ref": |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | }, |
| 59 | "401": |
| 60 | "description": |
| 61 | "content": |
| 62 | "application/json": |
| 63 | "schema": |
| 64 | "$ref": |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | }, |
| 69 | "404": |
| 70 | "description": |
| 71 | "content": |
| 72 | "application/json": |
| 73 | "schema": |
| 74 | "$ref": |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | }, |
| 79 | "500": |
| 80 | "description": |
| 81 | "content": |
| 82 | "application/json": |
| 83 | "schema": |
| 84 | "$ref": |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | }, |
| 90 | "security": |
| 91 | { |
| 92 | "bearer": |
| 93 | } |
| 94 | ], |
| 95 | "summary": |
| 96 | "tags": |
| 97 | "Authentication" |
| 98 | ] |
| 99 | } |
| 100 | }, |
| 101 | "/v1/auth/register": |
| 102 | "post": |
| 103 | "description": |
| 104 | "operationId": |
| 105 | "parameters": |
| 106 | "requestBody": |
| 107 | "required": |
| 108 | "content": |
| 109 | "application/json": |
| 110 | "schema": |
| 111 | "$ref": |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | }, |
| 116 | "responses": |
| 117 | "201": |
| 118 | "description": |
| 119 | "content": |
| 120 | "application/json": |
| 121 | "schema": |
| 122 | "$ref": |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | }, |
| 127 | "409": |
| 128 | "description": |
| 129 | "content": |
| 130 | "application/json": |
| 131 | "schema": |
| 132 | "$ref": |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | }, |
| 137 | "500": |
| 138 | "description": |
| 139 | "content": |
| 140 | "application/json": |
| 141 | "schema": |
| 142 | "$ref": |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | }, |
| 148 | "security": |
| 149 | { |
| 150 | "bearer": |
| 151 | } |
| 152 | ], |
| 153 | "summary": |
| 154 | "tags": |
| 155 | "Authentication" |
| 156 | ] |
| 157 | } |
| 158 | }, |
| 159 | "/v1/auth/@me": |
| 160 | "get": |
| 161 | "description": |
| 162 | "operationId": |
| 163 | "parameters": |
| 164 | "responses": |
| 165 | "200": |
| 166 | "description": |
| 167 | "content": |
| 168 | "application/json": |
| 169 | "schema": |
| 170 | "$ref": |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | }, |
| 175 | "404": |
| 176 | "description": |
| 177 | "content": |
| 178 | "application/json": |
| 179 | "schema": |
| 180 | "$ref": |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | }, |
| 185 | "500": |
| 186 | "description": |
| 187 | "content": |
| 188 | "application/json": |
| 189 | "schema": |
| 190 | "$ref": |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | }, |
| 196 | "security": |
| 197 | { |
| 198 | "bearer": |
| 199 | }, |
| 200 | { |
| 201 | "JWT-auth": |
| 202 | } |
| 203 | ], |
| 204 | "summary": |
| 205 | "tags": |
| 206 | "Authentication" |
| 207 | ] |
| 208 | } |
| 209 | }, |
| 210 | "/v1/airports": |
| 211 | "get": |
| 212 | "description": |
| 213 | "operationId": |
| 214 | "parameters": |
| 215 | { |
| 216 | "name": |
| 217 | "required": |
| 218 | "in": |
| 219 | "description": |
| 220 | "schema": |
| 221 | "example": |
| 222 | "type": |
| 223 | } |
| 224 | } |
| 225 | ], |
| 226 | "responses": |
| 227 | "200": |
| 228 | "description": |
| 229 | "content": |
| 230 | "application/json": |
| 231 | "schema": |
| 232 | "type": |
| 233 | "items": |
| 234 | "$ref": |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | }, |
| 240 | "500": |
| 241 | "description": |
| 242 | "content": |
| 243 | "application/json": |
| 244 | "schema": |
| 245 | "$ref": |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | }, |
| 251 | "security": |
| 252 | { |
| 253 | "bearer": |
| 254 | } |
| 255 | ], |
| 256 | "summary": |
| 257 | "tags": |
| 258 | "Airports" |
| 259 | ] |
| 260 | } |
| 261 | }, |
| 262 | "/v1/airlines": |
| 263 | "get": |
| 264 | "description": |
| 265 | "operationId": |
| 266 | "parameters": |
| 267 | { |
| 268 | "name": |
| 269 | "required": |
| 270 | "in": |
| 271 | "description": |
| 272 | "schema": |
| 273 | "type": |
| 274 | } |
| 275 | } |
| 276 | ], |
| 277 | "responses": |
| 278 | "200": |
| 279 | "description": |
| 280 | "content": |
| 281 | "application/json": |
| 282 | "schema": |
| 283 | "type": |
| 284 | "items": |
| 285 | "$ref": |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | }, |
| 291 | "500": |
| 292 | "description": |
| 293 | "content": |
| 294 | "application/json": |
| 295 | "schema": |
| 296 | "$ref": |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | }, |
| 302 | "security": |
| 303 | { |
| 304 | "bearer": |
| 305 | } |
| 306 | ], |
| 307 | "summary": |
| 308 | "tags": |
| 309 | "Airlines" |
| 310 | ] |
| 311 | } |
| 312 | }, |
| 313 | "/v1/flights/airline": |
| 314 | "post": |
| 315 | "description": |
| 316 | "operationId": |
| 317 | "parameters": |
| 318 | "requestBody": |
| 319 | "required": |
| 320 | "content": |
| 321 | "application/json": |
| 322 | "schema": |
| 323 | "$ref": |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | }, |
| 328 | "responses": |
| 329 | "200": |
| 330 | "description": |
| 331 | "content": |
| 332 | "application/json": |
| 333 | "schema": |
| 334 | "$ref": |
| 335 | } |
| 336 | } |
| 337 | } |
| 338 | }, |
| 339 | "404": |
| 340 | "description": |
| 341 | "content": |
| 342 | "application/json": |
| 343 | "schema": |
| 344 | "$ref": |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | }, |
| 349 | "500": |
| 350 | "description": |
| 351 | "content": |
| 352 | "application/json": |
| 353 | "schema": |
| 354 | "$ref": |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | }, |
| 360 | "security": |
| 361 | { |
| 362 | "JWT-auth": |
| 363 | } |
| 364 | ], |
| 365 | "summary": |
| 366 | "tags": |
| 367 | "Flights" |
| 368 | ] |
| 369 | } |
| 370 | }, |
| 371 | "/v1/flights": |
| 372 | "get": |
| 373 | "description": |
| 374 | "operationId": |
| 375 | "parameters": |
| 376 | { |
| 377 | "name": |
| 378 | "required": |
| 379 | "in": |
| 380 | "description": |
| 381 | "schema": |
| 382 | "example": |
| 383 | "type": |
| 384 | } |
| 385 | }, |
| 386 | { |
| 387 | "name": |
| 388 | "required": |
| 389 | "in": |
| 390 | "description": |
| 391 | "schema": |
| 392 | "example": |
| 393 | "type": |
| 394 | } |
| 395 | }, |
| 396 | { |
| 397 | "name": |
| 398 | "required": |
| 399 | "in": |
| 400 | "description": |
| 401 | "schema": |
| 402 | "example": |
| 403 | "type": |
| 404 | } |
| 405 | } |
| 406 | ], |
| 407 | "responses": |
| 408 | "200": |
| 409 | "description": |
| 410 | "content": |
| 411 | "application/json": |
| 412 | "schema": |
| 413 | "$ref": |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | }, |
| 418 | "401": |
| 419 | "description": |
| 420 | "content": |
| 421 | "application/json": |
| 422 | "schema": |
| 423 | "$ref": |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | }, |
| 428 | "500": |
| 429 | "description": |
| 430 | "content": |
| 431 | "application/json": |
| 432 | "schema": |
| 433 | "$ref": |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | } |
| 438 | }, |
| 439 | "security": |
| 440 | { |
| 441 | "JWT-auth": |
| 442 | } |
| 443 | ], |
| 444 | "summary": |
| 445 | "tags": |
| 446 | "Flights" |
| 447 | ] |
| 448 | } |
| 449 | }, |
| 450 | "/v1/flight": |
| 451 | "get": |
| 452 | "description": |
| 453 | "operationId": |
| 454 | "parameters": |
| 455 | { |
| 456 | "name": |
| 457 | "required": |
| 458 | "in": |
| 459 | "description": |
| 460 | "schema": |
| 461 | "example": |
| 462 | "type": |
| 463 | } |
| 464 | }, |
| 465 | { |
| 466 | "name": |
| 467 | "required": |
| 468 | "in": |
| 469 | "description": |
| 470 | "schema": |
| 471 | "example": |
| 472 | "type": |
| 473 | } |
| 474 | }, |
| 475 | { |
| 476 | "name": |
| 477 | "required": |
| 478 | "in": |
| 479 | "schema": |
| 480 | "type": |
| 481 | } |
| 482 | }, |
| 483 | { |
| 484 | "name": |
| 485 | "required": |
| 486 | "in": |
| 487 | "description": |
| 488 | "schema": |
| 489 | "example": |
| 490 | "type": |
| 491 | } |
| 492 | } |
| 493 | ], |
| 494 | "responses": |
| 495 | "200": |
| 496 | "description": |
| 497 | "content": |
| 498 | "application/json": |
| 499 | "schema": |
| 500 | "$ref": |
| 501 | } |
| 502 | } |
| 503 | } |
| 504 | }, |
| 505 | "400": |
| 506 | "description": |
| 507 | "content": |
| 508 | "application/json": |
| 509 | "schema": |
| 510 | "$ref": |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | }, |
| 515 | "401": |
| 516 | "description": |
| 517 | "content": |
| 518 | "application/json": |
| 519 | "schema": |
| 520 | "$ref": |
| 521 | } |
| 522 | } |
| 523 | } |
| 524 | }, |
| 525 | "500": |
| 526 | "description": |
| 527 | "content": |
| 528 | "application/json": |
| 529 | "schema": |
| 530 | "$ref": |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | } |
| 535 | }, |
| 536 | "security": |
| 537 | { |
| 538 | "JWT-auth": |
| 539 | } |
| 540 | ], |
| 541 | "summary": |
| 542 | "tags": |
| 543 | "Flight" |
| 544 | ] |
| 545 | } |
| 546 | } |
| 547 | }, |
| 548 | "info": |
| 549 | "title": |
| 550 | "description": |
| 551 | "version": |
| 552 | "contact": |
| 553 | }, |
| 554 | "tags": |
| 555 | "servers": |
| 556 | "components": |
| 557 | "securitySchemes": |
| 558 | "JWT-auth": |
| 559 | "scheme": |
| 560 | "bearerFormat": |
| 561 | "type": |
| 562 | } |
| 563 | }, |
| 564 | "schemas": |
| 565 | "LoginDTO": |
| 566 | "type": |
| 567 | "properties": |
| 568 | "email": |
| 569 | "type": |
| 570 | }, |
| 571 | "password": |
| 572 | "type": |
| 573 | } |
| 574 | }, |
| 575 | "required": |
| 576 | "email", |
| 577 | "password" |
| 578 | ] |
| 579 | }, |
| 580 | "UserEntity": |
| 581 | "type": |
| 582 | "properties": |
| 583 | "name": |
| 584 | "type": |
| 585 | }, |
| 586 | "id": |
| 587 | "type": |
| 588 | } |
| 589 | }, |
| 590 | "required": |
| 591 | "name", |
| 592 | "id" |
| 593 | ] |
| 594 | }, |
| 595 | "LoginEntity": |
| 596 | "type": |
| 597 | "properties": |
| 598 | "token": |
| 599 | "type": |
| 600 | "description": |
| 601 | }, |
| 602 | "user": |
| 603 | "$ref": |
| 604 | } |
| 605 | }, |
| 606 | "required": |
| 607 | "token", |
| 608 | "user" |
| 609 | ] |
| 610 | }, |
| 611 | "GenericErrorEntity": |
| 612 | "type": |
| 613 | "properties": |
| 614 | "message": |
| 615 | "type": |
| 616 | } |
| 617 | }, |
| 618 | "required": |
| 619 | "message" |
| 620 | ] |
| 621 | }, |
| 622 | "RegisterDTO": |
| 623 | "type": |
| 624 | "properties": |
| 625 | "email": |
| 626 | "type": |
| 627 | }, |
| 628 | "password": |
| 629 | "type": |
| 630 | }, |
| 631 | "name": |
| 632 | "type": |
| 633 | } |
| 634 | }, |
| 635 | "required": |
| 636 | "email", |
| 637 | "password", |
| 638 | "name" |
| 639 | ] |
| 640 | }, |
| 641 | "RegisterEntity": |
| 642 | "type": |
| 643 | "properties": |
| 644 | "token": |
| 645 | "type": |
| 646 | "description": |
| 647 | }, |
| 648 | "user": |
| 649 | "$ref": |
| 650 | } |
| 651 | }, |
| 652 | "required": |
| 653 | "token", |
| 654 | "user" |
| 655 | ] |
| 656 | }, |
| 657 | "AirportType": |
| 658 | "type": |
| 659 | "enum": |
| 660 | "small_airport", |
| 661 | "seaplane_base", |
| 662 | "medium_airport", |
| 663 | "large_airport", |
| 664 | "heliport", |
| 665 | "closed", |
| 666 | "balloonport" |
| 667 | ] |
| 668 | }, |
| 669 | "AirportEntity": |
| 670 | "type": |
| 671 | "properties": |
| 672 | "id": |
| 673 | "type": |
| 674 | }, |
| 675 | "ident": |
| 676 | "type": |
| 677 | "example": |
| 678 | }, |
| 679 | "type": |
| 680 | "allOf": |
| 681 | { |
| 682 | "$ref": |
| 683 | } |
| 684 | ] |
| 685 | }, |
| 686 | "elevation": |
| 687 | "type": |
| 688 | "description": |
| 689 | }, |
| 690 | "continent": |
| 691 | "type": |
| 692 | "examples": |
| 693 | "AS", |
| 694 | "EU" |
| 695 | ] |
| 696 | }, |
| 697 | "isoCountry": |
| 698 | "type": |
| 699 | }, |
| 700 | "isoRegion": |
| 701 | "type": |
| 702 | }, |
| 703 | "municipality": |
| 704 | "type": |
| 705 | }, |
| 706 | "gpsCode": |
| 707 | "type": |
| 708 | }, |
| 709 | "iataCode": |
| 710 | "type": |
| 711 | "description": |
| 712 | }, |
| 713 | "name": |
| 714 | "type": |
| 715 | }, |
| 716 | "lat": |
| 717 | "type": |
| 718 | }, |
| 719 | "long": |
| 720 | "type": |
| 721 | } |
| 722 | }, |
| 723 | "required": |
| 724 | "id", |
| 725 | "ident", |
| 726 | "type", |
| 727 | "continent", |
| 728 | "isoCountry", |
| 729 | "isoRegion", |
| 730 | "name", |
| 731 | "lat", |
| 732 | "long" |
| 733 | ] |
| 734 | }, |
| 735 | "AirlineEntity": |
| 736 | "type": |
| 737 | "properties": |
| 738 | "id": |
| 739 | "type": |
| 740 | }, |
| 741 | "name": |
| 742 | "type": |
| 743 | }, |
| 744 | "icao": |
| 745 | "type": |
| 746 | }, |
| 747 | "iata": |
| 748 | "type": |
| 749 | }, |
| 750 | "image": |
| 751 | "type": |
| 752 | } |
| 753 | }, |
| 754 | "required": |
| 755 | "id", |
| 756 | "name", |
| 757 | "icao", |
| 758 | "iata" |
| 759 | ] |
| 760 | }, |
| 761 | "GetAirlineDTO": |
| 762 | "type": |
| 763 | "properties": |
| 764 | "search": |
| 765 | "type": |
| 766 | "description": |
| 767 | } |
| 768 | }, |
| 769 | "required": |
| 770 | "search" |
| 771 | ] |
| 772 | }, |
| 773 | "FlightsRouteEntity": |
| 774 | "type": |
| 775 | "properties": |
| 776 | "from": |
| 777 | "type": |
| 778 | }, |
| 779 | "to": |
| 780 | "type": |
| 781 | } |
| 782 | }, |
| 783 | "required": |
| 784 | "from", |
| 785 | "to" |
| 786 | ] |
| 787 | }, |
| 788 | "AirlineInfo": |
| 789 | "type": |
| 790 | "properties": |
| 791 | "name": |
| 792 | "type": |
| 793 | }, |
| 794 | "iataCode": |
| 795 | "type": |
| 796 | }, |
| 797 | "icaoCode": |
| 798 | "type": |
| 799 | } |
| 800 | }, |
| 801 | "required": |
| 802 | "name", |
| 803 | "iataCode" |
| 804 | ] |
| 805 | }, |
| 806 | "AircraftFlightEntity": |
| 807 | "type": |
| 808 | "properties": |
| 809 | "iataNumber": |
| 810 | "type": |
| 811 | }, |
| 812 | "icaoNumber": |
| 813 | "type": |
| 814 | }, |
| 815 | "number": |
| 816 | "type": |
| 817 | } |
| 818 | }, |
| 819 | "required": |
| 820 | "iataNumber", |
| 821 | "icaoNumber", |
| 822 | "number" |
| 823 | ] |
| 824 | }, |
| 825 | "AirportInfo": |
| 826 | "type": |
| 827 | "properties": |
| 828 | "actualRunway": |
| 829 | "type": |
| 830 | }, |
| 831 | "actualTime": |
| 832 | "type": |
| 833 | }, |
| 834 | "baggage": |
| 835 | "type": |
| 836 | }, |
| 837 | "delay": |
| 838 | "type": |
| 839 | "description": |
| 840 | }, |
| 841 | "estimatedRunway": |
| 842 | "type": |
| 843 | }, |
| 844 | "estimatedTime": |
| 845 | "type": |
| 846 | }, |
| 847 | "gate": |
| 848 | "type": |
| 849 | }, |
| 850 | "iataCode": |
| 851 | "type": |
| 852 | }, |
| 853 | "icaoCode": |
| 854 | "type": |
| 855 | }, |
| 856 | "scheduledTime": |
| 857 | "type": |
| 858 | }, |
| 859 | "terminal": |
| 860 | "type": |
| 861 | } |
| 862 | } |
| 863 | }, |
| 864 | "FlightStatus": |
| 865 | "type": |
| 866 | "enum": |
| 867 | "scheduled", |
| 868 | "active", |
| 869 | "landed", |
| 870 | "cancelled", |
| 871 | "incident", |
| 872 | "diverted", |
| 873 | "unknown" |
| 874 | ] |
| 875 | }, |
| 876 | "FlighType": |
| 877 | "type": |
| 878 | "enum": |
| 879 | "arrival", |
| 880 | "departure" |
| 881 | ] |
| 882 | }, |
| 883 | "FlightEntity": |
| 884 | "type": |
| 885 | "properties": |
| 886 | "airline": |
| 887 | "$ref": |
| 888 | }, |
| 889 | "flight": |
| 890 | "$ref": |
| 891 | }, |
| 892 | "departure": |
| 893 | "$ref": |
| 894 | }, |
| 895 | "arrival": |
| 896 | "$ref": |
| 897 | }, |
| 898 | "status": |
| 899 | "allOf": |
| 900 | { |
| 901 | "$ref": |
| 902 | } |
| 903 | ] |
| 904 | }, |
| 905 | "type": |
| 906 | "allOf": |
| 907 | { |
| 908 | "$ref": |
| 909 | } |
| 910 | ] |
| 911 | }, |
| 912 | "codeshared": |
| 913 | "type": |
| 914 | } |
| 915 | }, |
| 916 | "required": |
| 917 | "airline", |
| 918 | "flight", |
| 919 | "departure", |
| 920 | "arrival", |
| 921 | "status", |
| 922 | "type", |
| 923 | "codeshared" |
| 924 | ] |
| 925 | }, |
| 926 | "FlightsResponseEntity": |
| 927 | "type": |
| 928 | "properties": |
| 929 | "success": |
| 930 | "type": |
| 931 | }, |
| 932 | "date": |
| 933 | "type": |
| 934 | }, |
| 935 | "route": |
| 936 | "$ref": |
| 937 | }, |
| 938 | "flightCount": |
| 939 | "type": |
| 940 | }, |
| 941 | "flights": |
| 942 | "type": |
| 943 | "items": |
| 944 | "$ref": |
| 945 | } |
| 946 | } |
| 947 | }, |
| 948 | "required": |
| 949 | "success", |
| 950 | "date", |
| 951 | "route", |
| 952 | "flightCount", |
| 953 | "flights" |
| 954 | ] |
| 955 | }, |
| 956 | "AircraftEntity": |
| 957 | "type": |
| 958 | "properties": |
| 959 | "modeS": |
| 960 | "type": |
| 961 | }, |
| 962 | "registration": |
| 963 | "type": |
| 964 | }, |
| 965 | "model": |
| 966 | "type": |
| 967 | }, |
| 968 | "image": |
| 969 | "type": |
| 970 | }, |
| 971 | "aircraft_id": |
| 972 | "type": |
| 973 | }, |
| 974 | "age": |
| 975 | "type": |
| 976 | }, |
| 977 | "firstFlightDate": |
| 978 | "type": |
| 979 | }, |
| 980 | "deliveryDate": |
| 981 | "type": |
| 982 | }, |
| 983 | "isFreighter": |
| 984 | "type": |
| 985 | }, |
| 986 | "attribution": |
| 987 | "type": |
| 988 | } |
| 989 | }, |
| 990 | "required": |
| 991 | "registration", |
| 992 | "model" |
| 993 | ] |
| 994 | }, |
| 995 | "PartialAirlineEntity": |
| 996 | "type": |
| 997 | "properties": |
| 998 | "name": |
| 999 | "type": |
| 1000 | }, |
| 1001 | "iata": |
| 1002 | "type": |
| 1003 | }, |
| 1004 | "icao": |
| 1005 | "type": |
| 1006 | } |
| 1007 | }, |
| 1008 | "required": |
| 1009 | "name" |
| 1010 | ] |
| 1011 | }, |
| 1012 | "LocationEntity": |
| 1013 | "type": |
| 1014 | "properties": |
| 1015 | "lat": |
| 1016 | "type": |
| 1017 | }, |
| 1018 | "lon": |
| 1019 | "type": |
| 1020 | } |
| 1021 | }, |
| 1022 | "required": |
| 1023 | "lat", |
| 1024 | "lon" |
| 1025 | ] |
| 1026 | }, |
| 1027 | "RouteAirportEntity": |
| 1028 | "type": |
| 1029 | "properties": |
| 1030 | "iata": |
| 1031 | "type": |
| 1032 | }, |
| 1033 | "icao": |
| 1034 | "type": |
| 1035 | }, |
| 1036 | "name": |
| 1037 | "type": |
| 1038 | }, |
| 1039 | "timeZone": |
| 1040 | "type": |
| 1041 | }, |
| 1042 | "shortName": |
| 1043 | "type": |
| 1044 | }, |
| 1045 | "countryCode": |
| 1046 | "type": |
| 1047 | }, |
| 1048 | "municipalityName": |
| 1049 | "type": |
| 1050 | }, |
| 1051 | "location": |
| 1052 | "$ref": |
| 1053 | } |
| 1054 | }, |
| 1055 | "required": |
| 1056 | "iata", |
| 1057 | "icao", |
| 1058 | "name", |
| 1059 | "timeZone", |
| 1060 | "shortName", |
| 1061 | "countryCode", |
| 1062 | "municipalityName", |
| 1063 | "location" |
| 1064 | ] |
| 1065 | }, |
| 1066 | "TimeEntity": |
| 1067 | "type": |
| 1068 | "properties": |
| 1069 | "utc": |
| 1070 | "type": |
| 1071 | }, |
| 1072 | "local": |
| 1073 | "type": |
| 1074 | } |
| 1075 | }, |
| 1076 | "required": |
| 1077 | "utc", |
| 1078 | "local" |
| 1079 | ] |
| 1080 | }, |
| 1081 | "RouteInfoEntity": |
| 1082 | "type": |
| 1083 | "properties": |
| 1084 | "airport": |
| 1085 | "$ref": |
| 1086 | }, |
| 1087 | "terminal": |
| 1088 | "type": |
| 1089 | }, |
| 1090 | "gate": |
| 1091 | "type": |
| 1092 | }, |
| 1093 | "scheduledTime": |
| 1094 | "$ref": |
| 1095 | }, |
| 1096 | "revisedTime": |
| 1097 | "$ref": |
| 1098 | }, |
| 1099 | "predictedTime": |
| 1100 | "$ref": |
| 1101 | } |
| 1102 | }, |
| 1103 | "required": |
| 1104 | "airport", |
| 1105 | "scheduledTime" |
| 1106 | ] |
| 1107 | }, |
| 1108 | "StringifiedGreatCircleDistanceEntity": |
| 1109 | "type": |
| 1110 | "properties": |
| 1111 | "meter": |
| 1112 | "type": |
| 1113 | }, |
| 1114 | "km": |
| 1115 | "type": |
| 1116 | }, |
| 1117 | "mile": |
| 1118 | "type": |
| 1119 | }, |
| 1120 | "nm": |
| 1121 | "type": |
| 1122 | }, |
| 1123 | "feet": |
| 1124 | "type": |
| 1125 | } |
| 1126 | }, |
| 1127 | "required": |
| 1128 | "meter", |
| 1129 | "km", |
| 1130 | "mile", |
| 1131 | "nm", |
| 1132 | "feet" |
| 1133 | ] |
| 1134 | }, |
| 1135 | "FlightResponseEntity": |
| 1136 | "type": |
| 1137 | "properties": |
| 1138 | "id": |
| 1139 | "type": |
| 1140 | }, |
| 1141 | "flightNo": |
| 1142 | "type": |
| 1143 | }, |
| 1144 | "callSign": |
| 1145 | "type": |
| 1146 | }, |
| 1147 | "aircraft": |
| 1148 | "$ref": |
| 1149 | }, |
| 1150 | "airline": |
| 1151 | "$ref": |
| 1152 | }, |
| 1153 | "arrival": |
| 1154 | "$ref": |
| 1155 | }, |
| 1156 | "departure": |
| 1157 | "$ref": |
| 1158 | }, |
| 1159 | "cargo": |
| 1160 | "type": |
| 1161 | }, |
| 1162 | "greatCircleDistance": |
| 1163 | "$ref": |
| 1164 | }, |
| 1165 | "date": |
| 1166 | "format": |
| 1167 | "type": |
| 1168 | }, |
| 1169 | "image": |
| 1170 | "type": |
| 1171 | } |
| 1172 | }, |
| 1173 | "required": |
| 1174 | "id", |
| 1175 | "flightNo", |
| 1176 | "callSign", |
| 1177 | "aircraft", |
| 1178 | "airline", |
| 1179 | "arrival", |
| 1180 | "departure", |
| 1181 | "cargo", |
| 1182 | "greatCircleDistance", |
| 1183 | "date" |
| 1184 | ] |
| 1185 | } |
| 1186 | } |
| 1187 | } |
| 1188 | } |
{
{
{
"
AppController_getHello_v1
"
,
[]
,
{
{
""
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
[
{
{
"
Login
"
,
"
AuthController_login_v1
"
,
[]
,
{
true
,
{
{
{
"
#/components/schemas/LoginDTO
"
{
{
""
,
{
{
{
"
#/components/schemas/LoginEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Login
"
,
[
{
{
"
Create a new user
"
,
"
AuthController_register_v1
"
,
[]
,
{
true
,
{
{
{
"
#/components/schemas/RegisterDTO
"
{
{
""
,
{
{
{
"
#/components/schemas/RegisterEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Register
"
,
[
{
{
"
Get current user
"
,
"
AuthController_getCurrentUser_v1
"
,
[]
,
{
{
""
,
{
{
{
"
#/components/schemas/UserEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
[]
"
Get current user
"
,
[
{
{
"
Get all airports. We do not recommend using this route without any search query. This route has over 20k records
"
,
"
AirportsController_getAirports_v1
"
,
[
"
search
"
,
false
,
"
query
"
,
"
Search query for airport. Can be iata, ident(icao), name or a part of any these. Searching is case insensitive
"
,
{
"
VIDP
"
,
"
string
"
{
{
""
,
{
{
{
"
array
"
,
{
"
#/components/schemas/AirportEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Get all airports
"
,
[
{
{
"
Get airlines. Has over 800 records, only has commerical airlines.
"
,
"
AirlinesController_getAirlines_v1
"
,
[
"
search
"
,
false
,
"
query
"
,
"
The full(or a part of) name, ident or icao. Case Insensitive.
"
,
{
"
string
"
{
{
""
,
{
{
{
"
array
"
,
{
"
#/components/schemas/AirlineEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Get airlines
"
,
[
{
{
"
Get airline with search query. This doesn't check if the number is correct
"
,
"
FlightsController_getAirline_v1
"
,
[]
,
{
true
,
{
{
{
"
#/components/schemas/GetAirlineDTO
"
{
{
""
,
{
{
{
"
#/components/schemas/AirlineEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Get airline
"
,
[
{
{
"
Get all flights between two airports for a specific date
"
,
"
FlightsController_getFlights_v1
"
,
[
"
from
"
,
true
,
"
query
"
,
"
Departure airport IATA code
"
,
{
"
LAX
"
,
"
string
"
"
to
"
,
true
,
"
query
"
,
"
Arrival airport IATA code
"
,
{
"
JFK
"
,
"
string
"
"
date
"
,
true
,
"
query
"
,
"
Flight date in ISO format
"
,
{
"
2024-03-20
"
,
"
string
"
{
{
""
,
{
{
{
"
#/components/schemas/FlightsResponseEntity
"
{
""
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Get flights between two airports
"
,
[
{
{
"
Get detailed information about a specific flight including real-time tracking data
"
,
"
FlightController_getFlight_v1
"
,
[
"
iata
"
,
true
,
"
query
"
,
"
IATA flight number
"
,
{
"
UA123
"
,
"
string
"
"
icao
"
,
true
,
"
query
"
,
"
ICAO flight number
"
,
{
"
UAL123
"
,
"
string
"
"
searchedDate
"
,
false
,
"
query
"
,
{
"
string
"
"
date
"
,
false
,
"
query
"
,
"
Flight date (ISO format). Defaults to current date if not provided
"
,
{
"
2024-03-20
"
,
"
string
"
{
{
"
Flight details retrieved successfully
"
,
{
{
{
"
#/components/schemas/FlightResponseEntity
"
{
"
Invalid request parameters
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
User is not authenticated
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
{
"
Internal server error
"
,
{
{
{
"
#/components/schemas/GenericErrorEntity
"
[
[]
"
Get flight details
"
,
[
{
"
Plane Pal
"
,
"
Plane Pal API Documentation
"
,
"
1.0.0
"
,
{}
[]
,
[]
,
{
{
{
"
bearer
"
,
"
JWT
"
,
"
http
"
{
{
"
object
"
,
{
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
,
"
JWT token which will be used for all other requests
"
{
"
#/components/schemas/UserEntity
"
[
{
"
object
"
,
{
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
,
"
JWT token which will be used for all other requests
"
{
"
#/components/schemas/UserEntity
"
[
{
"
string
"
,
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
,
"
VIDP
"
{
[
"
#/components/schemas/AirportType
"
{
"
string
"
,
"
Elevation in feet
"
{
"
string
"
,
[
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
,
"
Nullable for private airports
"
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
,
"
The search query, like 6E9920
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
,
"
in mins
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
,
[
{
"
string
"
,
[
{
"
object
"
,
{
{
"
#/components/schemas/AirlineInfo
"
{
"
#/components/schemas/AircraftFlightEntity
"
{
"
#/components/schemas/AirportInfo
"
{
"
#/components/schemas/AirportInfo
"
{
[
"
#/components/schemas/FlightStatus
"
{
[
"
#/components/schemas/FlighType
"
{
"
object
"
[
{
"
object
"
,
{
{
"
boolean
"
{
"
string
"
{
"
#/components/schemas/FlightsRouteEntity
"
{
"
number
"
{
"
array
"
,
{
"
#/components/schemas/FlightEntity
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
boolean
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
number
"
{
"
number
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
#/components/schemas/LocationEntity
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
#/components/schemas/RouteAirportEntity
"
{
"
string
"
{
"
string
"
{
"
#/components/schemas/TimeEntity
"
{
"
#/components/schemas/TimeEntity
"
{
"
#/components/schemas/TimeEntity
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
{
"
string
"
[
{
"
object
"
,
{
{
"
string
"
{
"
string
"
{
"
string
"
{
"
#/components/schemas/AircraftEntity
"
{
"
#/components/schemas/PartialAirlineEntity
"
{
"
#/components/schemas/RouteInfoEntity
"
{
"
#/components/schemas/RouteInfoEntity
"
{
"
boolean
"
{
"
#/components/schemas/StringifiedGreatCircleDistanceEntity
"
{
"
date-time
"
,
"
string
"
{
"
string
"
[