From 74432de40d9db0287a43230dc7302bd96b28e565 Mon Sep 17 00:00:00 2001 From: Pratik Joseph Dabre Date: Mon, 14 Oct 2024 16:42:22 -0700 Subject: [PATCH] Add OpenAPI documentation for /v1/properties/session --- .../src/main/resources/schemas.yaml | 20 ++++++++++++++++++- .../main/resources/session_properties.yaml | 20 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 presto-openapi/src/main/resources/session_properties.yaml diff --git a/presto-openapi/src/main/resources/schemas.yaml b/presto-openapi/src/main/resources/schemas.yaml index 50e6423494f5..b9f3c312bc4f 100644 --- a/presto-openapi/src/main/resources/schemas.yaml +++ b/presto-openapi/src/main/resources/schemas.yaml @@ -999,7 +999,25 @@ components: QueryInfo: type: object # TODO generate all the classes for this object - + SessionPropertyMetadata: + type: object + required: + - name + - description + - typeSignature + - defaultValue + - hidden + properties: + name: + type: string + description: + type: string + typeSignature: + $ref: '#/components/schemas/TypeSignature' + defaultValue: + type: string + hidden: + type: boolean diff --git a/presto-openapi/src/main/resources/session_properties.yaml b/presto-openapi/src/main/resources/session_properties.yaml new file mode 100644 index 000000000000..fc6621633869 --- /dev/null +++ b/presto-openapi/src/main/resources/session_properties.yaml @@ -0,0 +1,20 @@ +openapi: 3.0.0 +info: + title: Presto session properties API + description: API for retrieving session properties in Presto. + version: "1" +servers: + - url: http://localhost:8080 + description: Presto endpoint when running locally +paths: + /v1/properties/session: + get: + summary: Returns the list of session properties. + description: This endpoint retrieves the supported session properties list from a Prestissimo cluster. + responses: + '200': + description: List of session properties. + content: + application/json: + schema: + $ref: './schemas.yaml/#/components/schemas/SessionPropertyMetadata'