From 2e6c4e574bbe89d050417e2cf2bdbcef08f3e3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Fri, 23 Jun 2023 19:48:50 +0200 Subject: [PATCH] :sparkles: add openapi get request --- mindee/endpoints.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mindee/endpoints.py b/mindee/endpoints.py index e782d6b0..758d7498 100644 --- a/mindee/endpoints.py +++ b/mindee/endpoints.py @@ -191,6 +191,15 @@ def document_queue_req_get(self, queue_id: str) -> requests.Response: ) return response + def openapi_get_req(self): + """Get the OpenAPI specification of the product.""" + response = requests.get( + f"{self._url_root}/openapi.json", + headers=self.base_headers, + timeout=self._request_timeout, + ) + return response + class CustomEndpoint(Endpoint): """Endpoint for all custom documents."""