Files
2026-07-19 01:16:28 +08:00

1155 lines
32 KiB
JSON

{
"openapi" : "3.0.1",
"info" : {
"title" : "Halo",
"version" : "2.17.0"
},
"servers" : [ {
"url" : "http://localhost:65084",
"description" : "Generated server url"
} ],
"security" : [ {
"basicAuth" : [ ],
"bearerAuth" : [ ]
} ],
"paths" : {
"/apis/console.api.moment.halo.run/v1alpha1/moments" : {
"get" : {
"description" : "List moments.",
"operationId" : "ListMoments",
"parameters" : [ {
"description" : "Page number. Default is 0.",
"in" : "query",
"name" : "page",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Size number. Default is 0.",
"in" : "query",
"name" : "size",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Label selector. e.g.: hidden!=true",
"in" : "query",
"name" : "labelSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Field selector. e.g.: metadata.name==halo",
"in" : "query",
"name" : "fieldSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in" : "query",
"name" : "sort",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Moments filtered by keyword.",
"in" : "query",
"name" : "keyword",
"schema" : {
"type" : "string"
}
}, {
"description" : "Owner name.",
"in" : "query",
"name" : "ownerName",
"schema" : {
"type" : "string"
}
}, {
"description" : "Moment tag.",
"in" : "query",
"name" : "tag",
"schema" : {
"type" : "string"
}
}, {
"description" : "Moment visible.",
"in" : "query",
"name" : "visible",
"schema" : {
"type" : "string",
"enum" : [ "PUBLIC", "PRIVATE" ]
}
}, {
"description" : "Moment start date.",
"in" : "query",
"name" : "startDate",
"schema" : {
"type" : "string",
"format" : "date-time"
}
}, {
"description" : "Moment end date.",
"in" : "query",
"name" : "endDate",
"schema" : {
"type" : "string",
"format" : "date-time"
}
}, {
"description" : "Moment approved.",
"in" : "query",
"name" : "approved",
"schema" : {
"type" : "boolean"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/ListedMomentList"
}
}
},
"description" : "default response"
}
},
"tags" : [ "console.api.moment.halo.run/v1alpha1/Moment" ]
},
"post" : {
"description" : "Create a Moment.",
"operationId" : "CreateMoment",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"required" : true
},
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "console.api.moment.halo.run/v1alpha1/Moment" ]
}
},
"/apis/console.api.moment.halo.run/v1alpha1/moments/{name}" : {
"get" : {
"description" : "Get a moment by name.",
"operationId" : "GetMoment",
"parameters" : [ {
"description" : "Moment name",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/ListedMoment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "console.api.moment.halo.run/v1alpha1/Moment" ]
}
},
"/apis/console.api.moment.halo.run/v1alpha1/tags" : {
"get" : {
"description" : "List all moment tags.",
"operationId" : "ListTags",
"parameters" : [ {
"description" : "Tag name to query",
"in" : "query",
"name" : "name",
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
},
"description" : "default response"
}
},
"tags" : [ "console.api.moment.halo.run/v1alpha1/Moment" ]
}
},
"/apis/moment.halo.run/v1alpha1/moments" : {
"get" : {
"description" : "List Moment",
"operationId" : "listMoment",
"parameters" : [ {
"description" : "Page number. Default is 0.",
"in" : "query",
"name" : "page",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Size number. Default is 0.",
"in" : "query",
"name" : "size",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Label selector. e.g.: hidden!=true",
"in" : "query",
"name" : "labelSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Field selector. e.g.: metadata.name==halo",
"in" : "query",
"name" : "fieldSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in" : "query",
"name" : "sort",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
} ],
"responses" : {
"200" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/MomentList"
}
}
},
"description" : "Response moments"
}
},
"tags" : [ "MomentV1alpha1" ]
},
"post" : {
"description" : "Create Moment",
"operationId" : "createMoment",
"requestBody" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Fresh moment"
},
"responses" : {
"200" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Response moments created just now"
}
},
"tags" : [ "MomentV1alpha1" ]
}
},
"/apis/moment.halo.run/v1alpha1/moments/{name}" : {
"delete" : {
"description" : "Delete Moment",
"operationId" : "deleteMoment",
"parameters" : [ {
"description" : "Name of moment",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "Response moment deleted just now"
}
},
"tags" : [ "MomentV1alpha1" ]
},
"get" : {
"description" : "Get Moment",
"operationId" : "getMoment",
"parameters" : [ {
"description" : "Name of moment",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Response single moment"
}
},
"tags" : [ "MomentV1alpha1" ]
},
"patch" : {
"description" : "Patch Moment",
"operationId" : "patchMoment",
"parameters" : [ {
"description" : "Name of moment",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"content" : {
"application/json-patch+json" : {
"schema" : {
"$ref" : "#/components/schemas/JsonPatch"
}
}
}
},
"responses" : {
"200" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Response moment patched just now"
}
},
"tags" : [ "MomentV1alpha1" ]
},
"put" : {
"description" : "Update Moment",
"operationId" : "updateMoment",
"parameters" : [ {
"description" : "Name of moment",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Updated moment"
},
"responses" : {
"200" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "Response moments updated just now"
}
},
"tags" : [ "MomentV1alpha1" ]
}
},
"/apis/uc.api.moment.halo.run/v1alpha1/moments" : {
"get" : {
"description" : "List My moments.",
"operationId" : "ListMyMoments",
"parameters" : [ {
"description" : "Page number. Default is 0.",
"in" : "query",
"name" : "page",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Size number. Default is 0.",
"in" : "query",
"name" : "size",
"schema" : {
"type" : "integer",
"format" : "int32"
}
}, {
"description" : "Label selector. e.g.: hidden!=true",
"in" : "query",
"name" : "labelSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Field selector. e.g.: metadata.name==halo",
"in" : "query",
"name" : "fieldSelector",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in" : "query",
"name" : "sort",
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}, {
"description" : "Moments filtered by keyword.",
"in" : "query",
"name" : "keyword",
"schema" : {
"type" : "string"
}
}, {
"description" : "Owner name.",
"in" : "query",
"name" : "ownerName",
"schema" : {
"type" : "string"
}
}, {
"description" : "Moment tag.",
"in" : "query",
"name" : "tag",
"schema" : {
"type" : "string"
}
}, {
"description" : "Moment visible.",
"in" : "query",
"name" : "visible",
"schema" : {
"type" : "string",
"enum" : [ "PUBLIC", "PRIVATE" ]
}
}, {
"description" : "Moment start date.",
"in" : "query",
"name" : "startDate",
"schema" : {
"type" : "string",
"format" : "date-time"
}
}, {
"description" : "Moment end date.",
"in" : "query",
"name" : "endDate",
"schema" : {
"type" : "string",
"format" : "date-time"
}
}, {
"description" : "Moment approved.",
"in" : "query",
"name" : "approved",
"schema" : {
"type" : "boolean"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/ListedMomentList"
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
},
"post" : {
"description" : "Create a My Moment.",
"operationId" : "CreateMyMoment",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"required" : true
},
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
}
},
"/apis/uc.api.moment.halo.run/v1alpha1/moments/{name}" : {
"delete" : {
"description" : "Delete a My Moment.",
"operationId" : "DeleteMyMoment",
"parameters" : [ {
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
},
"get" : {
"description" : "Get a My Moment.",
"operationId" : "GetMyMoment",
"parameters" : [ {
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
},
"put" : {
"description" : "Update a My Moment.",
"operationId" : "UpdateMyMoment",
"parameters" : [ {
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"required" : true
},
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/Moment"
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
}
},
"/apis/uc.api.moment.halo.run/v1alpha1/tags" : {
"get" : {
"description" : "List all moment tags.",
"operationId" : "ListTags_1",
"parameters" : [ {
"description" : "Tag name to query",
"in" : "query",
"name" : "name",
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"default" : {
"content" : {
"*/*" : {
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
},
"description" : "default response"
}
},
"tags" : [ "uc.api.moment.halo.run/v1alpha1/moment" ]
}
}
},
"components" : {
"schemas" : {
"AddOperation" : {
"required" : [ "op", "path", "value" ],
"type" : "object",
"properties" : {
"op" : {
"type" : "string",
"enum" : [ "add" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
},
"value" : {
"description" : "Value can be any JSON value"
}
}
},
"Contributor" : {
"type" : "object",
"properties" : {
"avatar" : {
"type" : "string"
},
"displayName" : {
"type" : "string"
},
"name" : {
"type" : "string"
}
}
},
"CopyOperation" : {
"required" : [ "op", "from", "path" ],
"type" : "object",
"properties" : {
"from" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
},
"op" : {
"type" : "string",
"enum" : [ "copy" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
}
}
},
"JsonPatch" : {
"minItems" : 1,
"uniqueItems" : true,
"type" : "array",
"description" : "JSON schema for JSONPatch operations",
"items" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/AddOperation"
}, {
"$ref" : "#/components/schemas/ReplaceOperation"
}, {
"$ref" : "#/components/schemas/TestOperation"
}, {
"$ref" : "#/components/schemas/RemoveOperation"
}, {
"$ref" : "#/components/schemas/MoveOperation"
}, {
"$ref" : "#/components/schemas/CopyOperation"
} ]
}
},
"ListedMoment" : {
"required" : [ "moment", "owner", "stats" ],
"type" : "object",
"properties" : {
"moment" : {
"$ref" : "#/components/schemas/Moment"
},
"owner" : {
"$ref" : "#/components/schemas/Contributor"
},
"stats" : {
"$ref" : "#/components/schemas/Stats"
}
},
"description" : "A chunk of items."
},
"ListedMomentList" : {
"required" : [ "first", "hasNext", "hasPrevious", "items", "last", "page", "size", "total", "totalPages" ],
"type" : "object",
"properties" : {
"first" : {
"type" : "boolean",
"description" : "Indicates whether current page is the first page."
},
"hasNext" : {
"type" : "boolean",
"description" : "Indicates whether current page has previous page."
},
"hasPrevious" : {
"type" : "boolean",
"description" : "Indicates whether current page has previous page."
},
"items" : {
"type" : "array",
"description" : "A chunk of items.",
"items" : {
"$ref" : "#/components/schemas/ListedMoment"
}
},
"last" : {
"type" : "boolean",
"description" : "Indicates whether current page is the last page."
},
"page" : {
"type" : "integer",
"description" : "Page number, starts from 1. If not set or equal to 0, it means no pagination.",
"format" : "int32"
},
"size" : {
"type" : "integer",
"description" : "Size of each page. If not set or equal to 0, it means no pagination.",
"format" : "int32"
},
"total" : {
"type" : "integer",
"description" : "Total elements.",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"description" : "Indicates total pages.",
"format" : "int64"
}
}
},
"Metadata" : {
"required" : [ "name" ],
"type" : "object",
"properties" : {
"annotations" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"creationTimestamp" : {
"type" : "string",
"format" : "date-time",
"nullable" : true
},
"deletionTimestamp" : {
"type" : "string",
"format" : "date-time",
"nullable" : true
},
"finalizers" : {
"uniqueItems" : true,
"type" : "array",
"nullable" : true,
"items" : {
"type" : "string",
"nullable" : true
}
},
"generateName" : {
"type" : "string",
"description" : "The name field will be generated automatically according to the given generateName field"
},
"labels" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"name" : {
"type" : "string",
"description" : "Metadata name"
},
"version" : {
"type" : "integer",
"format" : "int64",
"nullable" : true
}
}
},
"Moment" : {
"required" : [ "apiVersion", "kind", "metadata", "spec" ],
"type" : "object",
"properties" : {
"apiVersion" : {
"type" : "string"
},
"kind" : {
"type" : "string"
},
"metadata" : {
"$ref" : "#/components/schemas/Metadata"
},
"spec" : {
"$ref" : "#/components/schemas/MomentSpec"
},
"status" : {
"$ref" : "#/components/schemas/MomentStatus"
}
}
},
"MomentContent" : {
"type" : "object",
"properties" : {
"html" : {
"type" : "string",
"description" : "Rendered result with HTML format"
},
"medium" : {
"uniqueItems" : true,
"type" : "array",
"description" : "Medium of moment",
"items" : {
"$ref" : "#/components/schemas/MomentMedia"
}
},
"raw" : {
"type" : "string",
"description" : "Raw of content"
}
}
},
"MomentList" : {
"required" : [ "first", "hasNext", "hasPrevious", "items", "last", "page", "size", "total", "totalPages" ],
"type" : "object",
"properties" : {
"first" : {
"type" : "boolean",
"description" : "Indicates whether current page is the first page."
},
"hasNext" : {
"type" : "boolean",
"description" : "Indicates whether current page has previous page."
},
"hasPrevious" : {
"type" : "boolean",
"description" : "Indicates whether current page has previous page."
},
"items" : {
"type" : "array",
"description" : "A chunk of items.",
"items" : {
"$ref" : "#/components/schemas/Moment"
}
},
"last" : {
"type" : "boolean",
"description" : "Indicates whether current page is the last page."
},
"page" : {
"type" : "integer",
"description" : "Page number, starts from 1. If not set or equal to 0, it means no pagination.",
"format" : "int32"
},
"size" : {
"type" : "integer",
"description" : "Size of each page. If not set or equal to 0, it means no pagination.",
"format" : "int32"
},
"total" : {
"type" : "integer",
"description" : "Total elements.",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"description" : "Indicates total pages.",
"format" : "int64"
}
}
},
"MomentMedia" : {
"type" : "object",
"properties" : {
"originType" : {
"type" : "string",
"description" : "Origin type of media."
},
"type" : {
"type" : "string",
"description" : "Type of media",
"enum" : [ "PHOTO", "VIDEO", "POST", "AUDIO" ]
},
"url" : {
"type" : "string",
"description" : "External URL of media"
}
},
"description" : "Media item of moment"
},
"MomentSpec" : {
"required" : [ "content", "owner" ],
"type" : "object",
"properties" : {
"approved" : {
"type" : "boolean",
"default" : false
},
"approvedTime" : {
"type" : "string",
"format" : "date-time"
},
"content" : {
"$ref" : "#/components/schemas/MomentContent"
},
"owner" : {
"type" : "string",
"description" : "Owner of the moment"
},
"releaseTime" : {
"type" : "string",
"description" : "Release timestamp. This field can be customized by owner",
"format" : "date-time"
},
"tags" : {
"uniqueItems" : true,
"type" : "array",
"description" : "Tags of the moment",
"items" : {
"type" : "string",
"description" : "Tags of the moment"
}
},
"visible" : {
"type" : "string",
"description" : "Visible indicates when to show publicly. Default is public",
"default" : "PUBLIC",
"enum" : [ "PUBLIC", "PRIVATE" ]
}
}
},
"MomentStatus" : {
"type" : "object",
"properties" : {
"observedVersion" : {
"type" : "integer",
"format" : "int64"
},
"permalink" : {
"type" : "string"
}
}
},
"MoveOperation" : {
"required" : [ "op", "from", "path" ],
"type" : "object",
"properties" : {
"from" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
},
"op" : {
"type" : "string",
"enum" : [ "move" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
}
}
},
"RemoveOperation" : {
"required" : [ "op", "path" ],
"type" : "object",
"properties" : {
"op" : {
"type" : "string",
"enum" : [ "remove" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
}
}
},
"ReplaceOperation" : {
"required" : [ "op", "path", "value" ],
"type" : "object",
"properties" : {
"op" : {
"type" : "string",
"enum" : [ "replace" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
},
"value" : {
"description" : "Value can be any JSON value"
}
}
},
"Stats" : {
"type" : "object",
"properties" : {
"approvedComment" : {
"type" : "integer",
"format" : "int32"
},
"totalComment" : {
"type" : "integer",
"format" : "int32"
},
"upvote" : {
"type" : "integer",
"format" : "int32"
}
}
},
"TestOperation" : {
"required" : [ "op", "path", "value" ],
"type" : "object",
"properties" : {
"op" : {
"type" : "string",
"enum" : [ "test" ]
},
"path" : {
"pattern" : "^(/[^/~]*(~[01][^/~]*)*)*$",
"type" : "string",
"description" : "A JSON Pointer path pointing to the location to move/copy from.",
"example" : "/a/b/c"
},
"value" : {
"description" : "Value can be any JSON value"
}
}
}
},
"securitySchemes" : {
"basicAuth" : {
"scheme" : "basic",
"type" : "http"
},
"bearerAuth" : {
"bearerFormat" : "JWT",
"scheme" : "bearer",
"type" : "http"
}
}
}
}