{"id":19854728,"url":"https://github.com/phwoolcon/swagger-editor-helper","last_synced_at":"2026-06-08T01:02:01.547Z","repository":{"id":93559808,"uuid":"132973244","full_name":"phwoolcon/swagger-editor-helper","owner":"phwoolcon","description":"Hack Swagger Editor to Provide View-only Mode","archived":false,"fork":false,"pushed_at":"2018-05-16T04:03:48.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T23:38:40.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/phwoolcon.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":"2018-05-11T01:30:48.000Z","updated_at":"2018-05-16T04:03:50.000Z","dependencies_parsed_at":"2023-03-13T17:17:32.633Z","dependency_job_id":null,"html_url":"https://github.com/phwoolcon/swagger-editor-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phwoolcon/swagger-editor-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fswagger-editor-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fswagger-editor-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fswagger-editor-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fswagger-editor-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phwoolcon","download_url":"https://codeload.github.com/phwoolcon/swagger-editor-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Fswagger-editor-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34043822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T14:10:14.083Z","updated_at":"2026-06-08T01:02:01.527Z","avatar_url":"https://github.com/phwoolcon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger Editor Helper\nHack [Swagger Editor](https://github.com/swagger-api/swagger-editor) to Provide View-only Mode.\n\nI don't have enough time and nodejs working experience to contribute to Swagger Editor itself, so I just hack it by override the response in nginx.\n\nThe community looks not that easy:\n* [How can I export the HTML of the preview? #623](https://github.com/swagger-api/swagger-editor/issues/623) [ NOT WELCOME HERE ]\n* [Add a view only mode? #719](https://github.com/swagger-api/swagger-editor/issues/719) [ HACK it yourself ]\n* [Feature: Preview Only #795](https://github.com/swagger-api/swagger-editor/pull/795) [ IMPLEMENTED BUT REJECTED, WTF! ]\n\n## Usage\n1. Install Swagger Editor by docker:\n    ```bash\n    docker pull swaggerapi/swagger-editor\n    docker run -d -p 9010:8080 swaggerapi/swagger-editor\n    ```\n    This will run swagger-editor on port 9010\n1. Copy `nginx` files to your nginx config directory:\n    ```bash\n    cp -r nginx/* /etc/nginx\n    ```\n1. Change `server_name` and `root`\n    ```bash\n    vim /etc/nginx/sites-enabled/swagger.conf\n    ```\n    **ATTENTION**: use `public` dir as root\n1. Reload nginx\n    ```bash\n    nginx -t \u0026\u0026 nginx -s reload\n    ```\n### HTTPS\nIf you want to access swagger via https, please:\n1. Prepare SSL certificate;\n1. Use `swagger.https.conf`:\n    ```bash\n    ln -snf ../sites-available/swagger.https.conf /etc/nginx/sites-enabled/swagger.conf\n    ```\n1. Change `ssl_certificate` and `ssl_certificate_key` to use real certificate;\n1. Generate a dhparam file:\n    ```bash\n    sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096\n    ```\n1. Then reload nginx:\n    ```bash\n    nginx -t \u0026\u0026 nginx -s reload\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Fswagger-editor-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphwoolcon%2Fswagger-editor-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Fswagger-editor-helper/lists"}