{"id":15024068,"url":"https://github.com/sap/swagger-plugin-for-sphinx","last_synced_at":"2025-10-19T18:31:16.504Z","repository":{"id":40355857,"uuid":"468266571","full_name":"SAP/swagger-plugin-for-sphinx","owner":"SAP","description":"A sphinx plugin which renders a OpenAPI specification with Swagger.","archived":false,"fork":false,"pushed_at":"2025-02-03T12:12:24.000Z","size":291,"stargazers_count":4,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-03T12:40:18.399Z","etag":null,"topics":["openapi","plugin","sphinx","sphinx-extension","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-03-10T09:02:11.000Z","updated_at":"2025-02-03T12:12:26.000Z","dependencies_parsed_at":"2023-11-27T10:01:35.304Z","dependency_job_id":"0cc8b44e-c573-46de-b5e4-a79af846e6be","html_url":"https://github.com/SAP/swagger-plugin-for-sphinx","commit_stats":{"total_commits":73,"total_committers":5,"mean_commits":14.6,"dds":0.3835616438356164,"last_synced_commit":"8cf6028d94f6ad7c784c5ea31e1f2292303166f1"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":"SAP/repository-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP%2Fswagger-plugin-for-sphinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP%2Fswagger-plugin-for-sphinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP%2Fswagger-plugin-for-sphinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP%2Fswagger-plugin-for-sphinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP","download_url":"https://codeload.github.com/SAP/swagger-plugin-for-sphinx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237191566,"owners_count":19269729,"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":["openapi","plugin","sphinx","sphinx-extension","swagger","swagger-ui"],"created_at":"2024-09-24T19:59:45.979Z","updated_at":"2025-10-19T18:31:16.492Z","avatar_url":"https://github.com/SAP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![REUSE status](https://api.reuse.software/badge/github.com/SAP/swagger-plugin-for-sphinx)](https://api.reuse.software/info/github.com/SAP/swagger-plugin-for-sphinx)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Coverage Status](https://coveralls.io/repos/github/SAP/swagger-plugin-for-sphinx/badge.svg)](https://coveralls.io/github/SAP/swagger-plugin-for-sphinx)\n\n# Swagger Plugin for Sphinx\n\nThis is a handy plugin to bring [Swagger](https://swagger.io/) and [Sphinx](https://www.sphinx-doc.org/en/master/) together.\n\nIt can generate one or multiple swagger HTML pages with a custom configuration that hosts an OpenAPI specification.\n\n## Install\n\nJust run `pip install swagger-plugin-for-sphinx`\n\n## Usage\n\n### Enable the Plugin\n\nFirst, add the plugin to the extensions list:\n\n```python\nextensions = [\"swagger_plugin_for_sphinx\"]\n```\n\n### Global Configuration\n\nSwagger uses two JavaScript and one CSS file to render the output.\nThese can be set in ``conf.py``:\n\n```python\nswagger_present_uri = \"\"\nswagger_bundle_uri = \"\"\nswagger_css_uri = \"\"\n```\n\nThese correspond to the modules explained [here](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/installation.md).\nBy default, the latest release is used from [here](https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest).\n\n### Directive\n\nTo include a Swagger API specification into an HTML page specify the `swagger-plugin` directive\nand the relative path to the specification:\n\n```code\n.. swagger-plugin:: path/to/spec.yaml\n```\n\nThe spec is automatically copied into the `_static` build output directory.\n\nThe directive supports the following options\n\n* `id`: specifies an unique ID for the specification per page (see below)\n* `full-page`: if set, all other content on the page is dropped and only the Swagger part is rendered\n* `page-title`: the name of the HTML page if `full-page` is specified\n* `swagger-options`: JSON string that is passed to Swagger to enable additional options as described\n    on the [configuration](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)\n    page of the Swagger documentation.\n\nBy default, the directive creates a `\u003cdiv\u003e` element with the ID `swagger-ui-container`.\nIf you put more than one `swagger-plugin` directive in a file, specify unique IDs:\n\n```code\n.. swagger-plugin:: path/to/one.yaml\n   :id: spec-one\n\n.. swagger-plugin:: path/to/two.yaml\n   :id: spec-two\n```\n\n## Development\nThis project uses `uv`.\nTo setup a venv for development use\n`python3.14 -m venv venv \u0026\u0026 pip install uv \u0026\u0026 uv sync --all-groups \u0026\u0026 rm -rf venv/`.\nThen use `source .venv/bin/activate` to activate your venv.\n\n## Build and Publish\n\nThis project uses `setuptools` as the dependency management and build tool.\nTo publish a new release, follow these steps:\n* Update the version in the `pyproject.toml`\n* Add an entry in the changelog\n* Push a new tag like `vX.X.X` to trigger the release\n\n## Support, Feedback, Contributing\n\nThis project is open to feature requests/suggestions, bug reports etc., via [GitHub issues](https://github.com/SAP/\u003cyour-project\u003e/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).\n\n## Code of Conduct\n\nWe as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](CODE_OF_CONDUCT.md) at all times.\n\n## Licensing\n\nCopyright 2025 SAP SE or an SAP affiliate company and swagger-plugin-for-sphinx contributors.\nPlease see our [LICENSE](LICENSE) for copyright and license information.\nDetailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/\u003cyour-project\u003e).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap%2Fswagger-plugin-for-sphinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap%2Fswagger-plugin-for-sphinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap%2Fswagger-plugin-for-sphinx/lists"}