Skip to main content
Version: latest

agrag.candidates.patch.write_schema_file

write_schema_file(schema:GraphSchema, path:Path, *, overwrite:bool = False) -> Path

Publish a complete YAML schema in the destination directory.

Parameters:

  • schema (GraphSchema) – Schema to serialize.
  • path (Path) – Destination path.
  • overwrite (bool) – Whether to replace an existing file atomically.

Raises:

  • FileExistsError – A destination exists and overwrite is false.
  • OSError – The file could not be written or published.