An Emacs major mode for OpenAPI YAML files. OpenAPI YAML mode supports OpenAPI 2 and 3. OpenAPI 2 files are identical to the Swagger 2 files.
This project is archived and will no longer be maintained. OpenAPI YAML mode has some unfixed issues, so it might not be very stable.
OpenAPI YAML mode is based on yaml-mode, but uses a different strategy for syntax highlight that takes into consideration the OpenAPI specification. It depends on many regexes to do some custom syntax highlight based on the contents of a typical OpenAPI file, but that approach is quite limited.
- Syntax highlight based on the OpenAPI specification (version 2 and 3).
- Basic completion with
completion-at-point
. Works with Company through the CAPF back-end. - IMenu for paths and operationIds.
- Swagger 2 validation can be added with flycheck-swagger-cli.
The defcustom variable openapi-yaml-use-yaml-mode-syntax-highlight
can be used to
disable the OpenAPI syntax highlight of OpenAPI YAML Mode. The default syntax
highlight of yaml-mode is used instead.
(setq openapi-yaml-use-yaml-mode-syntax-highlight t)