feat: add typed conditional API responses
This commit is contained in:
+352
-1
@@ -2571,6 +2571,24 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"LogoutResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/LogoutStatus"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"LogoutStatus": {
|
||||
"enum": [
|
||||
"logged_out"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"MarkdownText": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -4339,6 +4357,12 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"Nullable_string": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"ObjectiveCreateRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -4990,6 +5014,20 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PasskeyLoginCompleteRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"challenge_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"credential": true
|
||||
},
|
||||
"required": [
|
||||
"challenge_id",
|
||||
"credential"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PasskeyLoginOptionsRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -5022,6 +5060,20 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PasskeyRegistrationCompleteRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"challenge_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"credential": true
|
||||
},
|
||||
"required": [
|
||||
"challenge_id",
|
||||
"credential"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PasskeyRegistrationOptionsRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -8075,6 +8127,10 @@
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"SetCookieHeader": {
|
||||
"description": "Sensitive `Set-Cookie` response header value.\n\nFormatting is available only for transport encoding; `Debug` always redacts the value.",
|
||||
"type": "string"
|
||||
},
|
||||
"SetTicketRoleAssignmentRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -13072,6 +13128,21 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"WorkspaceRuntimeConfigQuery": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"WorkspaceRuntimeConfigResponse": {
|
||||
"description": "Transparent JSON body for the Runtime-owned config bundle wire format."
|
||||
},
|
||||
"WorkspaceRuntimeDetail": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -13393,7 +13464,7 @@
|
||||
"info": {
|
||||
"title": "Yoi Server API",
|
||||
"version": "0.1.0",
|
||||
"x-yoi-source-digest": "sha256:5cce28b241bb6243d535029b5091d4a546fd90eee9a00fbf2702b450fab67a2d"
|
||||
"x-yoi-source-digest": "sha256:c76b20e52333efb49a28f9db63d711561bfdc2871e98fd3cbf00d364f2992c21"
|
||||
},
|
||||
"openapi": "3.1.0",
|
||||
"paths": {
|
||||
@@ -13670,6 +13741,116 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/auth/logout": {
|
||||
"post": {
|
||||
"operationId": "auth_logout",
|
||||
"parameters": [
|
||||
{
|
||||
"explode": false,
|
||||
"in": "header",
|
||||
"name": "cookie",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Nullable_string"
|
||||
},
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/LogoutResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful response",
|
||||
"headers": {
|
||||
"set-cookie": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SetCookieHeader"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/auth/passkeys/login/complete": {
|
||||
"post": {
|
||||
"operationId": "auth_passkey_login_complete",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PasskeyLoginCompleteRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AuthUserResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful response",
|
||||
"headers": {
|
||||
"set-cookie": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SetCookieHeader"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/auth/passkeys/login/options": {
|
||||
"post": {
|
||||
"operationId": "auth_passkey_login_options",
|
||||
@@ -13727,6 +13908,60 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/auth/passkeys/registration/complete": {
|
||||
"post": {
|
||||
"operationId": "auth_passkey_registration_complete",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PasskeyRegistrationCompleteRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AuthUserResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful response",
|
||||
"headers": {
|
||||
"set-cookie": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SetCookieHeader"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/auth/passkeys/registration/options": {
|
||||
"post": {
|
||||
"operationId": "auth_passkey_registration_options",
|
||||
@@ -20448,6 +20683,122 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/w/{workspace_id}/runtime-config": {
|
||||
"get": {
|
||||
"operationId": "workspace_runtime_config",
|
||||
"parameters": [
|
||||
{
|
||||
"explode": false,
|
||||
"in": "path",
|
||||
"name": "workspace_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
},
|
||||
"style": "simple"
|
||||
},
|
||||
{
|
||||
"explode": true,
|
||||
"in": "query",
|
||||
"name": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/WorkspaceRuntimeConfigQuery"
|
||||
},
|
||||
"style": "form"
|
||||
},
|
||||
{
|
||||
"explode": false,
|
||||
"in": "header",
|
||||
"name": "if-none-match",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Nullable_string"
|
||||
},
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/WorkspaceRuntimeConfigResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful response",
|
||||
"headers": {
|
||||
"cache-control": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
}
|
||||
},
|
||||
"etag": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"304": {
|
||||
"description": "Alternate successful response",
|
||||
"headers": {
|
||||
"cache-control": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
}
|
||||
},
|
||||
"etag": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RepositoryApiError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Error response"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/w/{workspace_id}/runtimes": {
|
||||
"get": {
|
||||
"operationId": "runtime_list",
|
||||
|
||||
Reference in New Issue
Block a user