@hasagi/schema 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi/generate-openapi-v3.js +12 -15
- package/package.json +1 -1
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import { HasagiClient as HasagiLiteClient } from "@hasagi/core";
|
|
2
2
|
import { getSwaggerTypeName } from "../util.js";
|
|
3
|
-
const desc = `Auto-generated using LCU's /help endpoint
|
|
4
|
-
The following endpoints are not entirely auto-generated because their /help response is missing necessary fields:
|
|
5
|
-
|
|
6
|
-
%missing_data%
|
|
3
|
+
const desc = `Schema of the League Client Update (LCU) Rest API. Auto-generated using LCU's /help endpoint
|
|
7
4
|
|
|
8
5
|
### Rules
|
|
9
6
|
|
|
10
|
-
1. No interacting with shop
|
|
11
|
-
2. No interacting with chat
|
|
12
|
-
3. No interacting with anything authentication related
|
|
13
|
-
4. Don't automate anything Riot doesn't want you to (
|
|
14
|
-
5. If you can do it using the official Riot API, then don't do it using LCU.
|
|
15
|
-
6. Don't try to expose data that Riot wants to hide
|
|
16
|
-
7. Just because something
|
|
7
|
+
1. No interacting with shop
|
|
8
|
+
2. No interacting with chat
|
|
9
|
+
3. No interacting with anything authentication related
|
|
10
|
+
4. Don't automate anything Riot doesn't want you to (e.g. ready check, picks and bans)
|
|
11
|
+
5. If you can do it using the official Riot API, then don't do it using LCU. Don't spam requests
|
|
12
|
+
6. Don't try to expose data that Riot wants to hide (e.g. names in ranked champ select)
|
|
13
|
+
7. Just because something is not listed here does not mean it is allowed
|
|
14
|
+
8. Register your application with Riot (https://developer.riotgames.com/)
|
|
17
15
|
|
|
18
16
|
### Disclaimer
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc
|
|
22
|
-
|
|
23
|
-
[Privacy Policy](https://legal.dysolix.dev/privacy)`;
|
|
18
|
+
dysolix.dev is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties.
|
|
19
|
+
Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc`;
|
|
24
20
|
function getRootType(input) {
|
|
25
21
|
const isObject = input.fields.length > 0;
|
|
26
22
|
const isEnum = input.values.length > 0;
|
|
@@ -91,6 +87,7 @@ export async function generateOpenAPIv3(schema) {
|
|
|
91
87
|
},
|
|
92
88
|
components: { schemas: {} },
|
|
93
89
|
paths: {},
|
|
90
|
+
externalDocs: { url: "https://discord.com/invite/riotgamesdevrel", description: "Riot Games Third Party Developer Community Discord" },
|
|
94
91
|
};
|
|
95
92
|
let tags = [];
|
|
96
93
|
schema.types.forEach(type => openAPISchema.components.schemas[type.name] = getRootType(type));
|