openapi

package
v0.0.0-...-94d0466 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryParamIncludeStats = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamIncludeStats,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("Indicates whether optional stats should be included in the response."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type:    ptrSchemaType(openapi3.SchemaTypeBoolean),
				Default: ptrptr(false),
			},
		},
	},
}
View Source
var QueryParameterAssignable = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamAssignable,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The result should contain all labels assignable to the pullreq."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type:    ptrSchemaType(openapi3.SchemaTypeBoolean),
				Default: ptrptr(false),
			},
		},
	},
}
View Source
var QueryParameterInherited = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamInherited,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The result should inherit labels from parent parent spaces."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type:    ptrSchemaType(openapi3.SchemaTypeBoolean),
				Default: ptrptr(false),
			},
		},
	},
}
View Source
var QueryParameterLabelID = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamLabelID,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("List of label ids used to filter pull requests."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type: ptrSchemaType(openapi3.SchemaTypeArray),
				Items: &openapi3.SchemaOrRef{
					Schema: &openapi3.Schema{
						Type: ptrSchemaType(openapi3.SchemaTypeInteger),
					},
				},
			},
		},

		Style:   ptr.String(string(openapi3.EncodingStyleForm)),
		Explode: ptr.Bool(true),
	},
}
View Source
var QueryParameterLimit = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamLimit,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The maximum number of results to return."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type:    ptrSchemaType(openapi3.SchemaTypeInteger),
				Default: ptrptr(request.PerPageDefault),
				Minimum: ptr.Float64(1.0),
				Maximum: ptr.Float64(request.PerPageMax),
			},
		},
	},
}
View Source
var QueryParameterPage = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamPage,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The page to return."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type:    ptrSchemaType(openapi3.SchemaTypeInteger),
				Default: ptrptr(1),
				Minimum: ptr.Float64(1),
			},
		},
	},
}
View Source
var QueryParameterPrincipalTypes = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamType,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The types of principals to include."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type: ptrSchemaType(openapi3.SchemaTypeArray),
				Items: &openapi3.SchemaOrRef{
					Schema: &openapi3.Schema{
						Type: ptrSchemaType(openapi3.SchemaTypeString),
						Enum: enum.PrincipalType("").Enum(),
					},
				},
			},
		},
	},
}
View Source
var QueryParameterQueryLabel = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamQuery,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The substring which is used to filter the labels by their key."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type: ptrSchemaType(openapi3.SchemaTypeString),
			},
		},
	},
}
View Source
var QueryParameterQueryPrincipals = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamQuery,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("The substring by which the principals are filtered."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type: ptrSchemaType(openapi3.SchemaTypeString),
			},
		},
	},
}
View Source
var QueryParameterValueID = openapi3.ParameterOrRef{
	Parameter: &openapi3.Parameter{
		Name:        request.QueryParamValueID,
		In:          openapi3.ParameterInQuery,
		Description: ptr.String("List of label value ids used to filter pull requests."),
		Required:    ptr.Bool(false),
		Schema: &openapi3.SchemaOrRef{
			Schema: &openapi3.Schema{
				Type: ptrSchemaType(openapi3.SchemaTypeArray),
				Items: &openapi3.SchemaOrRef{
					Schema: &openapi3.Schema{
						Type: ptrSchemaType(openapi3.SchemaTypeInteger),
					},
				},
			},
		},

		Style:   ptr.String(string(openapi3.EncodingStyleForm)),
		Explode: ptr.Bool(true),
	},
}

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type DownloadRequest

type DownloadRequest struct {
	FilePathRef string `path:"file_ref"`
	// contains filtered or unexported fields
}

type GetCommitRequest

type GetCommitRequest struct {
	CommitSHA string `path:"commit_sha"`
	// contains filtered or unexported fields
}

type LabelRequest

type LabelRequest struct {
	Key         string          `json:"key"`
	Description string          `json:"description"`
	Type        enum.LabelType  `json:"type"`
	Color       enum.LabelColor `json:"color"`
}

type LabelValueRequest

type LabelValueRequest struct {
	Value string          `json:"value"`
	Color enum.LabelColor `json:"color"`
}

type OpenAPI

type OpenAPI struct{}

func NewOpenAPIService

func NewOpenAPIService() *OpenAPI

func (*OpenAPI) Generate

func (*OpenAPI) Generate() *openapi3.Spec

Generate is a helper function that constructs the openapi specification object, which can be marshaled to json or yaml, as needed.

type Service

type Service interface {
	Generate() *openapi3.Spec
}

func ProvideOpenAPIService

func ProvideOpenAPIService() Service

type UploadRequest

type UploadRequest struct {

	// Note: Below line won't produce the file upload interface in Swagger UI,
	// ref: https://swagger.io/docs/specification/2-0/file-upload/
	Content string `json:"-" format:"binary" description:"Binary file to upload"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL