koush / scrypted

Scrypted is a high performance video integration and automation platform
https://scrypted.app
Other
4.16k stars 247 forks source link

SDK types build: calculate required/optional fields from schema #1321

Closed longzheng closed 7 months ago

longzheng commented 7 months ago

@koush I noticed you added support for required properties in the build.ts but I realised we can actually do this dynamically from the typedoc schema.

In the future we can improve the types even further for function toTypescriptType(type: any): string and function toPythonType(type: any): string { but it was too much trouble so ignoring for now.