Skip to content

Commit 08ccd3e

Browse files
authored
Merge pull request #4 from myENA/feature/EC-3371_update_swagger
Feature/ec 3371 update swagger
2 parents 08ef9ed + 237d620 commit 08ccd3e

7 files changed

+80
-63
lines changed

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
],
1212
"require": {
1313
"php": ">=7.1",
14+
"ext-json": "*",
15+
"ext-curl": "*",
1416
"guzzlehttp/guzzle": "6.3.*",
1517
"psr/log": "1.*"
1618
},

src/Models/MetadataBucketInstanceResponse.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
* @OA\Schema(
77
* schema="RGWMetadataBucketInstanceResponse",
88
* type="object",
9-
* ref="$/definitions/RGWMetadataResponse",
10-
* @OA\Property(
11-
* property="data",
12-
* type="object",
13-
* ref="#/components/schemas/RGWMetadataBucketInstanceResponseData"
14-
* )
9+
* allOf={
10+
* @OA\Schema(ref="#/components/schemas/RGWMetadataResponse"),
11+
* @OA\Schema(
12+
* @OA\Property(
13+
* property="data",
14+
* type="object",
15+
* ref="#/components/schemas/RGWMetadataBucketInstanceResponseData"
16+
* )
17+
* )
18+
* }
1519
* )
1620
*/
1721

src/Models/MetadataBucketResponse.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
* @OA\Schema(
77
* schema="RGWMetadataBucketResponse",
88
* type="object",
9-
* ref="$/definitions/RGWMetadataResponse",
10-
* @OA\Property(
11-
* property="data",
12-
* type="object",
13-
* ref="#/components/schemas/RGWMetadataBucketResponseData"
14-
* )
9+
* allOf={
10+
* @OA\Schema(ref="#/components/schemas/RGWMetadataResponse"),
11+
* @OA\Schema(
12+
* @OA\Property(
13+
* property="data",
14+
* type="object",
15+
* ref="#/components/schemas/RGWMetadataBucketResponseData"
16+
* )
17+
* )
18+
* }
1519
* )
1620
*/
1721

src/Models/MetadataUserInfo.php

+46-42
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,52 @@
66
* @OA\Schema(
77
* schema="RGWMetadataUserInfo",
88
* type="object",
9-
* ref="$/definitions/RGWUserInfo",
10-
* @OA\Property(
11-
* property="auid",
12-
* type="integer"
13-
* ),
14-
* @OA\Property(
15-
* property="op_mask",
16-
* type="string"
17-
* ),
18-
* @OA\Property(
19-
* property="default_placement",
20-
* type="string"
21-
* ),
22-
* @OA\Property(
23-
* property="placement_tags",
24-
* type="array",
25-
* @OA\Items(type="string"),
26-
* ),
27-
* @OA\Property(
28-
* property="bucket_quota",
29-
* type="object",
30-
* ref="#/components/schemas/RGWQuotaMeta"
31-
* ),
32-
* @OA\Property(
33-
* property="user_quota",
34-
* type="object",
35-
* ref="#/components/schemas/RGWQuotaMeta"
36-
* ),
37-
* @OA\Property(
38-
* property="temp_url_keys",
39-
* type="array",
40-
* @OA\Items(type="string"),
41-
* ),
42-
* @OA\Property(
43-
* property="type",
44-
* type="string"
45-
* ),
46-
* @OA\Property(
47-
* property="attrs",
48-
* type="array",
49-
* @OA\Items(ref="#/components/schemas/RGWMetadataAttribute")
50-
* )
9+
* allOf={
10+
* @OA\Schema(ref="#/components/schemas/RGWUserInfo"),
11+
* @OA\Schema(
12+
* @OA\Property(
13+
* property="auid",
14+
* type="integer"
15+
* ),
16+
* @OA\Property(
17+
* property="op_mask",
18+
* type="string"
19+
* ),
20+
* @OA\Property(
21+
* property="default_placement",
22+
* type="string"
23+
* ),
24+
* @OA\Property(
25+
* property="placement_tags",
26+
* type="array",
27+
* @OA\Items(type="string"),
28+
* ),
29+
* @OA\Property(
30+
* property="bucket_quota",
31+
* type="object",
32+
* ref="#/components/schemas/RGWQuotaMeta"
33+
* ),
34+
* @OA\Property(
35+
* property="user_quota",
36+
* type="object",
37+
* ref="#/components/schemas/RGWQuotaMeta"
38+
* ),
39+
* @OA\Property(
40+
* property="temp_url_keys",
41+
* type="array",
42+
* @OA\Items(type="string"),
43+
* ),
44+
* @OA\Property(
45+
* property="type",
46+
* type="string"
47+
* ),
48+
* @OA\Property(
49+
* property="attrs",
50+
* type="array",
51+
* @OA\Items(ref="#/components/schemas/RGWMetadataAttribute")
52+
* )
53+
* )
54+
* }
5155
* )
5256
*/
5357

src/Models/MetadataUserResponse.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
* @OA\Schema(
77
* schema="RGWMetadataUserResponse",
88
* type="object",
9-
* ref="$/definitions/RGWMetadataResponse",
10-
* @OA\Property(
11-
* property="data",
12-
* type="object",
13-
* ref="#/components/schemas/RGWMetadataUserInfo"
14-
* )
9+
* allOf={
10+
* @OA\Schema(ref="#/components/schemas/RGWMetadataResponse"),
11+
* @OA\Schema(
12+
* @OA\Property(
13+
* property="data",
14+
* type="object",
15+
* ref="#/components/schemas/RGWMetadataUserInfo"
16+
* )
17+
* )
18+
* }
1519
* )
1620
*/
1721

src/Validator/InstanceOfValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public function test($value): bool
4646
*/
4747
public function expectedStatement(): string
4848
{
49-
return 'object that is an instance of '.$this->class;
49+
return 'object that is an instance of ' . $this->class;
5050
}
5151
}

tests/OpenApiTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public function testAnnotation()
3030
* title="php-rgw-api",
3131
* description="php-rgw-api",
3232
* @OA\Contact(
33-
* email="[email protected]",
34-
33+
3534
* ),
3635
* @OA\License(
3736
* name="Mozilla Public License 2.0",

0 commit comments

Comments
 (0)