{"id":22489880,"url":"https://github.com/Legion2/swagger-ui-action","last_synced_at":"2025-08-02T22:31:32.669Z","repository":{"id":38811394,"uuid":"289377604","full_name":"Legion2/swagger-ui-action","owner":"Legion2","description":"Generate Swagger UI in a GitHub Actions workflow","archived":false,"fork":false,"pushed_at":"2024-10-01T20:17:06.000Z","size":2816,"stargazers_count":51,"open_issues_count":11,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-29T06:55:59.898Z","etag":null,"topics":["actions","documentation-tool","github-page","openapi","swagger-ui","workflow"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Legion2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Legion2","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"paypal.me/LeonKiefer"}},"created_at":"2020-08-21T22:34:29.000Z","updated_at":"2024-11-11T06:58:36.000Z","dependencies_parsed_at":"2024-10-25T03:13:59.060Z","dependency_job_id":"4b5fc3c4-cdf9-4978-a5a9-a9a6192bd65f","html_url":"https://github.com/Legion2/swagger-ui-action","commit_stats":{"total_commits":436,"total_committers":4,"mean_commits":109.0,"dds":"0.12385321100917435","last_synced_commit":"57b56c534dc29bd154c8cc26e2f4b1ace250ce13"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2Fswagger-ui-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2Fswagger-ui-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2Fswagger-ui-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2Fswagger-ui-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Legion2","download_url":"https://codeload.github.com/Legion2/swagger-ui-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227990205,"owners_count":17852201,"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":["actions","documentation-tool","github-page","openapi","swagger-ui","workflow"],"created_at":"2024-12-06T17:21:02.665Z","updated_at":"2024-12-06T17:23:23.723Z","avatar_url":"https://github.com/Legion2.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Legion2","paypal.me/LeonKiefer"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Swagger UI Action [![build-test](https://github.com/Legion2/swagger-ui-action/workflows/build-test/badge.svg)](https://github.com/Legion2/swagger-ui-action/actions?query=workflow%3Abuild-test+branch%3Amain)\nGenerate Swagger UI static html files and configuration to be deployed to GitHub Pages.\n\n\u003e This action only works on linux runners.\n## How to Use\nThis Action supports four different configuration modes:\n * `spec-file`: File path to local OpenAPI or Swagger specification document\n * `spec-url`: URL of an OpenAPI or Swagger specification document\n * `swagger-config-file`: File path to local swagger configuration file\n * `swagger-config-url`: URL of a swagger configuration file\n\nUse `spec-file` or `spec-url` when you have an OpenAPI or Swagger specification document and want a basic Swagger UI generated for it.\nIf you want to customize the created Swagger UI, you should use the `swagger-config-file` or the `swagger-config-url` configuration modes.\nFor information about the advanced swagger-config see the [Swagger UI Configuration documentation](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/).\n\nNote that, if `swagger-config-file` or `swagger-config-url` are used, no files specified in the `swagger-config.yaml` are copied by this action.\nIn this case, it is your responsibility to copy required files such as the OpenAPI document where you need them (output directory).\n\nThe output directory of the generated Swagger UI must be set with the `output` argument of the Action.\nOptionally the Swagger UI version can be set with the `version` input, it accepts semver ranges.\n\nThe `GITHUB_TOKEN` secret must be provided to the action. It is used to query the Github api and download the release files of Swagger UI.\n\n### Example\nThis Action only generates the Swagger UI.\nFor example, to deploy it to GitHub Pages another Action is required.\n\nExample steps from a workflow to generate and deploy Swagger UI to GitHub Pages:\n```yaml\n      - name: Generate Swagger UI\n        uses: Legion2/swagger-ui-action@v1\n        with:\n          output: swagger-ui\n          spec-file: openapi.json\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Deploy to GitHub Pages\n        uses: peaceiris/actions-gh-pages@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: swagger-ui\n```\n\nFor a full example have a look at [this workflow file](https://github.com/Legion2/open-cue-service/blob/master/.github/workflows/pages.yml).\n\n## Development\n\nThe Action runs from GitHub this repo, so the packed dist folder must be added to git. \n\nRelease a new version:\n```bash\n$ npm run package\n$ git commit -a -m \"distribution\"\n$ npm version major/minor/patch\n$ git push\n$ git tag -fa v1 -m \"Update v1 tag\"\n$ git push origin v1 --force\n```\n\nThen create a release on GitHub.\n\n[versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLegion2%2Fswagger-ui-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLegion2%2Fswagger-ui-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLegion2%2Fswagger-ui-action/lists"}