Skip to content

Commit

Permalink
openapi: Restructure + Fix OpenAPI validation issues.
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Conrad <[email protected]>
  • Loading branch information
philipaconrad committed Jan 22, 2025
1 parent b4581f6 commit e42fdd5
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,17 @@ paths:
description: The input document to use during partial evaluation.
responses:
"200":
$ref: "#/components/responses/CompileResponse"
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/CompileResultJSON"
application/vnd.styra.ucast+json:
schema:
$ref: "#/components/schemas/CompileResultUCAST"
application/vnd.styra.sql+json:
schema:
$ref: "#/components/schemas/CompileResultSQL"
"400":
$ref: "#/components/responses/BadRequest"
"500":
Expand Down Expand Up @@ -380,15 +390,17 @@ components:
example: "b84cf736-213c-4932-a8e4-bb5c648f1b4d"
UnhealthyServer:
type: object
required: [error]
required: [code]
properties:
code: { type: string }
errors: { type: array }
message: { type: string }
HasStatusCode:
type: object
properties:
http_status_code:
type: string
required: [http_status_oode]
required: [http_status_code]
SuccessfulPolicyResponseWithStatusCode:
allOf:
- $ref: "#/components/schemas/HasStatusCode"
Expand Down Expand Up @@ -549,36 +561,6 @@ components:
mapping:
"200": "#/components/schemas/SuccessfulPolicyResponseWithStatusCode"
"500": "#/components/schemas/ServerErrorWithStatusCode"
CompileResponse:
description: The JSON AST representation of the partially evaluated query.
content:
application/json:
type: object
properties:
result:
$ref: "#/components/schemas/CompileResultJSON"
metrics:
type: object
description: If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
additionalProperties: true
application/vnd.styra.ucast+json:
type: object
properties:
result:
$ref: "#/components/schemas/CompileResultUCAST"
metrics:
type: object
description: If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
additionalProperties: true
application/vnd.styra.sql+json:
type: object
properties:
result:
$ref: "#/components/schemas/CompileResultSQL"
metrics:
type: object
description: If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
additionalProperties: true
BadRequest:
description: Bad Request
content:
Expand Down

0 comments on commit e42fdd5

Please sign in to comment.