MediaWiki master
ResponseHeaders.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Rest;
4
10
15 public const CACHE_CONTROL = 'Cache-Control';
16 public const CONTENT_LANGUAGE = 'Content-Language';
17 public const CONTENT_TYPE = 'Content-Type';
18 public const DEPRECATION = 'Deprecation';
19 public const ETAG = 'ETag';
20 public const EXPIRES = 'Expires';
21 public const LAST_MODIFIED = 'Last-Modified';
22 public const LINK = 'Link';
23 public const LOCATION = 'Location';
24 public const MEDIAWIKI_REVISION_ID = 'X-MediaWiki-Revision-Id';
25 public const REQUEST_ID = 'X-Request-Id';
26 public const VARY = 'Vary';
27
32 self::CACHE_CONTROL => [
33 'messageKey' => 'rest-responseheader-desc-cachecontrol',
34 'schema' => [
35 'type' => 'string'
36 ]
37 ],
38 self::CONTENT_LANGUAGE => [
39 'messageKey' => 'rest-responseheader-desc-contentlanguage',
40 'schema' => [
41 'type' => 'string'
42 ]
43 ],
44 self::CONTENT_TYPE => [
45 'messageKey' => 'rest-responseheader-desc-contenttype',
46 'schema' => [
47 'type' => 'string'
48 ]
49 ],
50 self::DEPRECATION => [
51 'messageKey' => 'rest-responseheader-desc-deprecation',
52 'schema' => [
53 'type' => 'string'
54 ]
55 ],
56 self::ETAG => [
57 'messageKey' => 'rest-responseheader-desc-etag',
58 'schema' => [
59 'type' => 'string'
60 ]
61 ],
62 self::EXPIRES => [
63 'messageKey' => 'rest-responseheader-desc-expires',
64 'schema' => [
65 'type' => 'string',
66 'format' => 'date-time'
67 ]
68 ],
69 self::LAST_MODIFIED => [
70 'messageKey' => 'rest-responseheader-desc-lastmodified',
71 'schema' => [
72 'type' => 'string',
73 'format' => 'date-time'
74 ]
75 ],
76 self::LINK => [
77 'messageKey' => 'rest-responseheader-desc-link',
78 'schema' => [
79 'type' => 'string',
80 ]
81 ],
82 self::LOCATION => [
83 'messageKey' => 'rest-responseheader-desc-location',
84 'schema' => [
85 'type' => 'string',
86 ]
87 ],
88 self::MEDIAWIKI_REVISION_ID => [
89 'messageKey' => 'rest-responseheader-desc-mediawikirevisionid',
90 'schema' => [
91 'type' => 'string'
92 ]
93 ],
94 self::REQUEST_ID => [
95 'messageKey' => 'rest-responseheader-desc-requestid',
96 'schema' => [
97 'type' => 'string'
98 ]
99 ],
100 self::VARY => [
101 'messageKey' => 'rest-responseheader-desc-vary',
102 'schema' => [
103 'type' => 'string'
104 ]
105 ]
106 ];
107
108 private function __construct() {
109 }
110}
Central definition of HTTP response headers and their OpenAPI schemas for REST Handlers.
const CACHE_CONTROL
Header name constants.
const RESPONSE_HEADER_DEFINITIONS
OpenAPI response header definitions for descriptions and schemas.