You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Update ``docs/source/rules/examples/{rule_code}/(new|old).yaml`` example Swagger spec change and update ``docs/source/rules/examples/{rule_code}/tester.py`` tester file.
169
159
170
-
# Please make sure that:
171
-
# * `description` and `short_name` are reasonably explicative to support `swagger_spec_compatibility explain` command
172
-
# * `error_code` has REQ- prefix for `RuleType.REQUEST_CONTRACT`, RES- for `RuleType.RESPONSE_CONTRACT` and MIS- for `RuleType.MISCELLANEOUS`
160
+
The objective of those files is to provide a simple speec change that triggers the backward incompatible detection rule through the usage of a bravado client (check the other testers for examples).
161
+
to ensure that the example that triggers the newly created .
173
162
163
+
**NOTE**: The testers are executed by automated tests, so ``tester.py`` should complete without errors and that the spec changes are triggering the newly created rule.
174
164
175
-
3. Add tests to ensure that your rule behaves as expected (tests in ``tests/rules/FILE_test.py``)
176
-
177
-
3. Add documentation for the defined rule in ``docs/source/rules/ERROR_CODE.rst``. Try to be consistent with the style
165
+
4. Add documentation for the defined rule in ``docs/source/rules/{error_code}.rst``. Try to be consistent with the style
178
166
of the others documentation pages
179
167
180
-
4. Add example of a Swagger spec change that triggers the rule in ``docs/source/rules/examples/ERROR_CODE.rst``.
181
-
Ensure to define a `tester.py` file that will make explicit the backward incompatible change through the usage of a
182
-
`bravado <https://github.com/Yelp/bravado>`_ client (check the other testers for examples).
183
-
**NOTE**: The testers are executed by automated tests, this is intended to ensure that documentation is in sync with
184
-
the codebase.
185
168
5. [Optional] Add integration tests to ensure that no regressions will be introduced and/or to validate edge cases of the new rule.
186
169
Integration tests are defined as follow: ``case-<incremental number>-<number of expected reports>-reports-<short description>`` directory
187
170
with two files: ``old.yaml`` and ``new.yaml``. The two files represent two versions of the swagger specs that need to be checked for
0 commit comments