{"id":15798211,"url":"https://github.com/codeasashu/react-openapi-designer","last_synced_at":"2025-04-21T08:31:31.875Z","repository":{"id":44717627,"uuid":"340361276","full_name":"codeasashu/react-openapi-designer","owner":"codeasashu","description":"A React based UI toolkit to develop openapi schema","archived":false,"fork":false,"pushed_at":"2022-10-27T19:17:33.000Z","size":53087,"stargazers_count":7,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-05T00:40:51.752Z","etag":null,"topics":["openapi","react"],"latest_commit_sha":null,"homepage":"https://codeasashu.github.io/react-openapi-designer/","language":"JavaScript","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/codeasashu.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}},"created_at":"2021-02-19T12:22:31.000Z","updated_at":"2024-05-08T21:17:20.000Z","dependencies_parsed_at":"2022-09-11T17:11:59.812Z","dependency_job_id":null,"html_url":"https://github.com/codeasashu/react-openapi-designer","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeasashu%2Freact-openapi-designer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeasashu%2Freact-openapi-designer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeasashu%2Freact-openapi-designer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeasashu%2Freact-openapi-designer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeasashu","download_url":"https://codeload.github.com/codeasashu/react-openapi-designer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223856777,"owners_count":17214938,"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","react"],"created_at":"2024-10-05T00:40:21.103Z","updated_at":"2024-11-09T17:04:22.664Z","avatar_url":"https://github.com/codeasashu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React openapi designer\n\nReact openapi designer is a react based openapi designer that conforms to [Openapi specifications](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md)\n\n## Live Preview\n\nTo quickly get started, you can go to [https://codeasashu.github.io/react-openapi-designer/](https://codeasashu.github.io/react-openapi-designer/)\n\nYou can create a new openapi spec from scratch, or you can just paste any\nexisting yaml to import the spec and edit from the UI.\n\n\n## Hosting\n\nYou can also build and host the repo as a static website. To do so, first build\nthe project.\n\n```sh\nnpm run build\n```\n\nThis will put the compiled files in `dist/` directory. Upload everything in that\ndirectory to a static hosting.\n\n\n## Usage options\n\nYou can pass several options to the target HTML div. \n\n#### Listening to spec changes\n\nYou can listen to changes in the openapi spec and take actions on it\n\n```html\n  \u003creact-openapi-designer id=\"abcdef\" /\u003e\n\n  \u003cscript type=\"text/javascript\"\u003e\n    window.onload = function () {\n      var doc = document.getElementById(\"abcdef\")\n      doc.addEventListener(\"specChanged\", function (e) {\n        e.data.text().then((s) =\u003e {\n          const spec = JSON.parse(s);\n          console.log(\"spec in yaml syntax\", spec.yaml)\n          console.log(\"spec in json syntax\", spec.json)\n        })\n      })\n    }\n  \u003c/script\u003e\n```\n\n#### Adding mock url\n\nAdding a external url for host mocking for the spec, will show up as a\nmock url in the `Samples` widget.\n\n```html\n  \u003creact-openapi-designer mock-url=\"http://domain.tld/your/mock/url\" /\u003e\n```\n\n## Local development\n\nTo start local development, clone this repo.\n\n```sh\ngit clone https://github.com/codeasashu/react-openapi-designer\n```\n\nThen, install npm modules\n\n```sh\nnpm install\n```\n\nand finally start dev server:\n\n```sh\nnpm run dev\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeasashu%2Freact-openapi-designer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeasashu%2Freact-openapi-designer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeasashu%2Freact-openapi-designer/lists"}