ts_ids_core.scripts.cli module

legacy_import(*args, **kwargs)[source]
validate_code_gen_import(f: Callable) Callable[source]

A decorator for validating datamodel_code_generator is installed. This is intended to wrap a click.command to validate the import before click validates the passed arguments. This will allow the dependency check to be completed without requiring a user to pass arguments to import-schema.

To ensure import validation is done before click argument validation, use this as the outermost decorator on the command. Example:

@validate_code_gen_import @click.command(…) @click.option(…) def my_command()