enum OperationType
cangjie
public enum OperationType <: Equatable<OperationType> & Hashable & IOpenApiSerializable功能:表示 OpenAPI 操作类型。
父类型:
- Equatable<OperationType>
Hashable- IOpenApiSerializable
成员概览
| 成员 | 功能 |
|---|---|
| Get | 表示 GET 操作。 |
| Put | - |
| Post | - |
| Delete | - |
| Options | - |
| Head | - |
| Patch | - |
| Trace | - |
| Unkonw | - |
| func ==(OperationType) | 比较两个操作类型是否相等。 |
| func serializeAsV3(IOpenApiWriter) | 按 OpenAPI V3 格式写出当前操作类型。 |
| func hashCode() | 返回当前操作类型的哈希值。 |
| func parse(String) | 将 HTTP 方法字符串解析为操作类型。 |
| func toString() | 返回操作类型对应的名称。 |
Get
cangjie
Get功能:表示 GET 操作。
Put
cangjie
PutPost
cangjie
PostDelete
cangjie
DeleteOptions
cangjie
OptionsHead
cangjie
HeadPatch
cangjie
PatchTrace
cangjie
TraceUnkonw
cangjie
Unkonwfunc ==(OperationType)
cangjie
public operator func ==(that: OperationType): Bool功能:比较两个操作类型是否相等。
参数:
- that: OperationType - 要比较的操作类型。
返回值:
Bool- 如果两个操作类型相等则返回true。
func serializeAsV3(IOpenApiWriter)
cangjie
public func serializeAsV3(writer: IOpenApiWriter): Unit功能:按 OpenAPI V3 格式写出当前操作类型。
参数:
- writer: IOpenApiWriter - OpenAPI 写入器。
返回值:
Unit
func hashCode()
cangjie
public func hashCode(): Int64功能:返回当前操作类型的哈希值。
返回值:
Int64- 当前操作类型的哈希值。
func parse(String)
cangjie
public static func parse(str: String): OperationType功能:将 HTTP 方法字符串解析为操作类型。
参数:
- str:
String- 要解析的 HTTP 方法字符串。
返回值:
- OperationType - 解析得到的操作类型。
异常:
IllegalFormatException- 当字符串不是支持的 HTTP 方法时抛出。
func toString()
cangjie
public func toString(): String功能:返回操作类型对应的名称。
返回值:
String- 当前操作类型对应的名称字符串。