This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/doc/ale-openapi.txt

75 lines
2.7 KiB
Text
Raw Normal View History

2019-09-20 13:04:44 +00:00
===============================================================================
ALE OpenApi Integration *ale-openapi-options*
===============================================================================
2021-01-22 14:51:29 +00:00
ibm_validator *ale-openapi-ibm-validator*
2019-09-20 13:04:44 +00:00
Website: https://github.com/IBM/openapi-validator
Installation
-------------------------------------------------------------------------------
Install ibm-openapi-validator either globally or locally: >
npm install ibm-openapi-validator -g # global
npm install ibm-openapi-validator # local
<
2020-05-15 00:15:57 +00:00
Configuration
-------------------------------------------------------------------------------
OpenAPI files can be written in YAML or JSON so in order for ALE plugins to
work with these files we must set the buffer |filetype| to either |openapi.yaml|
or |openapi.json| respectively. This causes ALE to lint the file with linters
configured for openapi and yaml files or openapi and json files respectively.
For example setting filetype to |openapi.yaml| on a buffer and the following
|g:ale_linters| configuration will enable linting of openapi files using both
2021-01-22 14:51:29 +00:00
|ibm_validator| and |yamlint|:
2020-05-15 00:15:57 +00:00
>
let g:ale_linters = {
\ 'yaml': ['yamllint'],
2021-01-22 14:51:29 +00:00
\ 'openapi': ['ibm_validator']
2020-05-15 00:15:57 +00:00
\}
<
The following plugin will detect openapi files automatically and set the
filetype to |openapi.yaml| or |openapi.json|:
2019-09-20 13:04:44 +00:00
https://github.com/hsanson/vim-openapi
Options
-------------------------------------------------------------------------------
g:ale_openapi_ibm_validator_executable *g:ale_openapi_ibm_validator_executable*
*b:ale_openapi_ibm_validator_executable*
Type: |String|
Default: `'lint-openapi'`
This variable can be set to change the path to lint-openapi.
g:ale_openapi_ibm_validator_options *g:ale_openapi_ibm_validator_options*
*b:ale_openapi_ibm_validator_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to lint-openapi.
===============================================================================
prettier *ale-openapi-prettier*
See |ale-javascript-prettier| for information about the available options.
===============================================================================
yamllint *ale-openapi-yamllint*
See |ale-yaml-yamllint| for information about the available options.
2019-09-20 13:04:44 +00:00
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: