deploy
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
Generated A2APack agent for a2a cloud blog API.
|
Generated A2APack agent for a2a cloud blog API.
|
||||||
|
|
||||||
- Source OpenAPI: https://blog.a2acloud.io/openapi.json
|
- Source OpenAPI: https://blog.a2acloud.io/openapi.json
|
||||||
- Generated operations: 6
|
- Generated operations: 10
|
||||||
- Main skill: `auto`
|
- Main skill: `auto`
|
||||||
- Routing mode: direct operation skills
|
- Routing mode: direct operation skills
|
||||||
|
|
||||||
|
|||||||
6
a2a.yaml
6
a2a.yaml
@@ -1,9 +1,9 @@
|
|||||||
name: blog-openapi-agent
|
name: blog-openapi-agent
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
entrypoint: agent:BlogOpenapiAgent
|
entrypoint: agent:BlogOpenapiAgent
|
||||||
description: Publishing and read API for the a2a cloud blog. Published content is
|
description: Publishing, read, comment, and reaction API for the a2a cloud blog. Published
|
||||||
public; draft, preview, create, update, and delete operations require the blog API
|
content and comments are public; publishing requires the blog API key; comment and
|
||||||
key.
|
reaction writes require an a2a Cloud browser session.
|
||||||
runtime:
|
runtime:
|
||||||
resources:
|
resources:
|
||||||
cpu: 200m
|
cpu: 200m
|
||||||
|
|||||||
373
openapi.json
373
openapi.json
@@ -15,6 +15,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
|
"A2AAuthUnavailable": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LoginErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "a2a Cloud authentication is unavailable."
|
||||||
|
},
|
||||||
|
"A2AUnauthorized": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LoginErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "An a2a Cloud browser session is required."
|
||||||
|
},
|
||||||
"AuthNotConfigured": {
|
"AuthNotConfigured": {
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
@@ -57,6 +77,61 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"BlogComment": {
|
||||||
|
"properties": {
|
||||||
|
"author_name": {
|
||||||
|
"example": "Dev User",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"body": {
|
||||||
|
"example": "This cleared up the deployment flow.",
|
||||||
|
"maxLength": 4000,
|
||||||
|
"minLength": 2,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"example": 12,
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"post_id": {
|
||||||
|
"example": 42,
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"post_id",
|
||||||
|
"author_name",
|
||||||
|
"body",
|
||||||
|
"created_at",
|
||||||
|
"updated_at"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"BlogCommentInput": {
|
||||||
|
"properties": {
|
||||||
|
"body": {
|
||||||
|
"example": "This cleared up the deployment flow.",
|
||||||
|
"maxLength": 4000,
|
||||||
|
"minLength": 2,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"body"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"BlogPost": {
|
"BlogPost": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"author": {
|
"author": {
|
||||||
@@ -201,6 +276,62 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"BlogReaction": {
|
||||||
|
"enum": [
|
||||||
|
"like",
|
||||||
|
"dislike"
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"BlogReactionInput": {
|
||||||
|
"properties": {
|
||||||
|
"reaction": {
|
||||||
|
"description": "Set to null to clear the viewer's reaction.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BlogReaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"reaction"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"BlogReactionSummary": {
|
||||||
|
"properties": {
|
||||||
|
"dislikes": {
|
||||||
|
"example": 1,
|
||||||
|
"minimum": 0,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"likes": {
|
||||||
|
"example": 10,
|
||||||
|
"minimum": 0,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"viewer_reaction": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BlogReaction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"likes",
|
||||||
|
"dislikes",
|
||||||
|
"viewer_reaction"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"BlogStatus": {
|
"BlogStatus": {
|
||||||
"enum": [
|
"enum": [
|
||||||
"draft",
|
"draft",
|
||||||
@@ -208,6 +339,31 @@
|
|||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"CommentListResponse": {
|
||||||
|
"properties": {
|
||||||
|
"comments": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/BlogComment"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"comments"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"CommentResponse": {
|
||||||
|
"properties": {
|
||||||
|
"comment": {
|
||||||
|
"$ref": "#/components/schemas/BlogComment"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"comment"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"DeleteResponse": {
|
"DeleteResponse": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"ok": {
|
"ok": {
|
||||||
@@ -259,6 +415,21 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"LoginErrorResponse": {
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"login_url": {
|
||||||
|
"format": "uri",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"error"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"PostListResponse": {
|
"PostListResponse": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"posts": {
|
"posts": {
|
||||||
@@ -283,9 +454,26 @@
|
|||||||
"post"
|
"post"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
},
|
||||||
|
"ReactionResponse": {
|
||||||
|
"properties": {
|
||||||
|
"reactions": {
|
||||||
|
"$ref": "#/components/schemas/BlogReactionSummary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"reactions"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
|
"a2aSession": {
|
||||||
|
"description": "Shared a2a Cloud browser session cookie.",
|
||||||
|
"in": "cookie",
|
||||||
|
"name": "a2a_session",
|
||||||
|
"type": "apiKey"
|
||||||
|
},
|
||||||
"apiKeyAuth": {
|
"apiKeyAuth": {
|
||||||
"description": "Use the configured `BLOG_API_KEY` value.",
|
"description": "Use the configured `BLOG_API_KEY` value.",
|
||||||
"in": "header",
|
"in": "header",
|
||||||
@@ -300,7 +488,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"description": "Publishing and read API for the a2a cloud blog. Published content is public; draft, preview, create, update, and delete operations require the blog API key.",
|
"description": "Publishing, read, comment, and reaction API for the a2a cloud blog. Published content and comments are public; publishing requires the blog API key; comment and reaction writes require an a2a Cloud browser session.",
|
||||||
"title": "a2a cloud blog API",
|
"title": "a2a cloud blog API",
|
||||||
"version": "0.1.0"
|
"version": "0.1.0"
|
||||||
},
|
},
|
||||||
@@ -601,6 +789,181 @@
|
|||||||
"Posts"
|
"Posts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/api/posts/{slug}/comments": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "listBlogPostComments",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/Slug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CommentListResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Comments returned oldest-first."
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "List comments for a post",
|
||||||
|
"tags": [
|
||||||
|
"Comments"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"description": "Requires the shared a2a Cloud browser session cookie from the web login flow.",
|
||||||
|
"operationId": "createBlogPostComment",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/Slug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/BlogCommentInput"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CommentResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "The comment was created."
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/components/responses/A2AUnauthorized"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"$ref": "#/components/responses/A2AAuthUnavailable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"a2aSession": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Create a comment",
|
||||||
|
"tags": [
|
||||||
|
"Comments"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/posts/{slug}/reaction": {
|
||||||
|
"get": {
|
||||||
|
"description": "Returns public like/dislike counts. If an a2a Cloud session cookie is present, `viewer_reaction` is populated.",
|
||||||
|
"operationId": "getBlogPostReactions",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/Slug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ReactionResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Reaction counts for the post."
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
"a2aSession": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Get post reaction counts",
|
||||||
|
"tags": [
|
||||||
|
"Reactions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"description": "Creates, updates, or clears the authenticated viewer's like/dislike reaction.",
|
||||||
|
"operationId": "setBlogPostReaction",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/Slug"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/BlogReactionInput"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ReactionResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Updated reaction counts for the post."
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/components/responses/A2AUnauthorized"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"$ref": "#/components/responses/A2AAuthUnavailable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"a2aSession": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Set the viewer reaction",
|
||||||
|
"tags": [
|
||||||
|
"Reactions"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
@@ -618,6 +981,14 @@
|
|||||||
"description": "Blog post listing, publishing, and lookup.",
|
"description": "Blog post listing, publishing, and lookup.",
|
||||||
"name": "Posts"
|
"name": "Posts"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Public comments on published posts.",
|
||||||
|
"name": "Comments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Like and dislike reactions on published posts.",
|
||||||
|
"name": "Reactions"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Service health checks.",
|
"description": "Service health checks.",
|
||||||
"name": "Health"
|
"name": "Health"
|
||||||
|
|||||||
Reference in New Issue
Block a user