Skip to content

Commit b89d25f

Browse files
authored
Fix api doc paths (#113)
* fix paths * fix path * doc
1 parent 62217e4 commit b89d25f

2 files changed

Lines changed: 43 additions & 32 deletions

File tree

open-api/openapi.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@
31563156
"/manifest": {
31573157
"get": {
31583158
"description": "The RaidHub manifest provides definitions for all activities and versions in the RaidHub database.",
3159-
"summary": "",
3159+
"summary": "/manifest",
31603160
"responses": {
31613161
"200": {
31623162
"description": "Success",
@@ -3244,7 +3244,7 @@
32443244
"/status": {
32453245
"get": {
32463246
"description": "Get the status of the RaidHub Services. Atlas: The PGCR crawler. Floodgates: The queue system for redacted PGCRs from bungie, almost exclusively during contest mode.",
3247-
"summary": "",
3247+
"summary": "/status",
32483248
"responses": {
32493249
"200": {
32503250
"description": "Success",
@@ -3360,7 +3360,7 @@
33603360
"/player/search": {
33613361
"get": {
33623362
"description": "Search for players in the RaidHub database by Bungie name or platform display name. \nPlayers who have not attempted a raid may not appear in the search results. \nResults are ordered by a combination of the number of raid completions and last played date.",
3363-
"summary": "",
3363+
"summary": "/player/search",
33643364
"parameters": [
33653365
{
33663366
"schema": {
@@ -3525,7 +3525,7 @@
35253525
"/player/{membershipId}/history": {
35263526
"get": {
35273527
"description": "/activities is deprecated. Use /history now. Get a player's activity history. This endpoint uses date cursors to paginate through a player's activity history. \nThe first request should not include a cursor. Subsequent requests should include the `nextCursor` \nvalue from the previous response. Note that the first request may not return the full number of activities requested\nin order to optimize performance. Subsequent requests will return the full number of activities requested.",
3528-
"summary": "",
3528+
"summary": "/player/{membershipId}/history",
35293529
"security": [
35303530
{
35313531
"Bearer Token": []
@@ -3758,7 +3758,7 @@
37583758
"/player/{membershipId}/basic": {
37593759
"get": {
37603760
"description": "An extremely low-cost API call. Get basic information Bungie information about a player. The information is not\nguaranteed to be fully up-to-date, however, it should be accurate enough for most use cases where\nyou only have the membershipId available.",
3761-
"summary": "",
3761+
"summary": "/player/{membershipId}/basic",
37623762
"parameters": [
37633763
{
37643764
"schema": {
@@ -3910,7 +3910,7 @@
39103910
"/player/{membershipId}/profile": {
39113911
"get": {
39123912
"description": "Get a player's profile information. This includes global stats, activity stats, and world first entries. \nThis is used to hydrate the RaidHub profile page",
3913-
"summary": "",
3913+
"summary": "/player/{membershipId}/profile",
39143914
"security": [
39153915
{
39163916
"Bearer Token": []
@@ -4095,7 +4095,7 @@
40954095
"/player/{membershipId}/teammates": {
40964096
"get": {
40974097
"description": "Get a list of a player's top 100 teammates.",
4098-
"summary": "",
4098+
"summary": "/player/{membershipId}/teammates",
40994099
"security": [
41004100
{
41014101
"Bearer Token": []
@@ -4280,7 +4280,7 @@
42804280
"/player/{membershipId}/instances": {
42814281
"get": {
42824282
"description": "Find a set of instances based on the query parameters. Some parameters will not work together, such as providing a season outside the range of the min/max season. Requires authentication.",
4283-
"summary": "",
4283+
"summary": "/player/{membershipId}/instances",
42844284
"parameters": [
42854285
{
42864286
"schema": {
@@ -4645,7 +4645,7 @@
46454645
"/instance/{instanceId}": {
46464646
"get": {
46474647
"description": "/activity is deprecated. Use /instance now. This returns a PGCR object with a shape more aligned with how RaidHub displays PGCRs.",
4648-
"summary": "",
4648+
"summary": "/instance/{instanceId}",
46494649
"parameters": [
46504650
{
46514651
"schema": {
@@ -4797,7 +4797,7 @@
47974797
"/leaderboard/individual/global/{category}": {
47984798
"get": {
47994799
"description": "Individual leaderboards across all raids",
4800-
"summary": "",
4800+
"summary": "/leaderboard/individual/global/{category}",
48014801
"parameters": [
48024802
{
48034803
"schema": {
@@ -5008,7 +5008,7 @@
50085008
"/leaderboard/individual/raid/{raid}/{category}": {
50095009
"get": {
50105010
"description": "Individual leaderboards for a specific raid",
5011-
"summary": "",
5011+
"summary": "/leaderboard/individual/raid/{raid}/{category}",
50125012
"parameters": [
50135013
{
50145014
"schema": {
@@ -5249,7 +5249,7 @@
52495249
"/leaderboard/individual/pantheon/{version}/{category}": {
52505250
"get": {
52515251
"description": "Individual leaderboards for a specific pantheon version",
5252-
"summary": "",
5252+
"summary": "/leaderboard/individual/pantheon/{version}/{category}",
52535253
"parameters": [
52545254
{
52555255
"schema": {
@@ -5490,7 +5490,7 @@
54905490
"/leaderboard/team/first/{activity}/{version}": {
54915491
"get": {
54925492
"description": "Ranking of the first 1000 completions of each activity version. \nUse the /contest endpoint instead to get the full rankings for the duration of the contest.",
5493-
"summary": "",
5493+
"summary": "/leaderboard/team/first/{activity}/{version}",
54945494
"parameters": [
54955495
{
54965496
"schema": {
@@ -5734,7 +5734,7 @@
57345734
"/leaderboard/team/contest/{raid}": {
57355735
"get": {
57365736
"description": "Ranking of all teams which completed the official contest version of the raid during the contest period.",
5737-
"summary": "",
5737+
"summary": "/leaderboard/team/contest/{raid}",
57385738
"parameters": [
57395739
{
57405740
"schema": {
@@ -5966,7 +5966,7 @@
59665966
"/leaderboard/clan": {
59675967
"get": {
59685968
"description": "Get a page of the clan leaderboard based on query parameters",
5969-
"summary": "",
5969+
"summary": "/leaderboard/clan",
59705970
"parameters": [
59715971
{
59725972
"schema": {
@@ -6127,7 +6127,7 @@
61276127
"/pgcr/{instanceId}": {
61286128
"get": {
61296129
"description": "Get a raw post game carnage report by instanceId. \nThis is essentially the raw data from the Bungie API, with a few fields trimmed off. \nIt should be a subset of the data returned by the Bungie API. \nUseful if you need to access PGCRs when Bungie's API is down.",
6130-
"summary": "",
6130+
"summary": "/pgcr/{instanceId}",
61316131
"parameters": [
61326132
{
61336133
"schema": {
@@ -6279,7 +6279,7 @@
62796279
"/clan/{groupId}": {
62806280
"get": {
62816281
"description": "Get the stats for a clan. Data updates weekly.",
6282-
"summary": "",
6282+
"summary": "/clan/{groupId}",
62836283
"parameters": [
62846284
{
62856285
"schema": {
@@ -6459,7 +6459,7 @@
64596459
"/metrics/weapons/rolling-week": {
64606460
"get": {
64616461
"description": "Wet the top weapons in each slot over the past 168 hours (7 days)",
6462-
"summary": "",
6462+
"summary": "/metrics/weapons/rolling-week",
64636463
"parameters": [
64646464
{
64656465
"schema": {
@@ -6600,7 +6600,7 @@
66006600
"/metrics/population/rolling-day": {
66016601
"get": {
66026602
"description": "Get the daily player population by raid",
6603-
"summary": "",
6603+
"summary": "/metrics/population/rolling-day",
66046604
"responses": {
66056605
"200": {
66066606
"description": "Success",
@@ -6688,7 +6688,7 @@
66886688
"/admin/query": {
66896689
"post": {
66906690
"description": "Run a query against the database",
6691-
"summary": "",
6691+
"summary": "/admin/query",
66926692
"security": [
66936693
{
66946694
"Administrator Token": []
@@ -6889,7 +6889,7 @@
68896889
"/admin/reporting/standing/{instanceId}": {
68906890
"get": {
68916891
"description": "Find a set of instances based on the query parameters. Some parameters will not work together, such as providing a season outside the range of the min/max season. Requires authentication.",
6892-
"summary": "",
6892+
"summary": "/admin/reporting/standing/{instanceId}",
68936893
"parameters": [
68946894
{
68956895
"schema": {
@@ -7041,7 +7041,7 @@
70417041
"/admin/reporting/blacklist/{instanceId}": {
70427042
"put": {
70437043
"description": "Blacklist an instance from leaderboards, as well as the players involved.",
7044-
"summary": "",
7044+
"summary": "/admin/reporting/blacklist/{instanceId}",
70457045
"parameters": [
70467046
{
70477047
"schema": {
@@ -7301,7 +7301,7 @@
73017301
"/admin/reporting/player/{membershipId}": {
73027302
"get": {
73037303
"description": "Get a player's standing information including recent flags and blacklisted instances. Requires authentication.",
7304-
"summary": "",
7304+
"summary": "/admin/reporting/player/{membershipId}",
73057305
"parameters": [
73067306
{
73077307
"schema": {
@@ -7451,7 +7451,7 @@
74517451
},
74527452
"patch": {
74537453
"description": "Update fields on a player. Currently, only the cheat level can be updated.",
7454-
"summary": "",
7454+
"summary": "/admin/reporting/player/{membershipId}",
74557455
"parameters": [
74567456
{
74577457
"schema": {
@@ -7653,7 +7653,7 @@
76537653
"/authorize/admin": {
76547654
"post": {
76557655
"description": "Authorize an admin user. Requires the client secret.",
7656-
"summary": "",
7656+
"summary": "/authorize/admin",
76577657
"requestBody": {
76587658
"required": true,
76597659
"content": {
@@ -7817,7 +7817,7 @@
78177817
"/authorize/user": {
78187818
"post": {
78197819
"description": "Authenticate a user. Grants permission to access restricted resources.",
7820-
"summary": "",
7820+
"summary": "/authorize/user",
78217821
"requestBody": {
78227822
"required": true,
78237823
"content": {

src/core/RaidHubRoute.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,23 @@ export class RaidHubRoute<
2929
M extends "get" | "post" | "patch" | "put" | "delete",
3030
ResponseBody extends ZodType,
3131
ErrorResponse extends ErrorData,
32-
Params extends ZodObject<any, any, any, { [x: string]: any }, { [x: string]: any }> =
33-
z.ZodObject<{}>,
34-
Query extends ZodObject<any, any, any, { [x: string]: any }, { [x: string]: any }> =
35-
z.ZodObject<{}>,
32+
Params extends ZodObject<
33+
any,
34+
any,
35+
any,
36+
{ [x: string]: any },
37+
{ [x: string]: any }
38+
> = z.ZodObject<{}>,
39+
Query extends ZodObject<
40+
any,
41+
any,
42+
any,
43+
{ [x: string]: any },
44+
{ [x: string]: any }
45+
> = z.ZodObject<{}>,
3646
Body extends ZodType = ZodUnknown
37-
> implements IRaidHubRoute {
47+
> implements IRaidHubRoute
48+
{
3849
readonly method: M
3950
readonly description: string
4051
readonly paramsSchema: Params | null
@@ -340,7 +351,7 @@ export class RaidHubRoute<
340351
deprecated: this.isDeprecated ? true : undefined,
341352
method: this.method,
342353
description: this.description,
343-
summary: "",
354+
summary: path,
344355
security,
345356
request: {
346357
params: this.paramsSchema ?? undefined,

0 commit comments

Comments
 (0)