https://github.com/merrickluo/openapi-preview
A emacs helper to preview OpenAPI(Swagger) definition files in browser.
https://github.com/merrickluo/openapi-preview
emacs openapi redoc swagger
Last synced: 7 months ago
JSON representation
A emacs helper to preview OpenAPI(Swagger) definition files in browser.
- Host: GitHub
- URL: https://github.com/merrickluo/openapi-preview
- Owner: merrickluo
- License: gpl-3.0
- Created: 2022-09-16T12:18:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-17T04:27:04.000Z (over 3 years ago)
- Last Synced: 2025-01-07T07:31:00.490Z (about 1 year ago)
- Topics: emacs, openapi, redoc, swagger
- Language: Emacs Lisp
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+title: OpenAPI Preview
Preview OpenAPI(Swagger) definition files in browser.
* Requirements
This package use [[https://github.com/Redocly/redoc][redoc-cli]] to generate html for current buffer for preview. So you need to install it first, find it in your package manager or install via npm/yarn.
#+begin_src shell
npm i -g redoc-cli
#+end_src
* Installation
** doomemacs
in =packages.el=
#+begin_src emacs-lisp
(package! openapi-preview :recipe (:host github :repo "merrickluo/openapi-preview"))
#+end_src
in =config.el=
#+begin_src emacs-lisp
(use-package! openapi-preview :commands 'openapi-preview)
#+end_src
** straight.el
#+begin_src emacs-lisp
(straight-use-package
'(openapi-preview :type git :host github :repo "merrickluo/openapi-preview"))
#+end_src
* Usage
+ visit a openapi(swagger) definition file
+ =M-x openapi-preview=
* Reference
+ https://github.com/Nooby/swagger-mode