File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1919 * @link https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#headerObject
2020 *
2121 */
22- class Header
22+ class Header extends Parameter
2323{
24- // TODO implement
24+ public function performValidation ()
25+ {
26+ if (!empty ($ this ->name )) {
27+ $ this ->addError ("'name' must not be specified in Header Object. " );
28+ }
29+ if (!empty ($ this ->in )) {
30+ $ this ->addError ("'in' must not be specified in Header Object. " );
31+ }
32+ if (!empty ($ this ->content ) && !empty ($ this ->schema )) {
33+ $ this ->addError ("A Header Object MUST contain either a schema property, or a content property, but not both. " );
34+ }
35+ }
2536}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ protected function performValidation()
7171 }
7272 }
7373 if (!empty ($ this ->content ) && !empty ($ this ->schema )) {
74- $ this ->addError ("A parameter MUST contain either a schema property, or a content property, but not both. " );
74+ $ this ->addError ("A Parameter Object MUST contain either a schema property, or a content property, but not both. " );
7575 }
7676 }
7777}
You can’t perform that action at this time.
0 commit comments