consts/swagger.go

61 lines
2.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package consts ...
//
// Description : consts ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-04-25 16:03
package consts
const (
SwaggerDataTypeInteger = "integer" // 32 位有符号
SwaggerDataTypeLong = "long" // 64 位有符号
SwaggerDataTypeFloat = "number"
SwaggerDataTypeDouble = "number"
SwaggerDataTypeNumber = "number"
SwaggerDataTypeByte = "string"
SwaggerDataTypeBinary = "binary" // 任意 8 进制序列
SwaggerDataTypeString = "string"
SwaggerDataTypeDate = "string"
SwaggerDataTypePassword = "password"
SwaggerDataTypeBoolean = "boolean"
SwaggerDataTypeArray = "array"
SwaggerDataTypeObject = "object"
)
const (
SwaggerDocVersion1 = "1.0"
SwaggerDocVersion2 = "2.0"
SwaggerDocVersion3 = "3.0"
)
const (
SwaggerRefKey = "$ref"
SwaggerRefValPrefix = "#/definitions/"
)
const (
SwaggerTypeKey = "type"
)
const (
SwaggerBaseObjectDefinitionName = "object_map"
)
const (
SwaggerParameterInQuery = "query" // 参数位置 : query
SwaggerParameterInHeader = "header" // 参数位置 : header
SwaggerParameterInPath = "path" // 参数位置 : path
SwaggerParameterInCookie = "cookie" // 参数位置 : cookie
)
const (
SwaggerParameterStyleForm = "form" // in = query / cookie , type = primitive, array, object
SwaggerParameterStyleSimple = "simple" // in = path / header , type = array , Simple 样式的参数,参见 RFC6570. 此选项替换定义于OpenAPI 2.0 中 collectionFormat等于csv的情况。
SwaggerParameterStyleMatrix = "matrix" // in = path type = primitive, array, object
SwaggerParameterStyleLabel = "label" // in = path , type = primitive, array, object
SwaggerParameterStyleSpaceDelimited = "spaceDelimited" // in = query , type = array, 空格分隔的数组值。此选项替换定义于OpenAPI 2.0 中 collectionFormat equal to ssv的情况。
SwaggerParameterStylePipeDelimited = "pipeDelimited" // in = query , type = array, 管道符`
SwaggerParameterStyleDeepObject = "deepObject" // in = query , type = object, 提供一种简单的方法来表示参数中的嵌套对象值.`
)