Skip to content
Snippets Groups Projects
Select Git revision
  • b5464357020029b195e3b2e17ab66de8a575da32
  • main default protected
  • ci_test
  • v2.0.27 protected
  • v2.0.26 protected
  • v2.0.25 protected
  • v2.0.24 protected
  • v2.0.23 protected
  • v2.0.22 protected
  • v2.0.21 protected
  • v2.0.20 protected
  • v2.0.19 protected
  • v2.0.18 protected
  • v2.0.17 protected
  • v2.0.16 protected
  • v2.0.15 protected
  • v2.0.14 protected
  • v2.0.13 protected
  • v2.0.12 protected
  • v2.0.11 protected
  • v2.0.10 protected
  • v2.0.9 protected
  • v2.0.8 protected
23 results

generate_specification.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    generate_specification.py 577 B
    import os
    from pathlib import Path
    
    if __name__ == '__main__':
        import json
        
        os.environ["API_SKIP_DRIFT_CHECK_WHEN_NO_CONNECTION"] = "true"
        
        # noinspection PyUnresolvedReferences
        import app  # Ensure everything is loaded
        from api.specification.generator import extract
        
        spec = extract()
        Path("../api_specification.json").write_text(json.dumps(spec.to_json(), indent="  ", sort_keys=True))
        template = Path("../api_specification_template.md").read_text()
        Path("../api_specification.md").write_text(spec.generate_markdown(template))