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'