Skip to content

class OpenApiOperation

cangjie
public class OpenApiOperation <: IOpenApiSerializable

功能:表示 OpenAPI 操作对象。

父类型:

成员概览

成员功能
init()创建 OpenAPI 操作对象。
var summary表示操作摘要。
var description表示操作描述。
var operationId表示操作标识。
var response表示操作响应集合。
var tags表示操作标签集合。
var servers表示操作服务器集合。
var requestBody表示操作请求体。
var parameters表示操作参数集合。
var security表示操作安全需求集合。
func serializeAsV3(IOpenApiWriter)按 OpenAPI V3 格式写出当前操作对象。

init()

cangjie
public init()

功能:创建 OpenAPI 操作对象。

var summary

cangjie
public var summary: ?String = None

功能:表示操作摘要。

类型:?String

var description

cangjie
public var description: ?String = None

功能:表示操作描述。

类型:?String

var operationId

cangjie
public var operationId: ?String = None

功能:表示操作标识。

类型:?String

var response

cangjie
public var response = OpenApiResponses()

功能:表示操作响应集合。

var tags

cangjie
public var tags = ArrayList<OpenApiTag>()

功能:表示操作标签集合。

var servers

cangjie
public var servers = ArrayList<OpenApiServer>()

功能:表示操作服务器集合。

var requestBody

cangjie
public var requestBody:? OpenApiRequestBody = None

功能:表示操作请求体。

类型:? OpenApiRequestBody

var parameters

cangjie
public var parameters = ArrayList<OpenApiParameter>()

功能:表示操作参数集合。

var security

cangjie
public var security = ArrayList<OpenApiSecurityRequirement>()

功能:表示操作安全需求集合。

func serializeAsV3(IOpenApiWriter)

cangjie
public func serializeAsV3(writer: IOpenApiWriter): Unit

功能:按 OpenAPI V3 格式写出当前操作对象。

参数:

返回值:

  • Unit