diff options
| -rw-r--r-- | backend/models/models.go | 2 | ||||
| -rw-r--r-- | docs/docs.go | 25 | ||||
| -rw-r--r-- | docs/swagger.json | 25 | ||||
| -rw-r--r-- | docs/swagger.yaml | 19 |
4 files changed, 58 insertions, 13 deletions
diff --git a/backend/models/models.go b/backend/models/models.go index 7ba0da3..be6265f 100644 --- a/backend/models/models.go +++ b/backend/models/models.go | |||
| @@ -37,7 +37,7 @@ type MapSummary struct { | |||
| 37 | CategoryScores MapCategoryScores `json:"category_scores"` | 37 | CategoryScores MapCategoryScores `json:"category_scores"` |
| 38 | Rating float32 `json:"rating"` | 38 | Rating float32 `json:"rating"` |
| 39 | Routers []string `json:"routers"` | 39 | Routers []string `json:"routers"` |
| 40 | History any `json:"history"` | 40 | History []MapHistory `json:"history"` |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | type MapCategoryScores struct { | 43 | type MapCategoryScores struct { |
diff --git a/docs/docs.go b/docs/docs.go index 022814a..9883679 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -620,6 +620,20 @@ const docTemplate = `{ | |||
| 620 | } | 620 | } |
| 621 | } | 621 | } |
| 622 | }, | 622 | }, |
| 623 | "models.MapHistory": { | ||
| 624 | "type": "object", | ||
| 625 | "properties": { | ||
| 626 | "date": { | ||
| 627 | "type": "string" | ||
| 628 | }, | ||
| 629 | "runner_name": { | ||
| 630 | "type": "string" | ||
| 631 | }, | ||
| 632 | "score_count": { | ||
| 633 | "type": "integer" | ||
| 634 | } | ||
| 635 | } | ||
| 636 | }, | ||
| 623 | "models.MapRecords": { | 637 | "models.MapRecords": { |
| 624 | "type": "object", | 638 | "type": "object", |
| 625 | "properties": { | 639 | "properties": { |
| @@ -635,8 +649,11 @@ const docTemplate = `{ | |||
| 635 | "description": { | 649 | "description": { |
| 636 | "type": "string" | 650 | "type": "string" |
| 637 | }, | 651 | }, |
| 638 | "first_completion": { | 652 | "history": { |
| 639 | "type": "string" | 653 | "type": "array", |
| 654 | "items": { | ||
| 655 | "$ref": "#/definitions/models.MapHistory" | ||
| 656 | } | ||
| 640 | }, | 657 | }, |
| 641 | "rating": { | 658 | "rating": { |
| 642 | "type": "number" | 659 | "type": "number" |
| @@ -679,7 +696,7 @@ const docTemplate = `{ | |||
| 679 | "steam_id": { | 696 | "steam_id": { |
| 680 | "type": "string" | 697 | "type": "string" |
| 681 | }, | 698 | }, |
| 682 | "username": { | 699 | "user_name": { |
| 683 | "type": "string" | 700 | "type": "string" |
| 684 | } | 701 | } |
| 685 | } | 702 | } |
| @@ -754,7 +771,7 @@ const docTemplate = `{ | |||
| 754 | "user_id": { | 771 | "user_id": { |
| 755 | "type": "string" | 772 | "type": "string" |
| 756 | }, | 773 | }, |
| 757 | "username": { | 774 | "user_name": { |
| 758 | "type": "string" | 775 | "type": "string" |
| 759 | } | 776 | } |
| 760 | } | 777 | } |
diff --git a/docs/swagger.json b/docs/swagger.json index 4f3e868..e4bbb59 100644 --- a/docs/swagger.json +++ b/docs/swagger.json | |||
| @@ -613,6 +613,20 @@ | |||
| 613 | } | 613 | } |
| 614 | } | 614 | } |
| 615 | }, | 615 | }, |
| 616 | "models.MapHistory": { | ||
| 617 | "type": "object", | ||
| 618 | "properties": { | ||
| 619 | "date": { | ||
| 620 | "type": "string" | ||
| 621 | }, | ||
| 622 | "runner_name": { | ||
| 623 | "type": "string" | ||
| 624 | }, | ||
| 625 | "score_count": { | ||
| 626 | "type": "integer" | ||
| 627 | } | ||
| 628 | } | ||
| 629 | }, | ||
| 616 | "models.MapRecords": { | 630 | "models.MapRecords": { |
| 617 | "type": "object", | 631 | "type": "object", |
| 618 | "properties": { | 632 | "properties": { |
| @@ -628,8 +642,11 @@ | |||
| 628 | "description": { | 642 | "description": { |
| 629 | "type": "string" | 643 | "type": "string" |
| 630 | }, | 644 | }, |
| 631 | "first_completion": { | 645 | "history": { |
| 632 | "type": "string" | 646 | "type": "array", |
| 647 | "items": { | ||
| 648 | "$ref": "#/definitions/models.MapHistory" | ||
| 649 | } | ||
| 633 | }, | 650 | }, |
| 634 | "rating": { | 651 | "rating": { |
| 635 | "type": "number" | 652 | "type": "number" |
| @@ -672,7 +689,7 @@ | |||
| 672 | "steam_id": { | 689 | "steam_id": { |
| 673 | "type": "string" | 690 | "type": "string" |
| 674 | }, | 691 | }, |
| 675 | "username": { | 692 | "user_name": { |
| 676 | "type": "string" | 693 | "type": "string" |
| 677 | } | 694 | } |
| 678 | } | 695 | } |
| @@ -747,7 +764,7 @@ | |||
| 747 | "user_id": { | 764 | "user_id": { |
| 748 | "type": "string" | 765 | "type": "string" |
| 749 | }, | 766 | }, |
| 750 | "username": { | 767 | "user_name": { |
| 751 | "type": "string" | 768 | "type": "string" |
| 752 | } | 769 | } |
| 753 | } | 770 | } |
diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 873dbee..e24ca39 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml | |||
| @@ -28,6 +28,15 @@ definitions: | |||
| 28 | no_sla: | 28 | no_sla: |
| 29 | type: integer | 29 | type: integer |
| 30 | type: object | 30 | type: object |
| 31 | models.MapHistory: | ||
| 32 | properties: | ||
| 33 | date: | ||
| 34 | type: string | ||
| 35 | runner_name: | ||
| 36 | type: string | ||
| 37 | score_count: | ||
| 38 | type: integer | ||
| 39 | type: object | ||
| 31 | models.MapRecords: | 40 | models.MapRecords: |
| 32 | properties: | 41 | properties: |
| 33 | records: {} | 42 | records: {} |
| @@ -38,8 +47,10 @@ definitions: | |||
| 38 | $ref: '#/definitions/models.MapCategoryScores' | 47 | $ref: '#/definitions/models.MapCategoryScores' |
| 39 | description: | 48 | description: |
| 40 | type: string | 49 | type: string |
| 41 | first_completion: | 50 | history: |
| 42 | type: string | 51 | items: |
| 52 | $ref: '#/definitions/models.MapHistory' | ||
| 53 | type: array | ||
| 43 | rating: | 54 | rating: |
| 44 | type: number | 55 | type: number |
| 45 | routers: | 56 | routers: |
| @@ -67,7 +78,7 @@ definitions: | |||
| 67 | type: array | 78 | type: array |
| 68 | steam_id: | 79 | steam_id: |
| 69 | type: string | 80 | type: string |
| 70 | username: | 81 | user_name: |
| 71 | type: string | 82 | type: string |
| 72 | type: object | 83 | type: object |
| 73 | models.RankingsResponse: | 84 | models.RankingsResponse: |
| @@ -117,7 +128,7 @@ definitions: | |||
| 117 | type: integer | 128 | type: integer |
| 118 | user_id: | 129 | user_id: |
| 119 | type: string | 130 | type: string |
| 120 | username: | 131 | user_name: |
| 121 | type: string | 132 | type: string |
| 122 | type: object | 133 | type: object |
| 123 | host: lp.ardapektezol.com/api | 134 | host: lp.ardapektezol.com/api |