Skip to content

Commit de3751f

Browse files
authored
Apply suggestions from code review
1 parent 3da7b10 commit de3751f

File tree

1 file changed

+4
-38
lines changed

1 file changed

+4
-38
lines changed

code_samples/api/rest_api/src/Rest/Controller/DefaultController.php

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,7 @@
2222
tags: [
2323
'App',
2424
],
25-
parameters: [
26-
new Model\Parameter(
27-
name: 'Accept',
28-
in: 'header',
29-
required: false,
30-
description: 'If set, the greeting is returned in XML or JSON format.',
31-
schema: [
32-
'type' => 'string',
33-
],
34-
example: 'application/vnd.ibexa.api.Greeting+json',
35-
),
36-
],
25+
parameters: [],
3726
responses: [
3827
Response::HTTP_OK => [
3928
'description' => 'OK - Return a greeting',
@@ -106,28 +95,7 @@
10695
tags: [
10796
'App',
10897
],
109-
parameters: [
110-
new Model\Parameter(
111-
name: 'Content-Type',
112-
in: 'header',
113-
required: false,
114-
description: 'The greeting input schema encoded in XML or JSON.',
115-
schema: [
116-
'type' => 'string',
117-
],
118-
example: 'application/vnd.ibexa.api.GreetingInput+json',
119-
),
120-
new Model\Parameter(
121-
name: 'Accept',
122-
in: 'header',
123-
required: false,
124-
description: 'If set, the greeting is returned in XML or JSON format.',
125-
schema: [
126-
'type' => 'string',
127-
],
128-
example: 'application/vnd.ibexa.api.Greeting+json',
129-
),
130-
],
98+
parameters: [],
13199
requestBody: new Model\RequestBody(
132100
required: false,
133101
content: new \ArrayObject([
@@ -138,14 +106,13 @@
138106
'name' => 'GreetingInput',
139107
'wrapped' => false,
140108
],
109+
'required' => [],
141110
'properties' => [
142111
'salutation' => [
143112
'type' => 'string',
144-
'required' => false,
145113
],
146114
'recipient' => [
147115
'type' => 'string',
148-
'required' => false,
149116
],
150117
],
151118
],
@@ -159,14 +126,13 @@
159126
'properties' => [
160127
'GreetingInput' => [
161128
'type' => 'object',
129+
'required' => [],
162130
'properties' => [
163131
'salutation' => [
164132
'type' => 'string',
165-
'required' => false,
166133
],
167134
'recipient' => [
168135
'type' => 'string',
169-
'required' => false,
170136
],
171137
],
172138
],

0 commit comments

Comments
 (0)