Skip to content

Commit 3a959ca

Browse files
authored
Merge pull request #1 from alupuleasa/master
Upgrade to OpenAPi 3
2 parents 39a8522 + 668b4d4 commit 3a959ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+834
-432
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This lib is designed to be installed using [Composer](https://getcomposer.org)
99
```json
1010
{
1111
"require": {
12-
"myena/php-rgw-api": "2.*"
12+
"myena/php-rgw-api": "3.*"
1313
}
1414
}
1515
```

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"require-dev": {
1818
"myena/default-logger": "1.1.*",
19-
"zircote/swagger-php": "2.*",
19+
"zircote/swagger-php": "3.*",
2020
"phpunit/phpunit": "7.2.*"
2121
},
2222
"autoload": {

phpunit.xml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<testsuite name="user-crud">
1515
<file>./tests/Chain/User/UserCRUDTest.php</file>
1616
</testsuite>
17+
<testsuite name="swagger-annotation">
18+
<file>./tests/OpenApiTest.php</file>
19+
</testsuite>
1720
</testsuites>
1821

1922
<filter>

src/Models/AbstractMetadataResponse.php

+15-9
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWMetadataResponse",
8+
* @OA\Schema(
9+
* schema="RGWMetadataResponse",
1010
* type="object",
11-
* @SWG\Property(
11+
* @OA\Property(
1212
* property="key",
13-
* type="string"
13+
* @OA\Schema(
14+
* type="string"
15+
* )
1416
* ),
15-
* @SWG\Property(
17+
* @OA\Property(
1618
* property="mtime",
17-
* type="string"
19+
* @OA\Schema(
20+
* type="string"
21+
* )
1822
* ),
19-
* @SWG\Property(
23+
* @OA\Property(
2024
* property="ver",
21-
* type="object",
22-
* ref="#/definitions/RGWMetadataVersion"
25+
* @OA\Schema(
26+
* type="object"
27+
* ),
28+
* ref="#/components/schemas/RGWMetadataVersion"
2329
* )
2430
* )
2531
*/

src/Models/BucketIndex.php

+15-9
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,24 @@
88
use function MyENA\RGW\decodeMultiBody;
99

1010
/**
11-
* @SWG\Definition(
12-
* definition="RGWBucketIndex",
13-
* type="object",
14-
* @SWG\Property(
11+
* @OA\Schema(
12+
* schema="RGWBucketIndex",
13+
* @OA\Schema(
14+
* type="object"
15+
* ),
16+
* @OA\Property(
1517
* property="new_objects",
16-
* type="array",
17-
* @SWG\Items(type="string")
18+
* @OA\Schema(
19+
* type="array",
20+
* @OA\Items(type="string")
21+
* )
1822
* ),
19-
* @SWG\Property(
23+
* @OA\Property(
2024
* property="headers",
21-
* type="object",
22-
* ref="#/definitions/RGWBucketIndexHeaders"
25+
* @OA\Schema(
26+
* type="object"
27+
* ),
28+
* ref="#/components/schemas/RGWBucketIndexHeaders"
2329
* )
2430
* )
2531
*/

src/Models/BucketIndexHeaders.php

+15-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketIndexHeaders",
10-
* type="object",
11-
* @SWG\Property(
8+
* @OA\Schema(
9+
* schema="RGWBucketIndexHeaders",
10+
* @OA\Schema(
11+
* type="object"
12+
* ),
13+
* @OA\Property(
1214
* property="existing_header",
13-
* type="object",
14-
* ref="#/definitions/RGWBucketIndexUsage"
15+
* @OA\Schema(
16+
* type="object"
17+
* ),
18+
* ref="#/components/schemas/RGWBucketIndexUsage"
1519
* ),
16-
* @SWG\Property(
20+
* @OA\Property(
1721
* property="calculated_header",
18-
* type="object",
19-
* ref="#/definitions/RGWBucketIndexUsage"
22+
* @OA\Schema(
23+
* type="object"
24+
* ),
25+
* ref="#/components/schemas/RGWBucketIndexUsage"
2026
* )
2127
* )
2228
*/

src/Models/BucketIndexUsage.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketIndexUsage",
10-
* type="object",
11-
* @SWG\Property(
8+
* @OA\Schema(
9+
* schema="RGWBucketIndexUsage",
10+
* @OA\Schema(
11+
* type="object"
12+
* ),
13+
* @OA\Property(
1214
* property="usage",
13-
* type="object",
14-
* ref="#/definitions/RGWBucketUsage"
15+
* @OA\Schema(
16+
* type="object"
17+
* ),
18+
* ref="#/components/schemas/RGWBucketUsage"
1519
* )
1620
* )
1721
*/

src/Models/BucketInfo.php

+72-38
Original file line numberDiff line numberDiff line change
@@ -5,75 +5,109 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketInfo",
10-
* type="object",
11-
* @SWG\Property(
8+
* @OA\Schema(
9+
* schema="RGWBucketInfo",
10+
* @OA\Schema(
11+
* type="object"
12+
* ),
13+
* @OA\Property(
1214
* property="bucket",
13-
* type="string"
15+
* @OA\Schema(
16+
* type="string"
17+
* )
1418
* ),
15-
* @SWG\Property(
19+
* @OA\Property(
1620
* property="pool",
17-
* type="string"
21+
* @OA\Schema(
22+
* type="string"
23+
* )
1824
* ),
19-
* @SWG\Property(
25+
* @OA\Property(
2026
* property="index_pool",
21-
* type="string"
27+
* @OA\Schema(
28+
* type="string"
29+
* )
2230
* ),
23-
* @SWG\Property(
31+
* @OA\Property(
2432
* property="id",
25-
* type="string"
33+
* @OA\Schema(
34+
* type="string"
35+
* )
2636
* ),
27-
* @SWG\Property(
37+
* @OA\Property(
2838
* property="marker",
29-
* type="string"
39+
* @OA\Schema(
40+
* type="string"
41+
* )
3042
* ),
31-
* @SWG\Property(
43+
* @OA\Property(
3244
* property="owner",
33-
* type="string"
45+
* @OA\Schema(
46+
* type="string"
47+
* )
3448
* ),
35-
* @SWG\Property(
49+
* @OA\Property(
3650
* property="ver",
37-
* type="string"
51+
* @OA\Schema(
52+
* type="string"
53+
* )
3854
* ),
39-
* @SWG\Property(
55+
* @OA\Property(
4056
* property="master_ver",
41-
* type="string"
57+
* @OA\Schema(
58+
* type="string"
59+
* )
4260
* ),
43-
* @SWG\Property(
61+
* @OA\Property(
4462
* property="mtime",
45-
* type="string"
63+
* @OA\Schema(
64+
* type="string"
65+
* )
4666
* ),
47-
* @SWG\Property(
67+
* @OA\Property(
4868
* property="max_marker",
49-
* type="string"
69+
* @OA\Schema(
70+
* type="string"
71+
* )
5072
* ),
51-
* @SWG\Property(
73+
* @OA\Property(
5274
* property="usage",
53-
* type="object",
54-
* ref="#/definitions/RGWBucketUsage"
75+
* @OA\Schema(
76+
* type="object"
77+
* ),
78+
* ref="#/components/schemas/RGWBucketUsage"
5579
* ),
56-
* @SWG\Property(
80+
* @OA\Property(
5781
* property="bucket_quota",
58-
* type="object",
59-
* ref="#/definitions/RGWQuotaMeta"
82+
* @OA\Schema(
83+
* type="object"
84+
* ),
85+
* ref="#/components/schemas/RGWQuotaMeta"
6086
* ),
61-
* @SWG\Property(
87+
* @OA\Property(
6288
* property="zonegroup",
63-
* type="string"
89+
* @OA\Schema(
90+
* type="string"
91+
* )
6492
* ),
65-
* @SWG\Property(
93+
* @OA\Property(
6694
* property="placement_rule",
67-
* type="string"
95+
* @OA\Schema(
96+
* type="string"
97+
* )
6898
* ),
69-
* @SWG\Property(
99+
* @OA\Property(
70100
* property="explicit_placement",
71-
* type="object",
72-
* ref="#/definitions/RGWBucketPlacement"
101+
* @OA\Schema(
102+
* type="object"
103+
* ),
104+
* ref="#/components/schemas/RGWBucketPlacement"
73105
* ),
74-
* @SWG\Property(
106+
* @OA\Property(
75107
* property="index_type",
76-
* type="string"
108+
* @OA\Schema(
109+
* type="string"
110+
* )
77111
* )
78112
* )
79113
*/

src/Models/BucketInfoCollection.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
use MyENA\RGW\AbstractModelCollection;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketInfoCollection",
10-
* type="array",
11-
* @SWG\Items(ref="#/definitions/RGWBucketInfo")
8+
* @OA\Schema(
9+
* schema="RGWBucketInfoCollection",
10+
* @OA\Schema(
11+
* type="array",
12+
* @OA\Items(ref="#/components/schemas/RGWBucketInfo")
13+
* )
1214
* )
1315
*/
1416

src/Models/BucketPlacement.php

+17-9
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,28 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketPlacement",
10-
* type="object",
11-
* @SWG\Property(
8+
* @OA\Schema(
9+
* schema="RGWBucketPlacement",
10+
* @OA\Schema(
11+
* type="object"
12+
* ),
13+
* @OA\Property(
1214
* property="data_pool",
13-
* type="integer"
15+
* @OA\Schema(
16+
* type="integer"
17+
* )
1418
* ),
15-
* @SWG\Property(
19+
* @OA\Property(
1620
* property="data_extra_pool",
17-
* type="integer"
21+
* @OA\Schema(
22+
* type="integer"
23+
* )
1824
* ),
19-
* @SWG\Property(
25+
* @OA\Property(
2026
* property="index_pool",
21-
* type="integer"
27+
* @OA\Schema(
28+
* type="integer"
29+
* )
2230
* )
2331
* )
2432
*/

src/Models/BucketPolicy.php

+15-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@
55
use MyENA\RGW\AbstractModel;
66

77
/**
8-
* @SWG\Definition(
9-
* definition="RGWBucketPolicy",
10-
* type="object",
11-
* @SWG\Property(
8+
* @OA\Schema(
9+
* schema="RGWBucketPolicy",
10+
* @OA\Schema(
11+
* type="object"
12+
* ),
13+
* @OA\Property(
1214
* property="owner",
13-
* type="object",
14-
* ref="#/definitions/RGWBucketPolicyOwner"
15+
* @OA\Schema(
16+
* type="object"
17+
* ),
18+
* ref="#/components/schemas/RGWBucketPolicyOwner"
1519
* ),
16-
* @SWG\Property(
20+
* @OA\Property(
1721
* property="acl",
18-
* type="object",
19-
* ref="#/definitions/RGWBucketPolicyACL"
22+
* @OA\Schema(
23+
* type="object"
24+
* ),
25+
* ref="#/components/schemas/RGWBucketPolicyACL"
2026
* )
2127
* )
2228
*/

0 commit comments

Comments
 (0)