File tree Expand file tree Collapse file tree 11 files changed +39
-21
lines changed Expand file tree Collapse file tree 11 files changed +39
-21
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ $bunnyHttpClient->request(
3737);
3838```
3939
40- #### [ List Shield Zone Pull Zone Mapping] ( https://docs.bunny.net/reference/get_shield-shield-zones-pullzone-mapping )
40+ #### [ List Shield Zones Pull Zone Mapping] ( https://docs.bunny.net/reference/get_shield-shield-zones-pullzone-mapping )
4141
4242``` php
4343$bunnyHttpClient->request(
44- new \ToshY\BunnyNet\Model\Api\Shield\ShieldZone\GetShieldZonesPullzoneMapping ()
44+ new \ToshY\BunnyNet\Model\Api\Shield\ShieldZone\ListShieldZonesPullzoneMapping ()
4545);
4646```
4747
@@ -513,7 +513,7 @@ $bunnyHttpClient->request(
513513);
514514```
515515
516- #### [ Get WAF Rules Segmentation] ( https://docs.bunny.net/reference/get_shield-waf-rules-plan-segmentation )
516+ #### [ Get WAF Rules Plan Segmentation] ( https://docs.bunny.net/reference/get_shield-waf-rules-plan-segmentation )
517517
518518``` php
519519$bunnyHttpClient->request(
Original file line number Diff line number Diff line change @@ -548,6 +548,10 @@ $bunnyHttpClient->request(
548548);
549549```
550550
551+ ??? warning
552+
553+ This endpoint will return a `400` status code if premium encoding is there are no captions are available (or transcribing has not been triggered).
554+
551555#### [ Get OEmbed] ( https://docs.bunny.net/reference/oembed_getoembed )
552556
553557``` php
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ private function generateModel(
232232 $ existingClassHeaders = $ this ->getExistingModelHeaders ($ endpointClass );
233233
234234 $ newSpecsPathParameters = $ this ->processParametersForPath (
235+ path: $ path ,
235236 operation: $ operation ,
236237 );
237238
@@ -908,6 +909,7 @@ private function processParametersForQuery(Operation $operation): array
908909 * @return array<mixed>
909910 */
910911 private function processParametersForPath (
912+ string $ path ,
911913 Operation $ operation ,
912914 ): array {
913915 $ parameters = [];
@@ -927,6 +929,18 @@ private function processParametersForPath(
927929 ];
928930 }
929931
932+ // Extract the path parameters from the path
933+ $ matches = [];
934+ preg_match_all ('/\{([a-zA-Z0-9_]+)\}/ ' , $ path , $ matches );
935+ /* @phpstan-ignore-next-line nullCoalesce.offset */
936+ $ pathParameters = $ matches [1 ] ?? [];
937+
938+ usort ($ parameters , function ($ a , $ b ) use ($ pathParameters ) {
939+ $ pos_a = array_search ($ a ['name ' ], $ pathParameters , true );
940+ $ pos_b = array_search ($ b ['name ' ], $ pathParameters , true );
941+ return $ pos_a <=> $ pos_b ;
942+ });
943+
930944 return $ parameters ;
931945 }
932946
Original file line number Diff line number Diff line change 3030use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \CreateShieldZone ;
3131use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZone ;
3232use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZoneByPullZoneId ;
33- use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZonesPullzoneMapping ;
33+ use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \ListShieldZonesPullzoneMapping ;
3434use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \ListShieldZones ;
3535use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \UpdateShieldZone ;
3636use ToshY \BunnyNet \Model \Api \Shield \UploadScanning \CreateOrUpdateShieldZoneUploadScanning ;
@@ -118,7 +118,7 @@ final class Shield
118118 'get ' => ListShieldZones::class,
119119 ],
120120 '/shield/shield-zones/pullzone-mapping ' => [
121- 'get ' => GetShieldZonesPullzoneMapping ::class,
121+ 'get ' => ListShieldZonesPullzoneMapping ::class,
122122 ],
123123 '/shield/shield-zone/{shieldZoneId} ' => [
124124 'get ' => GetShieldZone::class,
Original file line number Diff line number Diff line change 3131use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \CreateShieldZone ;
3232use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZone ;
3333use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZoneByPullZoneId ;
34- use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \GetShieldZonesPullzoneMapping ;
3534use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \ListShieldZones ;
35+ use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \ListShieldZonesPullzoneMapping ;
3636use ToshY \BunnyNet \Model \Api \Shield \ShieldZone \UpdateShieldZone ;
3737use ToshY \BunnyNet \Model \Api \Shield \UploadScanning \CreateOrUpdateShieldZoneUploadScanning ;
3838use ToshY \BunnyNet \Model \Api \Shield \UploadScanning \GetShieldZoneUploadScanning ;
@@ -79,7 +79,7 @@ final class Shield
7979 UpdateRateLimit::class => ModelValidationStrategy::STRICT_BODY ,
8080 CreateRateLimit::class => ModelValidationStrategy::STRICT_BODY ,
8181 ListShieldZones::class => ModelValidationStrategy::STRICT_QUERY ,
82- GetShieldZonesPullzoneMapping ::class => ModelValidationStrategy::NONE ,
82+ ListShieldZonesPullzoneMapping ::class => ModelValidationStrategy::NONE ,
8383 GetShieldZone::class => ModelValidationStrategy::NONE ,
8484 GetShieldZoneByPullZoneId::class => ModelValidationStrategy::NONE ,
8585 CreateShieldZone::class => ModelValidationStrategy::STRICT_BODY ,
Original file line number Diff line number Diff line change 2626use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \ReEncodeVideo ;
2727use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \RepackageVideo ;
2828use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \SetThumbnail ;
29- use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \TriggerSmartActions ;
3029use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \TranscribeVideo ;
30+ use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \TriggerSmartActions ;
3131use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \UpdateVideo ;
3232use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \UploadVideo ;
3333use ToshY \BunnyNet \Model \Api \Stream \ManageVideos \VideoResolutionsInfo ;
Original file line number Diff line number Diff line change 1212class DeleteShieldZoneAccessList implements ModelInterface
1313{
1414 /**
15- * @param int $id
1615 * @param int $shieldZoneId
16+ * @param int $id
1717 */
1818 public function __construct (
19- #[PathProperty]
20- public readonly int $ id ,
2119 #[PathProperty]
2220 public readonly int $ shieldZoneId ,
21+ #[PathProperty]
22+ public readonly int $ id ,
2323 ) {
2424 }
2525
Original file line number Diff line number Diff line change 1212class GetShieldZoneAccessList implements ModelInterface
1313{
1414 /**
15- * @param int $id
1615 * @param int $shieldZoneId
16+ * @param int $id
1717 */
1818 public function __construct (
19- #[PathProperty]
20- public readonly int $ id ,
2119 #[PathProperty]
2220 public readonly int $ shieldZoneId ,
21+ #[PathProperty]
22+ public readonly int $ id ,
2323 ) {
2424 }
2525
Original file line number Diff line number Diff line change 1616class UpdateShieldZoneAccessList implements ModelInterface, BodyModelInterface
1717{
1818 /**
19- * @param int $id
2019 * @param int $shieldZoneId
20+ * @param int $id
2121 * @param array<string,mixed> $body
2222 */
2323 public function __construct (
24- #[PathProperty]
25- public readonly int $ id ,
2624 #[PathProperty]
2725 public readonly int $ shieldZoneId ,
26+ #[PathProperty]
27+ public readonly int $ id ,
2828 #[BodyProperty]
2929 public readonly array $ body = [],
3030 ) {
Original file line number Diff line number Diff line change 1616class UpdateShieldZoneCuratedThreatList implements ModelInterface, BodyModelInterface
1717{
1818 /**
19- * @param int $id
2019 * @param int $shieldZoneId
20+ * @param int $id
2121 * @param array<string,mixed> $body
2222 */
2323 public function __construct (
24- #[PathProperty]
25- public readonly int $ id ,
2624 #[PathProperty]
2725 public readonly int $ shieldZoneId ,
26+ #[PathProperty]
27+ public readonly int $ id ,
2828 #[BodyProperty]
2929 public readonly array $ body = [],
3030 ) {
You can’t perform that action at this time.
0 commit comments