1- <?php namespace App \Http \Controllers ;
1+ <?php
2+
3+ namespace App \Http \Controllers ;
4+
25/**
36 * Copyright 2017 OpenStack Foundation
47 * Licensed under the Apache License, Version 2.0 (the "License");
1215 * limitations under the License.
1316 **/
1417use App \Models \Foundation \Marketplace \IConsultantRepository ;
18+ use Illuminate \Http \Response ;
1519use models \oauth2 \IResourceServerContext ;
20+ use OpenApi \Attributes as OA ;
1621
1722/**
1823 * Class ConsultantsApiController
@@ -30,8 +35,66 @@ public function __construct(IConsultantRepository $repository, IResourceServerCo
3035 parent ::__construct ($ repository , $ resource_server_context );
3136 }
3237
38+ #[OA \Get(
39+ path: "/api/public/v1/marketplace/consultants " ,
40+ description: "Get all marketplace consultants and consulting services " ,
41+ summary: 'Get all consultants ' ,
42+ operationId: 'getAllConsultants ' ,
43+ tags: ['Consultants ' ],
44+ parameters: [
45+ new OA \Parameter (
46+ name: 'filter[] ' ,
47+ in: 'query ' ,
48+ required: false ,
49+ description: 'Filter expressions in the format field<op>value. Available fields: name, company. Operators: =@, ==, @@. ' ,
50+ style: 'form ' ,
51+ explode: true ,
52+ schema: new OA \Schema (
53+ type: 'array ' ,
54+ items: new OA \Items (type: 'string ' , example: 'name@@consulting ' )
55+ )
56+ ),
57+ new OA \Parameter (
58+ name: 'order ' ,
59+ in: 'query ' ,
60+ required: false ,
61+ description: 'Order by field(s) ' ,
62+ schema: new OA \Schema (type: 'string ' , example: 'name,-id ' )
63+ ),
64+ new OA \Parameter (
65+ name: 'expand ' ,
66+ in: 'query ' ,
67+ required: false ,
68+ description: 'Comma-separated list of related resources to include. Available relations: company, type, offices, clients, spoken_languages, configuration_management_expertise, expertise_areas, services_offered, supported_regions ' ,
69+ schema: new OA \Schema (type: 'string ' , example: 'company,offices ' )
70+ ),
71+ new OA \Parameter (
72+ name: 'relations ' ,
73+ in: 'query ' ,
74+ required: false ,
75+ description: 'Relations to load eagerly ' ,
76+ schema: new OA \Schema (type: 'string ' , example: 'company,offices ' )
77+ ),
78+ new OA \Parameter (
79+ name: 'fields ' ,
80+ in: 'query ' ,
81+ required: false ,
82+ description: 'Comma-separated list of fields to return ' ,
83+ schema: new OA \Schema (type: 'string ' , example: 'id,name,company.name ' )
84+ ),
85+ ],
86+ responses: [
87+ new OA \Response (
88+ response: 200 ,
89+ description: 'Success - Returns paginated list of consultants ' ,
90+ content: new OA \JsonContent (ref: '#/components/schemas/PaginatedConsultantsResponse ' )
91+ ),
92+ new OA \Response (response: Response::HTTP_PRECONDITION_FAILED , description: "Validation Error " ),
93+ new OA \Response (response: Response::HTTP_INTERNAL_SERVER_ERROR , description: "Server Error " )
94+ ]
95+ )]
3396 public function getAll ()
3497 {
3598 return parent ::getAll ();
3699 }
37- }
100+ }
0 commit comments