From 7b64971d7eaaa208c719c735fa1d223ed0160e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Fr=C4=85cz?= Date: Thu, 30 Jan 2025 21:01:49 +0100 Subject: [PATCH] Document mqtt-credentials endpoint --- .../Controller/Api/MqttSettingsController.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/SuplaBundle/Controller/Api/MqttSettingsController.php b/src/SuplaBundle/Controller/Api/MqttSettingsController.php index 05a7e7226..76cc0914f 100644 --- a/src/SuplaBundle/Controller/Api/MqttSettingsController.php +++ b/src/SuplaBundle/Controller/Api/MqttSettingsController.php @@ -28,6 +28,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; +use OpenApi\Annotations as OA; class MqttSettingsController extends RestController { use Transactional; @@ -43,6 +44,18 @@ public function __construct(ContainerInterface $container, ApiClientAuthorizatio } /** + * @OA\Post( + * path="/integrations/mqtt-credentials", operationId="createMqttBrokerCredentials", + * summary="Creates MQTT Broker credentials for the OAuth Client.", tags={"Integrations"}, + * @OA\Response(response="200", description="Success", @OA\JsonContent( + * @OA\Property(property="host", type="string"), + * @OA\Property(property="protocol", type="string"), + * @OA\Property(property="port", type="integer"), + * @OA\Property(property="tls", type="string"), + * @OA\Property(property="username", type="string"), + * @OA\Property(property="password", type="string"), + * )) + * ) * @Post("/integrations/mqtt-credentials") * @Security("is_granted('ROLE_MQTT_BROKER')") */