diff --git a/app/Http/Controllers/Apis/Marketplace/RemoteCloudsApiController.php b/app/Http/Controllers/Apis/Marketplace/RemoteCloudsApiController.php index d55cd604d..9d4839bae 100644 --- a/app/Http/Controllers/Apis/Marketplace/RemoteCloudsApiController.php +++ b/app/Http/Controllers/Apis/Marketplace/RemoteCloudsApiController.php @@ -1,4 +1,7 @@ -value. Available fields: name, company. Operators: =@, ==, @@.', + style: 'form', + explode: true, + schema: new OA\Schema( + type: 'array', + items: new OA\Items(type: 'string', example: 'name@@managed') + ) + ), + new OA\Parameter( + name: 'order', + in: 'query', + required: false, + description: 'Order by field(s)', + schema: new OA\Schema(type: 'string', example: 'name,-id') + ), + new OA\Parameter( + name: 'expand', + in: 'query', + required: false, + description: 'Comma-separated list of related resources to include. Available relations: company, type, capabilities, guests, hypervisors, supported_regions', + schema: new OA\Schema(type: 'string', example: 'company,type') + ), + new OA\Parameter( + name: 'relations', + in: 'query', + required: false, + description: 'Relations to load eagerly', + schema: new OA\Schema(type: 'string', example: 'company,type') + ), + new OA\Parameter( + name: 'fields', + in: 'query', + required: false, + description: 'Comma-separated list of fields to return', + schema: new OA\Schema(type: 'string', example: 'id,name,company.name') + ), + ], + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: 'Success - Returns paginated list of remotely managed private clouds', + content: new OA\JsonContent(ref: '#/components/schemas/PaginatedRemoteCloudsResponse') + ), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function getAll() { return parent::getAll(); } -} \ No newline at end of file +} diff --git a/app/Swagger/MarketplaceSchemas.php b/app/Swagger/MarketplaceSchemas.php index 6f585b73d..7d85a8c20 100644 --- a/app/Swagger/MarketplaceSchemas.php +++ b/app/Swagger/MarketplaceSchemas.php @@ -138,3 +138,43 @@ class MarketplaceAppliancesResponseSchema class PaginatedAppliancesResponseSchema { } + +#[OA\Schema( + schema: 'RemoteCloudsResponse', + type: 'object', + allOf: [ + new OA\Schema(ref: '#/components/schemas/OpenStackImplementation'), + new OA\Schema( + type: 'object', + properties: [ + 'hardware_spec' => new OA\Property(property: 'hardware_spec', type: 'string', example: 'High-performance servers with SSD storage'), + 'pricing_models' => new OA\Property(property: 'pricing_models', type: 'string', example: 'Monthly subscription, Pay-as-you-use'), + 'published_sla' => new OA\Property(property: 'published_sla', type: 'string', example: '99.9% uptime guarantee'), + 'is_vendor_managed_upgrades' => new OA\Property(property: 'is_vendor_managed_upgrades', type: 'boolean', example: true), + ] + ) + ] +)] +class RemoteCloudsResponseSchema +{ +} + +#[OA\Schema( + schema: 'PaginatedRemoteCloudsResponse', + allOf: [ + new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), + new OA\Schema( + type: 'object', + properties: [ + new OA\Property( + property: 'data', + type: 'array', + items: new OA\Items(ref: '#/components/schemas/RemoteCloudService') + ) + ] + ) + ] +)] +class PaginatedRemoteCloudsResponseSchema +{ +} \ No newline at end of file diff --git a/app/Swagger/Models/MarketPlaceReviewSchema.php b/app/Swagger/Models/MarketPlaceReviewSchema.php index bc033dd4e..d59788cc2 100644 --- a/app/Swagger/Models/MarketPlaceReviewSchema.php +++ b/app/Swagger/Models/MarketPlaceReviewSchema.php @@ -19,4 +19,4 @@ ] class MarketPlaceReviewSchema { -} +} \ No newline at end of file diff --git a/app/Swagger/Models/RemoteCloudServiceSchema.php b/app/Swagger/Models/RemoteCloudServiceSchema.php new file mode 100644 index 000000000..cab712ec3 --- /dev/null +++ b/app/Swagger/Models/RemoteCloudServiceSchema.php @@ -0,0 +1,25 @@ +