wiki.techinc.nl/.eslintignore
daniel d7ed4b14bb REST: validate JSON in tests
This applies JSON Schema validation in phpunit tests where appropriate:

1) In ModuleSpecHandlerTest, the generated OpenApi specs are validated
against the OpenAPI 3 schema.

2) In RestStructureTest, module definition files are validated against
   the mwapi schema.

This patch introduces a new trait to make it easy for phpunit test cases
to perform validation.

This patch also fixes some issues with the docs/rest/mwapi-1.0.json
schema and the includes/Rest/content.v1.json module definition.

Change-Id: I966cddb337c9373ed3a369496548a8d8c538ae84
2024-09-20 15:42:32 +00:00

37 lines
814 B
Text

# Upstream code
/resources/lib/
/resources/src/mediawiki.libs.jpegmeta/
# Skip functions
/resources/src/skip-*
# Build tooling
/docs/coverage/
/docs/html/
/docs/js/
/docs/latex/
/vendor/
/tests/coverage/
# Test data
/tests/phpunit/data/registration/duplicate_keys.json
/tests/phpunit/data/resourceloader/codex/
/tests/phpunit/data/resourceloader/codex-devmode/
/tests/phpunit/unit/includes/Settings/Source/fixtures/bad.json
/tests/phpunit/**/*malformed*.json
/maintenance/benchmarks/data/
# Nested projects
/extensions/
/skins/
# Language files written automatically by TranslateWiki
/**/i18n/**/*.json
!/**/i18n/**/en.json
!/**/i18n/**/qqq.json
# Ignore directories where MW may write internal files (T291674)
# Ref $wgCacheDirectory (installer)
# Ref $wgUploadDirectory (run-time default)
/cache/
/images/