def python_codegen(file_uri, target): document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( file_uri) schema_raw_doc = metaschema_loader.fetch(file_uri) schema_doc, schema_metadata = metaschema_loader.resolve_all( schema_raw_doc, file_uri) codegen.codegen( "python", cast(List[Dict[Text, Any]], schema_doc), schema_metadata, document_loader, target=target, )
def python_codegen(file_uri: str, target: str) -> None: document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( file_uri) assert isinstance(avsc_names, Names) schema_raw_doc = metaschema_loader.fetch(file_uri) schema_doc, schema_metadata = metaschema_loader.resolve_all( schema_raw_doc, file_uri) codegen.codegen( "python", cast(List[Dict[Text, Any]], schema_doc), schema_metadata, document_loader, target=target, )
def java_codegen(file_uri, target, examples=None): document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( file_uri) schema_raw_doc = metaschema_loader.fetch(file_uri) schema_doc, schema_metadata = metaschema_loader.resolve_all( schema_raw_doc, file_uri) codegen.codegen( "java", cast(List[Dict[Text, Any]], schema_doc), schema_metadata, document_loader, target=target, examples=examples, )
def java_codegen(file_uri: str, target: Path, examples: Optional[Path] = None) -> None: document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( file_uri) schema_raw_doc = metaschema_loader.fetch(file_uri) schema_doc, schema_metadata = metaschema_loader.resolve_all( schema_raw_doc, file_uri) codegen.codegen( "java", cast(List[Dict[str, Any]], schema_doc), schema_metadata, document_loader, target=str(target), examples=str(examples) if examples else None, )
def python_codegen( file_uri: str, target: Path, parser_info: Optional[str] = None, package: Optional[str] = None, ) -> None: document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( file_uri) assert isinstance(avsc_names, Names) schema_raw_doc = metaschema_loader.fetch(file_uri) schema_doc, schema_metadata = metaschema_loader.resolve_all( schema_raw_doc, file_uri) codegen.codegen( "python", cast(List[Dict[str, Any]], schema_doc), schema_metadata, document_loader, target=str(target), parser_info=parser_info, package=package, )