{"id":13411206,"url":"https://github.com/swagger-api/swagger-editor","last_synced_at":"2026-02-04T11:26:09.948Z","repository":{"id":16635521,"uuid":"19390712","full_name":"swagger-api/swagger-editor","owner":"swagger-api","description":"Swagger Editor","archived":false,"fork":false,"pushed_at":"2025-09-04T14:13:15.000Z","size":2457662,"stargazers_count":9264,"open_issues_count":275,"forks_count":2331,"subscribers_count":258,"default_branch":"master","last_synced_at":"2025-09-05T23:22:52.694Z","etag":null,"topics":["hacktoberfest","open-source","openapi-specification","openapi3","openapi31","rest","rest-api","swagger","swagger-editor","swagger-oss","swagger-ui"],"latest_commit_sha":null,"homepage":"https://editor.swagger.io","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/swagger-api.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-05-02T22:47:10.000Z","updated_at":"2025-09-04T14:11:11.000Z","dependencies_parsed_at":"2023-01-14T12:45:15.691Z","dependency_job_id":"9b0bd753-acd2-4d65-9e7a-59e6f237481a","html_url":"https://github.com/swagger-api/swagger-editor","commit_stats":{"total_commits":3938,"total_committers":137,"mean_commits":"28.744525547445257","dds":0.7841543930929405,"last_synced_commit":"1bd99136bee9992769503ac3890e43f6aee354b4"},"previous_names":[],"tags_count":552,"template":false,"template_full_name":null,"purl":"pkg:github/swagger-api/swagger-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swagger-api","download_url":"https://codeload.github.com/swagger-api/swagger-editor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-editor/sbom","scorecard":{"id":861491,"data":{"date":"2025-08-11","repo":{"name":"github.com/swagger-api/swagger-editor","commit":"3a162290c5be021d0614d04482cccca005037493"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:37","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:40","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:41","Info: found token with 'none' permissions: .github/workflows/docker-image-check.yml:14","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabot-merge.yml:1","Warn: no topLevel permission defined: .github/workflows/deploy-gh-pages.yml:1","Warn: no topLevel permission defined: .github/workflows/deploy-rancher.yml:1","Warn: no topLevel permission defined: .github/workflows/docker-build-push.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/docker-image-check.yml:9","Warn: no topLevel permission defined: .github/workflows/nightly-build.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/nodejs.yml:15","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker-build-push.yml:13"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (25) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/codeql.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-merge.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/dependabot-merge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-merge.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/dependabot-merge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-gh-pages.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/deploy-gh-pages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-gh-pages.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/deploy-gh-pages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy-gh-pages.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/deploy-gh-pages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-build-push.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-build-push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image-check.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/docker-image-check.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nightly-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nightly-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-build.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nightly-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nightly-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-editor/release.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating nginx:1.29.0-alpine to nginx:1.29.0-alpine@sha256:d67ea0d64d518b1bb04acde3b00f722ac3e9764b3209a9b0a98924ba35e4b779","Info:   0 out of  20 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   4 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-75v8-2h7p-7m2m","Warn: Project is vulnerable to: GHSA-jgmv-j7ww-jx2x","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T01:26:07.874Z","repository_id":16635521,"created_at":"2025-08-24T01:26:07.874Z","updated_at":"2025-08-24T01:26:07.874Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152756,"owners_count":25231293,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["hacktoberfest","open-source","openapi-specification","openapi3","openapi31","rest","rest-api","swagger","swagger-editor","swagger-oss","swagger-ui"],"created_at":"2024-07-30T20:01:12.151Z","updated_at":"2026-02-04T11:26:04.894Z","avatar_url":"https://github.com/swagger-api.png","language":"JavaScript","readme":"# \u003cimg src=\"https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWE-logo-clr.png\" height=\"80\"\u003e\n[![NPM version](https://badge.fury.io/js/swagger-editor.svg)](http://badge.fury.io/js/swagger-editor)\n[![Build Status](https://jenkins.swagger.io/buildStatus/icon?job=oss-swagger-editor-master)](https://jenkins.swagger.io/job/oss-swagger-editor-master/)\n[![Code Climate](https://codeclimate.com/github/swagger-api/swagger-editor/badges/gpa.svg)](https://codeclimate.com/github/swagger-api/swagger-editor)\n[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20JavaScript/job/oss-swagger-editor-master/badge/icon?subject=jenkins%20build)](https://jenkins.swagger.io/view/OSS%20-%20JavaScript/job/oss-swagger-editor-master/)\n\n**⏰️ Looking for the next generation version of Swagger Editor?**\n\nSwaggerEditor is now released under two major release channels:\n\n1. [SwaggerEditor@4](https://github.com/swagger-api/swagger-editor/releases?q=v4\u0026expanded=true) - released from [master](https://github.com/swagger-api/swagger-editor/tree/master) branch and deployed at https://editor.swagger.io/\n2. [SwaggerEditor@5](https://github.com/swagger-api/swagger-editor/releases?q=v5\u0026expanded=true) - released from [next](https://github.com/swagger-api/swagger-editor/tree/next) branch and deployed at https://editor-next.swagger.io/\n\nOnly **SwaggerEditor@5** supports [OpenAPI 3.1.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md). \nSwaggerEditor@4 will not receive OpenAPI 3.1.0 support and is considered legacy at this point.\nThe plan is to continually migrate fully to SwaggerEditor@5 and deprecate the SwaggerEditor@4 in the future.\n\n---\n\n**🕰️ Looking for the older version of Swagger Editor?** Refer to the [*2.x*](https://github.com/swagger-api/swagger-editor/tree/2.x) or [*3.x*](https://github.com/swagger-api/swagger-editor/tree/3.x) branches.\n\n---\n\nSwagger Editor lets you edit **OpenAPI API definitions** ([OpenAPI 2.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) and [OpenAPI 3.0.3](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md)) \nin JSON or YAML format inside your browser and to preview documentations in real time.\nValid OpenAPI definitions can then be generated and used with the full Swagger tooling (code generation, documentation, etc).\n\nAs a brand-new version, written from the ground up, there are some known issues and unimplemented features. Check out the [Known Issues](#known-issues) section for more details.\n\nThis repository publishes to two different NPM modules:\n\n* [swagger-editor](https://www.npmjs.com/package/swagger-editor) is a traditional npm module intended for use in single-page applications that are capable of resolving dependencies (via Webpack, Browserify, etc).\n* [swagger-editor-dist](https://www.npmjs.com/package/swagger-editor-dist) is a dependency-free module that includes everything you need to serve Swagger Editor in a server-side project, or a web project that can't resolve npm module dependencies.\n\nIf you're building a single-page application, using `swagger-editor` is strongly recommended, since `swagger-editor-dist` is significantly larger.\n\n## Anonymized analytics\n\nSwagger Editor uses [Scarf](https://scarf.sh/) to collect [anonymized installation analytics](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-what-information-does-scarf-js-send-about-me). These analytics help support the maintainers of this library and ONLY run during installation. To [opt out](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-how-can-i-opt-out-of-analytics), you can set the `scarfSettings.enabled` field to `false` in your project's `package.json`:\n\n```\n// package.json\n{\n  // ...\n  \"scarfSettings\": {\n    \"enabled\": false\n  }\n  // ...\n}\n```\n\nAlternatively, you can set the environment variable `SCARF_ANALYTICS` to `false` as part of the environment that installs your npm packages, e.g., `SCARF_ANALYTICS=false npm install`.\n\n## Helpful scripts\n\nAny of the scripts below can be run by typing `npm run \u003cscript name\u003e` in the project's root directory.\n\n### Developing\nScript name | Description\n--- | ---\n`dev` | Spawn a hot-reloading dev server on port 3200.\n`deps-check` | Generate a size and licensing report on Swagger Editors's dependencies.\n`lint` | Report ESLint style errors and warnings.\n`lint-errors` | Report ESLint style errors, without warnings.\n`lint-fix` | Attempt to fix style errors automatically.\n`watch` | Rebuild the core files in `/dist` when the source code changes. Useful for `npm link`.\n\n### Building\nScript name | Description\n--- | ---\n`build` | Build a new set of JS and CSS assets, and output them to `/dist`.\n`build:bundle` | Build `swagger-editor-bundle.js` only (commonJS).\n`build:core` | Build `swagger-editor.(js\\|css)` only (commonJS).\n`build:standalone` | Build `swagger-editor-standalone-preset.js` only (commonJS).\n`build:stylesheets` | Build `swagger-editor.css` only.\n`build:es:bundle` | Build `swagger-editor-es-bundle.js` only (es2015).\n`build:es:bundle:core` | Build `swagger-editor-es-bundle-core.js` only (es2015).\n\n### Testing\nScript name | Description\n--- | ---\n`test` | Run unit tests in Node, run Cypress end-to-end tests, and run ESLint in errors-only mode.\n`test:unit-mocha` | Run Mocha-based unit tests in Node.\n`test:unit-jest` | Run Jest-based unit tests in Node.\n`e2e` | Run end-to-end browser tests with Cypress.\n`lint` | Run ESLint test\n`test:artifact` | Run list of bundle artifact tests in Jest\n`test:artifact:umd:bundle` | Run unit test that confirms `swagger-editor-bundle` exports as a Function\n`test:artifact:es:bundle` | Run unit test that confirms `swagger-editor-es-bundle` exports as a Function\n`test:artifact:es:bundle:core` | Run unit test that confirms `swagger-editor-es-bundle-core` exports as a Function\n\n\n## Running locally\n\n### Prerequisites\n\n- git, any version\n- **Node.js \u003e=20.3.0** and **npm \u003e=9.6.7** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.\n\n```shell\n $ npm i --legacy-peer-deps\n```\n\nIf you have Node.js and npm installed, you can run `npm start` to spin up a static server.\n\nOtherwise, you can open `index.html` directly from your filesystem in your browser.\n\nIf you'd like to make code changes to Swagger Editor, you can start up a Webpack hot-reloading dev server via `npm run dev`.\n\n##### Browser support\n\nSwagger Editor works in the latest versions of Chrome, Safari, Firefox, and Edge.\n\n### Known Issues\n\nTo help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.\n\n- Everything listed in [Swagger UI's Known Issues](https://github.com/swagger-api/swagger-ui/blob/master/README.md#known-issues).\n- The integration with the codegen is still missing.\n\n## Docker\n\n### Running the image from DockerHub\n\nThere is a docker image published in **docker.swagger.io** registry.\n\nTo use this, run the following:\n\n```\ndocker pull docker.swagger.io/swaggerapi/swagger-editor\ndocker run -d -p 80:8080 docker.swagger.io/swaggerapi/swagger-editor\n```\n\nThis will run Swagger Editor (in detached mode) on port 80 on your machine, so you can open it by navigating to `http://localhost` in your browser.  \n\n* You can provide a URL pointing to an API definition (may not be available if some security policies such as CSP or CORS are enforced):\n\n```\ndocker run -d -p 80:8080 -e URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" docker.swagger.io/swaggerapi/swagger-editor\n```\n\n* You can provide your own `json` or `yaml` definition file from your local host:\n\n```\ndocker run -d -p 80:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/swagger.json docker.swagger.io/swaggerapi/swagger-editor\n```\n\n**Note:** When both `URL` and `SWAGGER_FILE` environment variables are set, `URL` has priority and `SWAGGER_FILE` is ignored.\n\n* You can specify a different base url via `BASE_URL` variable for accessing the application - for example if you want the application to be available at `http://localhost/swagger-editor/`:\n\n```\ndocker run -d -p 80:8080 -e BASE_URL=/swagger-editor docker.swagger.io/swaggerapi/swagger-editor\n```\n\n* You can specify a different port via `PORT` variable for accessing the application, default is `8080`.\n\n```\ndocker run -d -p 80:80 -e PORT=80 docker.swagger.io/swaggerapi/swagger-editor\n```\n\n* You can specify Google Tag Manager ID via `GTM` variable for tracking the usage of the swagger-editor.\n\n```\ndocker run -d -p 80:8080 -e GTM=GTM-XXXXXX docker.swagger.io/swaggerapi/swagger-editor\n```\n\nYou can also customize the different endpoints used by the Swagger Editor with the following environment variables. For instance, this can be useful if you have your own Swagger generator server:\n\nEnvironment variable | Default value\n--- | ---\n`URL_SWAGGER2_GENERATOR` | `https://generator.swagger.io/api/swagger.json`\n`URL_OAS3_GENERATOR` | `https://generator3.swagger.io/openapi.json`\n`URL_SWAGGER2_CONVERTER` | `https://converter.swagger.io/api/convert`\n\nIf you want to run the Swagger Editor locally without the Codegen features (Generate Server and Generate Client) you can set the above environment variables to `null` (`URL_SWAGGER2_CONVERTER=null`).\n\n### Building and running an image locally\n\nTo build and run a docker image with the code checked out on your machine, run the following from the root directory of the project:\n\n```\n# Install npm packages (if needed)\nnpm install\n\n# Build the app\nnpm run build\n\n# Build an image\ndocker build -t swagger-editor .\n\n# Run the container\ndocker run -d -p 80:8080 swagger-editor\n```\n\nYou can then view the app by navigating to `http://localhost` in your browser.\n\n## Documentation\n\n* [Importing your OpenAPI document](docs/import.md)\n\n* [Contributing](https://github.com/swagger-api/.github/blob/master/CONTRIBUTING.md)\n\n### Using older version of React\n\n\u003e [!IMPORTANT]\n\u003e By older versions we specifically refer to `React \u003e=17 \u003c18`.\n\nBy default [swagger-editor@4](https://www.npmjs.com/package/swagger-editor) npm package comes with latest version of [React@18](https://react.dev/blog/2022/03/29/react-v18).\nIt's possible to use _swagger-editor@4_ npm package with older version of React.\n\nLet's say my application integrates with _swagger-editor@4_ npm package and uses [React@17.0.2](https://www.npmjs.com/package/react/v/17.0.2).\n\n### npm\n\nIn order to inform `swagger-editor@4` npm package that I require it to use my React version, I need to use [npm overrides](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides).\n\n```json\n{\n  \"dependencies\": {\n    \"react\": \"=17.0.2\",\n    \"react-dom\": \"=17.0.2\"\n  },\n  \"overrides\": {\n    \"swagger-editor\": {\n      \"react\": \"$react\",\n      \"react\": \"$react-dom\",\n      \"react-redux\": \"^8\"\n    }\n  }\n}\n```\n\n\u003e [!NOTE]\n\u003e The React and ReactDOM override are defined as a reference to the dependency. Since _react-redux@9_ only supports `React \u003e= 18`, we need to use _react-redux@8_.\n\n\n### yarn\n\nIn order to inform `swagger-editor@4` npm package that I require it to use my specific React version, I need to use [yarn resolutions](https://yarnpkg.com/cli/set/resolution).\n\n\n```json\n{\n  \"dependencies\": {\n    \"react\": \"17.0.2\",\n    \"react-dom\": \"17.0.2\"\n  },\n  \"resolutions\": {\n    \"swagger-editor/react\": \"17.0.2\",\n    \"swagger-editor/react-dom\": \"17.0.2\",\n    \"swagger-editor/react-redux\": \"^8\"\n  }\n}\n```\n\n\u003e [!NOTE]\n\u003e The React and ReactDOM resolution cannot be defined as a reference to the dependency. Unfortunately *yarn* does not support aliasing like `$react` or `$react-dom` as *npm* does. You'll need to specify the exact versions.\n\n## Security contact\n\nPlease disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.\n","funding_links":[],"categories":["JavaScript","Editors","HarmonyOS","API Design \u0026 Documentation Tools","Recently Updated","rest-api","open-source","By Category","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的","Projects","API Design"],"sub_categories":["Windows Manager","56. [Swagger Editor](https://editor.swagger.io/)","[Jan 30, 2025](/content/2025/01/30/README.md)","Apps","\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频","API Design","API Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagger-api%2Fswagger-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-editor/lists"}