]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/doc/ale-openapi.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / doc / ale-openapi.txt
1 ===============================================================================
2 ALE OpenApi Integration                                     *ale-openapi-options*
3
4
5 ===============================================================================
6 ibm_validator                                        *ale-openapi-ibm-validator*
7
8 Website: https://github.com/IBM/openapi-validator
9
10
11 -------------------------------------------------------------------------------
12 Installation
13
14 Install ibm-openapi-validator either globally or locally: >
15
16   npm install ibm-openapi-validator -g  # global
17   npm install ibm-openapi-validator     # local
18 <
19
20 -------------------------------------------------------------------------------
21 Configuration
22
23 OpenAPI files can be written in YAML or JSON so in order for ALE plugins to
24 work with these files we must set the buffer |filetype| to either |openapi.yaml|
25 or |openapi.json| respectively. This causes ALE to lint the file with linters
26 configured for openapi and yaml files or openapi and json files respectively.
27
28 For example setting filetype to |openapi.yaml| on a buffer and the following
29 |g:ale_linters| configuration will enable linting of openapi files using both
30 |ibm_validator| and |yamlint|:
31
32 >
33   let g:ale_linters = {
34     \   'yaml': ['yamllint'],
35     \   'openapi': ['ibm_validator']
36   \}
37 <
38
39 The following plugin will detect openapi files automatically and set the
40 filetype to |openapi.yaml| or |openapi.json|:
41
42   https://github.com/hsanson/vim-openapi
43
44
45 -------------------------------------------------------------------------------
46 Options
47                                  *ale-options.openapi_ibm_validator_executable*
48                                        *g:ale_openapi_ibm_validator_executable*
49                                          *b:ale_openapi_ibm_validator_executable*
50 openapi_ibm_validator_executable
51 g:ale_openapi_ibm_validator_executable
52   Type: |String|
53   Default: `'lint-openapi'`
54
55   This variable can be set to change the path to lint-openapi.
56
57                                     *ale-options.openapi_ibm_validator_options*
58                                           *g:ale_openapi_ibm_validator_options*
59                                           *b:ale_openapi_ibm_validator_options*
60 openapi_ibm_validator_options
61 g:ale_openapi_ibm_validator_options
62   Type: |String|
63   Default: `''`
64
65   This variable can be set to pass additional options to lint-openapi.
66
67
68 ===============================================================================
69 prettier                                                   *ale-openapi-prettier*
70
71 See |ale-javascript-prettier| for information about the available options.
72
73
74 ===============================================================================
75 yamllint                                                  *ale-openapi-yamllint*
76
77 See |ale-yaml-yamllint| for information about the available options.
78
79
80 ===============================================================================
81   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: