summary refs log tree commit diff
path: root/scripts/schema.js
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-29 01:11:22 +1000
committerGitHub <noreply@github.com>2023-04-29 01:11:22 +1000
commit009a3ad27f994318f72deb016ef4042cdd070865 (patch)
treea759056de60fb7ed285314e63d378315dfef40b0 /scripts/schema.js
parentstart listening before starting components in bundle (diff)
parentMerge branch 'master' into openapi (diff)
downloadserver-009a3ad27f994318f72deb016ef4042cdd070865.tar.xz
Merge pull request #1032 from spacebarchat/openapi
Better OpenAPI
Diffstat (limited to 'scripts/schema.js')
-rw-r--r--scripts/schema.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/schema.js b/scripts/schema.js

index c29d5bab..b4393558 100644 --- a/scripts/schema.js +++ b/scripts/schema.js
@@ -57,6 +57,8 @@ const Excluded = [ "PropertiesSchema", "AsyncSchema", "AnySchema", + "SMTPConnection.CustomAuthenticationResponse", + "TransportMakeRequestResponse", ]; function modify(obj) { @@ -75,14 +77,14 @@ function main() { const generator = TJS.buildGenerator(program, settings); if (!generator || !program) return; - let schemas = generator - .getUserSymbols() - .filter( - (x) => - (x.endsWith("Schema") || x.endsWith("Response")) && - !Excluded.includes(x), + let schemas = generator.getUserSymbols().filter((x) => { + return ( + (x.endsWith("Schema") || + x.endsWith("Response") || + x.startsWith("API")) && + !Excluded.includes(x) ); - console.log(schemas); + }); var definitions = {}; @@ -133,7 +135,7 @@ function main() { definitions = { ...definitions, [name]: { ...part } }; } - modify(definitions); + //modify(definitions); fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4)); }