{"id":18677940,"url":"https://github.com/vrerv/openapi-markdown","last_synced_at":"2025-04-12T02:39:14.836Z","repository":{"id":151709210,"uuid":"624392570","full_name":"vrerv/openapi-markdown","owner":"vrerv","description":"Convert openapi spec to markdown file","archived":false,"fork":false,"pushed_at":"2025-02-27T08:03:37.000Z","size":62,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T22:14:30.314Z","etag":null,"topics":["markdown","openapi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrerv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-06T11:17:05.000Z","updated_at":"2025-02-27T08:03:41.000Z","dependencies_parsed_at":"2024-11-07T09:37:48.846Z","dependency_job_id":"50afa934-60df-4250-8af8-654d7a0c1de3","html_url":"https://github.com/vrerv/openapi-markdown","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fopenapi-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fopenapi-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fopenapi-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fopenapi-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrerv","download_url":"https://codeload.github.com/vrerv/openapi-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027407,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","openapi"],"created_at":"2024-11-07T09:35:30.867Z","updated_at":"2025-04-12T02:39:14.827Z","avatar_url":"https://github.com/vrerv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPI Documentation Generator\n\nThis is a Python script that generates API documentation from an OpenAPI specification file.\n\n## Usage\n\n`pip install openapi-markdown`\n\n### CLI\n\nYou can use `openapi2markdown` command as follows:\n\n```\n% openapi2markdown --help                \nUsage: openapi2markdown [OPTIONS] INPUT_FILE [OUTPUT_FILE]\n\n  Convert OpenAPI spec to Markdown documentation.\n\n  INPUT_FILE: Path to OpenAPI specification file (JSON or YAML) OUTPUT_FILE:\n  Path where markdown file will be generated (optional, defaults to INPUT_FILE\n  with .md extension)\n\nOptions:\n  -t, --templates-dir DIRECTORY  Custom templates directory path\n  -f, --filter-paths TEXT        Only generate apis that start with the given\n                                 path, multiple paths are allowed\n```\n\n### Library\n\n```python\nfrom openapi_markdown.generator import to_markdown\n\napiFile = \"./tests/openapi.json\"\noutputFile = \"api_doc.md\"\ntemplatesDir = \"templates\"\noptions = {\n    'filter_paths': ['/client']\n}\n\nto_markdown(apiFile, outputFile, templates_dir, options)\n```\n\n- If you want to use your own template, creates 'templates' directory and put [`api_doc_template.md.j2`](src/openapi_markdown/templates/api_doc_template.md.j2) file in it.\n- You can change templates directory by passing it as the 3rd argument of `to_markdown`.\n\n### Default templates\n\nThere are internal templates you can use. If not set default is used.\n\n* templates - default\n* templates/embed - prints objects hierarchially as list in every request/response\n\n## Development\n\n### Requirements\n\n- Python 3.x\n- json\n- PyYAML\n- openapi-core\n- Jinja2\n\n`pip install -r requirement.txt`\n\ninstall a project in editble mode\n`pip install -e ./`\n\nrun tests\n\n`python -m unittest`\n\n### Deploy\n\n```\npython3 -m pip install --upgrade twine\n```\n\n```\n./pypi.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrerv%2Fopenapi-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrerv%2Fopenapi-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrerv%2Fopenapi-markdown/lists"}