This demonstrates how to use ArrayDef::makeObjectSchema to define a
schema for a complex body field.
The "latest" field in the request body for page PUT requests identifies
the base revision. To allow the base revision info to be looped through
from an earlier GET request, it's nice to allow the "timestamp" field
to be present, even though we don't use it.
I changed the relevant part of Update.js to test that use case specifically.
Bug: T368131
Change-Id: I166396e0dbfc995e5346252ee438c9afe2c808e2
Why:
- The tests in this file aren't specifically about anonymous editing,
and using a named user for the test edits makes it easier to support
this test in both a temp accounts and non-temp-accounts context
What:
- Switch the actor used in making edits for the fixtures in the tests to
be a named user
Bug: T365647
Change-Id: Ic3cc846892b03a9a550f39a92686ae904cfa2c82
Add extra checks on all REST API tests which return sucess data values.
This extra check is used to ensure that an accurate `Content-Type` is
being sent to the client, as an incorrect header can cause consumers
to misinterpret the data returned by the API (particularly JQuery, as
described in T352546).
The check was added only to endpoints which return success data.
Tests that check for 4xx status codes do not have the content type
check.
This is a follow-up to I381f33dd.
Bug: T352546
Change-Id: Ib9316b26035ed699f1e607f96e04da110c0edb32
Mostly this has a bunch of whitespace changes from the
template-curly-spacing and brace-style rules being set
to align with other spacing rules.
Change-Id: I4609c52a4ef426ad1f35fb4bfe447bb08323a8e8
* Share logic previously implemented for html/with formats through
a trait class
* source/bare formats doesn't execute a temporary redirect. the
JSON body will contain a key "redirect_target" instead if a wiki
redirect is found
* Introduce PageRedirectHandlerTest to test redirect logic shared
between multiple handlers
* Move Handler instatiation to HandlerTestTrait
* Update api-testing tests in Update.js
Change-Id: Id66e33e19adabdb3c9621eaea4a5d441f23edafd
The following endpoints move from v0 to v1:
GET page/{title}/links/language
GET page/{title}
PUT page/{title}
POST page
GET page/{title}/bare
GET page/{title}/html
GET page/{title}/with_html
GET page/{title}/links/media
GET file/{title}
NOTE: after merging this, give SRE a heads up, e.g. by
putting a note on the train ticket when this is merged
(navigate from T254174 as appropriate).
Bug: T255043
Change-Id: I3b8890da901e6312582d9a215c6a647173f16149
NOTE: once this is merged, also merge Ie7b47e6868cc on the OAuth repo,
to fix unit tests after a breaking change to Router's constructor
signature.
Bug: T230842
Change-Id: I8f5b92918a58e44a4f2d8c78d234d9f64c2d06bf