Final commit
This commit is contained in:
parent
91fffb3294
commit
c35e0716af
372 changed files with 16591 additions and 1 deletions
21
backend/generate-schemas.sh
Executable file
21
backend/generate-schemas.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
generate_schema_for_type() {
|
||||
yes | npx typescript-json-schema --noExtraProps true --required --refs false --out "temp_schemas/$1.json" "./types/**.ts" "$1"
|
||||
}
|
||||
|
||||
generate_schemas() {
|
||||
rm -rf temp_schemas
|
||||
mkdir temp_schemas
|
||||
|
||||
generate_schema_for_type "AiSuggestionsOutput" &
|
||||
generate_schema_for_type "AiSnewuggestionOutput" &
|
||||
wait
|
||||
|
||||
rm -rf ./schemas
|
||||
mv temp_schemas schemas
|
||||
}
|
||||
|
||||
# Run the schema generation
|
||||
generate_schemas
|
||||
echo "Schema generated successfully!"
|
Loading…
Add table
Add a link
Reference in a new issue