Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/httpapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *Server) NormalizeSchema(schema any) any {
}

func (s *Server) GetOpenAPI() string {
jsonBytes, err := s.api.OpenAPI().MarshalJSON()
jsonBytes, err := s.api.OpenAPI().Downgrade()
if err != nil {
return ""
}
Expand Down
72 changes: 19 additions & 53 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"running",
"stable"
],
"examples": [
"stable"
],
"example": "stable",
"title": "AgentStatus",
"type": "string"
},
Expand All @@ -17,9 +15,7 @@
"agent",
"user"
],
"examples": [
"user"
],
"example": "user",
"title": "ConversationRole",
"type": "string"
},
Expand All @@ -45,59 +41,45 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/ErrorModel.json"
],
"example": "https://example.com/schemas/ErrorModel.json",
"format": "uri",
"readOnly": true,
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"examples": [
"Property foo is required but is missing."
],
"example": "Property foo is required but is missing.",
"type": "string"
},
"errors": {
"description": "Optional list of individual error details",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
},
"type": [
"array",
"null"
]
"nullable": true,
"type": "array"
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"examples": [
"https://example.com/error-log/abc123"
],
"example": "https://example.com/error-log/abc123",
"format": "uri",
"type": "string"
},
"status": {
"description": "HTTP status code",
"examples": [
400
],
"example": 400,
"format": "int64",
"type": "integer"
},
"title": {
"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
"examples": [
"Bad Request"
],
"example": "Bad Request",
"type": "string"
},
"type": {
"default": "about:blank",
"description": "A URI reference to human-readable documentation for the error.",
"examples": [
"https://example.com/errors/example"
],
"example": "https://example.com/errors/example",
"format": "uri",
"type": "string"
}
Expand All @@ -109,9 +91,7 @@
"properties": {
"content": {
"description": "Message content. The message is formatted as it appears in the agent's terminal session, meaning that, by default, it consists of lines of text with 80 characters per line.",
"examples": [
"Hello world"
],
"example": "Hello world",
"type": "string"
},
"id": {
Expand Down Expand Up @@ -142,18 +122,14 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/MessageRequestBody.json"
],
"example": "https://example.com/schemas/MessageRequestBody.json",
"format": "uri",
"readOnly": true,
"type": "string"
},
"content": {
"description": "Message content",
"examples": [
"Hello, agent!"
],
"example": "Hello, agent!",
"type": "string"
},
"type": {
Expand All @@ -172,9 +148,7 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/MessageResponseBody.json"
],
"example": "https://example.com/schemas/MessageResponseBody.json",
"format": "uri",
"readOnly": true,
"type": "string"
Expand All @@ -194,9 +168,7 @@
"raw",
"user"
],
"examples": [
"user"
],
"example": "user",
"title": "MessageType",
"type": "string"
},
Expand Down Expand Up @@ -235,9 +207,7 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/MessagesResponseBody.json"
],
"example": "https://example.com/schemas/MessagesResponseBody.json",
"format": "uri",
"readOnly": true,
"type": "string"
Expand Down Expand Up @@ -290,9 +260,7 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/StatusResponseBody.json"
],
"example": "https://example.com/schemas/StatusResponseBody.json",
"format": "uri",
"readOnly": true,
"type": "string"
Expand All @@ -317,9 +285,7 @@
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/UploadResponseBody.json"
],
"example": "https://example.com/schemas/UploadResponseBody.json",
"format": "uri",
"readOnly": true,
"type": "string"
Expand All @@ -346,7 +312,7 @@
"title": "AgentAPI",
"version": "0.10.0"
},
"openapi": "3.1.0",
"openapi": "3.0.3",
"paths": {
"/events": {
"get": {
Expand Down