Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Update OpenAPI #805

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 96 additions & 78 deletions api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,50 @@
}
}
},
"/api/v1/provider-endpoints/{provider_id}": {
"/api/v1/provider-endpoints/models": {
"get": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "Get Provider Endpoint",
"description": "Get a provider endpoint by ID.",
"operationId": "v1_get_provider_endpoint",
"summary": "List All Models For All Providers",
"description": "List all models for all providers.",
"operationId": "v1_list_all_models_for_all_providers",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ModelByProvider"
},
"type": "array",
"title": "Response V1 List All Models For All Providers"
}
}
}
}
}
}
},
"/api/v1/provider-endpoints/{provider_id}/models": {
"get": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "List Models By Provider",
"description": "List models by provider.",
"operationId": "v1_list_models_by_provider",
"parameters": [
{
"name": "provider_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"type": "string",
"format": "uuid",
"title": "Provider Id"
}
}
Expand All @@ -147,7 +175,11 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderEndpoint"
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelByProvider"
},
"title": "Response V1 List Models By Provider"
}
}
}
Expand All @@ -163,36 +195,29 @@
}
}
}
},
"put": {
}
},
"/api/v1/provider-endpoints/{provider_id}": {
"get": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "Update Provider Endpoint",
"description": "Update a provider endpoint by ID.",
"operationId": "v1_update_provider_endpoint",
"summary": "Get Provider Endpoint",
"description": "Get a provider endpoint by ID.",
"operationId": "v1_get_provider_endpoint",
"parameters": [
{
"name": "provider_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"type": "string",
"format": "uuid",
"title": "Provider Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderEndpoint"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
Expand All @@ -216,31 +241,44 @@
}
}
},
"delete": {
"put": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "Delete Provider Endpoint",
"description": "Delete a provider endpoint by id.",
"operationId": "v1_delete_provider_endpoint",
"summary": "Update Provider Endpoint",
"description": "Update a provider endpoint by ID.",
"operationId": "v1_update_provider_endpoint",
"parameters": [
{
"name": "provider_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"type": "string",
"format": "uuid",
"title": "Provider Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderEndpoint"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
"schema": {
"$ref": "#/components/schemas/ProviderEndpoint"
}
}
}
},
Expand All @@ -255,25 +293,24 @@
}
}
}
}
},
"/api/v1/provider-endpoints/{provider_name}/models": {
"get": {
},
"delete": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "List Models By Provider",
"description": "List models by provider.",
"operationId": "v1_list_models_by_provider",
"summary": "Delete Provider Endpoint",
"description": "Delete a provider endpoint by id.",
"operationId": "v1_delete_provider_endpoint",
"parameters": [
{
"name": "provider_name",
"name": "provider_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Provider Name"
"format": "uuid",
"title": "Provider Id"
}
}
],
Expand All @@ -282,13 +319,7 @@
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelByProvider"
},
"title": "Response V1 List Models By Provider"
}
"schema": {}
}
}
},
Expand All @@ -305,33 +336,6 @@
}
}
},
"/api/v1/provider-endpoints/models": {
"get": {
"tags": [
"CodeGate API",
"Providers"
],
"summary": "List All Models For All Providers",
"description": "List all models for all providers.",
"operationId": "v1_list_all_models_for_all_providers",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ModelByProvider"
},
"type": "array",
"title": "Response V1 List All Models For All Providers"
}
}
}
}
}
}
},
"/api/v1/workspaces": {
"get": {
"tags": [
Expand Down Expand Up @@ -1340,15 +1344,20 @@
"type": "string",
"title": "Name"
},
"provider": {
"provider_id": {
"type": "string",
"title": "Provider"
"title": "Provider Id"
},
"provider_name": {
"type": "string",
"title": "Provider Name"
}
},
"type": "object",
"required": [
"name",
"provider"
"provider_id",
"provider_name"
],
"title": "ModelByProvider",
"description": "Represents a model supported by a provider.\n\nNote that these are auto-discovered by the provider."
Expand Down Expand Up @@ -1410,8 +1419,16 @@
"ProviderEndpoint": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id",
"default": ""
},
"name": {
"type": "string",
Expand All @@ -1435,7 +1452,6 @@
},
"type": "object",
"required": [
"id",
"name",
"provider_type",
"endpoint",
Expand All @@ -1449,7 +1465,9 @@
"enum": [
"openai",
"anthropic",
"vllm"
"vllm",
"ollama",
"lm_studio"
],
"title": "ProviderType",
"description": "Represents the different types of providers we support."
Expand Down