Documentation
¶
Index ¶
- type AliCookie
- type AliParameter
- type AliResponse
- type ApiComponents
- type ApiInfo
- type IntegrationTestSuite
- type OpenApiDocument
- type OpenApiOperation
- type OpenApiParameter
- type OpenApiPath
- type OpenApiResponse
- type OpenApiResponseContent
- type OpenApiResponses
- type ParameterLocation
- type RunParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliParameter ¶
type AliParameter struct {
Value any `json:"value" yaml:"value"`
}
type AliResponse ¶ added in v0.3.2
type ApiComponents ¶
type ApiComponents struct {
Schemas map[string]interface{} `json:"schemas" yaml:"schemas"`
}
type IntegrationTestSuite ¶
type IntegrationTestSuite struct {
// contains filtered or unexported fields
}
IntegrationTestSuite .... TODO, complete me
func ParseFile ¶
func ParseFile(fileName string) (IntegrationTestSuite, error)
func ParseString ¶
func ParseString(specContent string) (IntegrationTestSuite, error)
func (IntegrationTestSuite) EndpointCount ¶
func (s IntegrationTestSuite) EndpointCount() int
func (*IntegrationTestSuite) Run ¶
func (s *IntegrationTestSuite) Run(t *testing.T, parameters RunParameters)
func (IntegrationTestSuite) String ¶
func (s IntegrationTestSuite) String() string
type OpenApiDocument ¶
type OpenApiDocument struct {
Info ApiInfo `json:"info" yaml:"info"`
Paths map[string]OpenApiPath `json:"paths" yaml:"paths"`
Components ApiComponents `json:"components" yaml:"components"`
}
type OpenApiOperation ¶
type OpenApiOperation struct {
Summary string `json:"summary" yaml:"summary"`
Description string `json:"description" yaml:"description"`
OperationID string `json:"operationId" yaml:"operationId"`
Parameters []OpenApiParameter `json:"parameters" yaml:"parameters"`
Responses OpenApiResponses `json:"responses" yaml:"responses"`
}
type OpenApiParameter ¶
type OpenApiParameter struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
In ParameterLocation `json:"in" yaml:"in"`
Required bool `json:"required" yaml:"required"`
}
type OpenApiPath ¶
type OpenApiPath struct {
Summary string `json:"summary" yaml:"summary"`
Description string `json:"description" yaml:"description"`
Get *OpenApiOperation `json:"get" yaml:"get"`
Put *OpenApiOperation `json:"put" yaml:"put"`
Post *OpenApiOperation `json:"post" yaml:"post"`
Delete *OpenApiOperation `json:"delete" yaml:"delete"`
Options *OpenApiOperation `json:"options" yaml:"options"`
Head *OpenApiOperation `json:"head" yaml:"head"`
Patch *OpenApiOperation `json:"patch" yaml:"patch"`
Trace *OpenApiOperation `json:"trace" yaml:"trace"`
}
func (OpenApiPath) CountOperations ¶
func (p OpenApiPath) CountOperations() int
type OpenApiResponse ¶
type OpenApiResponse struct {
Description string `json:"description" yaml:"description"`
Json OpenApiResponseContent `json:"application/json" yaml:"application/json"`
AliParameters map[string]AliParameter `json:"x-ali-parameters" yaml:"x-ali-parameters"`
AliBody interface{} `json:"x-ali-body" yaml:"x-ali-body"`
AliResponse *AliResponse `json:"x-ali-response" yaml:"x-ali-response"`
AliRequestCookies []AliCookie `json:"x-ali-request-cookies" yaml:"x-ali-request-cookies"`
AliResponseCookies []AliCookie `json:"x-ali-response-cookies" yaml:"x-ali-response-cookies"`
}
func (OpenApiResponse) ResolveURL ¶ added in v0.3.5
func (o OpenApiResponse) ResolveURL(rawUrl string, params []OpenApiParameter) string
type OpenApiResponseContent ¶
type OpenApiResponseContent struct {
Schema interface{} `json:"schema" yaml:"schema"`
}
type OpenApiResponses ¶
type OpenApiResponses struct {
Ok *OpenApiResponse `json:"200" yaml:"200"`
Created *OpenApiResponse `json:"201" yaml:"201"`
BadRequest *OpenApiResponse `json:"400" yaml:"400"`
NotFound *OpenApiResponse `json:"404" yaml:"404"`
Expired *OpenApiResponse `json:"419" yaml:"419"`
}
type ParameterLocation ¶
type ParameterLocation int
const ( Query ParameterLocation = iota Header Path Cookie )
func (ParameterLocation) MarshalJSON ¶
func (i ParameterLocation) MarshalJSON() ([]byte, error)
func (ParameterLocation) String ¶
func (i ParameterLocation) String() string
func (*ParameterLocation) UnmarshalYAML ¶
func (i *ParameterLocation) UnmarshalYAML(data *yaml.Node) (err error)
Click to show internal directories.
Click to hide internal directories.