openapispec

package
v0.0.0-...-d65b329 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	FilePath         string
	ProjectName      string
	APINameSpace     string
	PackageName      string
	OrganizationName string
	BasePath         string
	RouteNameSpace   string
	Requests         []*Request
	Schemas          map[string]*Schema
}

API ...

func Parse

func Parse(filePath string, namespace string, projectName string, organizationName string) (*API, error)

Parse ...

type Name

type Name struct {
	Original string
	Default  NameForm
	Singular NameForm
	Plural   NameForm
}

Name ...

type NameForm

type NameForm struct {
	Camel string
	Title string
	Snake string
	Kebab string
}

NameForm ...

type Parameter

type Parameter struct {
	Name       Name
	In         string
	ObjectName string
	Type       string
	ObjectType string
	Required   bool
}

Parameter ...

type Property

type Property struct {
	Name          string
	ObjectName    string
	Type          string
	ObjectType    string
	ArrayItemType string
	ArrayItemName string
	Description   string
	Reference     string
	Required      bool
}

Property ...

type Request

type Request struct {
	Path                      string
	PackageName               string
	RouteNameSpace            string
	PathFrameworkPresentation string
	Method                    string
	MethodCamel               string
	HandlerName               string
	HandlerFileName           string
	Description               string
	AddParamsForTest          string
	RequestSchemaName         Name
	Parameters                []*Parameter
	Responses                 []*Response
}

Request ...

type Response

type Response struct {
	StatusCode string
	Success    bool
	Schema     *Schema
}

Response ...

type Schema

type Schema struct {
	Name        string
	Description string
	ObjectName  string
	Properties  []*Property
}

Schema ...

Jump to

Keyboard shortcuts

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