Skip to content

Commit

Permalink
adding version plain version of request body
Browse files Browse the repository at this point in the history
Signed-off-by: Tokesh <[email protected]>
  • Loading branch information
Tokesh committed Aug 1, 2024
1 parent 7acf0b6 commit a6e3502
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
4 changes: 3 additions & 1 deletion spec/namespaces/sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ components:
content:
application/json:
schema:
$ref: '../schemas/sql._common.yaml#/components/schemas/SqlSettings'
anyOf:
- $ref: '../schemas/sql._common.yaml#/components/schemas/SqlSettingsPlain'
- $ref: '../schemas/sql._common.yaml#/components/schemas/SqlSettings'
required: true
sql.query:
content:
Expand Down
23 changes: 21 additions & 2 deletions spec/schemas/sql._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ components:
properties:
transient:
$ref: '#/components/schemas/Transient'
SqlSettingsPlain:
type: object
properties:
transient:
$ref: '#/components/schemas/TransientPlain'
SqlSettingsResponse:
type: object
properties:
Expand Down Expand Up @@ -126,7 +131,6 @@ components:
type: string
size_limit:
type: string

Sql:
type: object
properties:
Expand All @@ -140,4 +144,19 @@ components:
type: object
properties:
keep_alive:
type: string
type: string
TransientPlain:
type: object
properties:
plugins.sql.enabled:
type: boolean
plugins.ppl.enabled:
type: boolean
plugins.sql.slowlog:
type: integer
plugins.sql.cursor.keep_alive:
type: string
plugins.query.memory_limit:
type: string
plugins.query.size_limit:
type: integer
14 changes: 14 additions & 0 deletions tests/sql/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,19 @@ chapters:
query:
memory_limit: '80%'
size_limit: '200'
response:
status: 200
- synopsis: Update SQL settings with plain request body.
path: /_plugins/_query/settings
method: PUT
request_body:
payload:
transient:
"plugins.sql.enabled" : true

Check failure on line 31 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar

Check failure on line 31 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 31 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Extra space after key 'plugins.sql.enabled'
"plugins.ppl.enabled" : true

Check failure on line 32 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar

Check failure on line 32 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 32 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Extra space after key 'plugins.ppl.enabled'
"plugins.sql.slowlog" : 2

Check failure on line 33 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar

Check failure on line 33 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 33 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Extra space after key 'plugins.sql.slowlog'
"plugins.sql.cursor.keep_alive" : "1m"

Check failure on line 34 in tests/sql/settings.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar
"plugins.query.memory_limit" : "80%"
"plugins.query.size_limit": 200
response:
status: 200

0 comments on commit a6e3502

Please sign in to comment.