Skip to content

Commit ed90d91

Browse files
authored
Merge pull request #7 from biosimulations/master
Open api fixes
2 parents a501a3f + 0597865 commit ed90d91

File tree

3 files changed

+992
-894
lines changed

3 files changed

+992
-894
lines changed

.github/workflows/validate.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on: [push, workflow_dispatch]
7+
8+
jobs:
9+
validateOpenApiSpec:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: 12
19+
- run: npm install -g ibm-openapi-validator
20+
- run: lint-openapi openapi.yaml

.validaterc

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"shared": {
3+
"operations": {
4+
"no_operation_id": "warning",
5+
"operation_id_case_convention": [
6+
"warning",
7+
"lower_snake_case"
8+
],
9+
"no_summary": "warning",
10+
"no_array_responses": "error",
11+
"parameter_order": "warning",
12+
"undefined_tag": "warning",
13+
"unused_tag": "warning",
14+
"operation_id_naming_convention": "warning"
15+
},
16+
"pagination": {
17+
"pagination_style": "warning"
18+
},
19+
"parameters": {
20+
"no_parameter_description": "error",
21+
"param_name_case_convention": [
22+
"error",
23+
"lower_camel_case"
24+
],
25+
"invalid_type_format_pair": "error",
26+
"content_type_parameter": "error",
27+
"accept_type_parameter": "error",
28+
"authorization_parameter": "warning",
29+
"required_param_has_default": "warning"
30+
},
31+
"paths": {
32+
"missing_path_parameter": "error",
33+
"duplicate_path_parameter": "warning",
34+
"snake_case_only": "off",
35+
"paths_case_convention": [
36+
"error",
37+
"lower_snake_case"
38+
]
39+
},
40+
"responses": {
41+
"inline_response_schema": "warning"
42+
},
43+
"security_definitions": {
44+
"unused_security_schemes": "warning",
45+
"unused_security_scopes": "warning"
46+
},
47+
"security": {
48+
"invalid_non_empty_security_array": "error"
49+
},
50+
"schemas": {
51+
"invalid_type_format_pair": "error",
52+
"snake_case_only": "off",
53+
"no_schema_description": "warning",
54+
"no_property_description": "warning",
55+
"description_mentions_json": "warning",
56+
"array_of_arrays": "warning",
57+
"inconsistent_property_type": [
58+
"warning",
59+
[
60+
"code",
61+
"default",
62+
"type",
63+
"value"
64+
]
65+
],
66+
"property_case_convention": [
67+
"error",
68+
"lower_camel_case"
69+
],
70+
"property_case_collision": "error",
71+
"enum_case_convention": [
72+
"warning",
73+
"lower_snake_case"
74+
],
75+
"undefined_required_properties": "warning"
76+
},
77+
"walker": {
78+
"no_empty_descriptions": "error",
79+
"has_circular_references": "warning",
80+
"$ref_siblings": "off",
81+
"duplicate_sibling_description": "warning",
82+
"incorrect_ref_pattern": "warning"
83+
}
84+
},
85+
"swagger2": {
86+
"operations": {
87+
"no_consumes_for_put_or_post": "error",
88+
"get_op_has_consumes": "warning",
89+
"no_produces": "warning"
90+
}
91+
},
92+
"oas3": {
93+
"operations": {
94+
"no_request_body_name": "warning"
95+
},
96+
"responses": {
97+
"no_success_response_codes": "warning",
98+
"protocol_switching_and_success_code": "error",
99+
"no_response_body": "warning",
100+
"ibm_status_code_guidelines": "warning"
101+
},
102+
"schemas": {
103+
"json_or_param_binary_string": "warning"
104+
}
105+
},
106+
"spectral": {
107+
"rules": {}
108+
}
109+
}

0 commit comments

Comments
 (0)