Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeProject ¶
func AnalyzeProject(projectPath string, debug bool) (*types.APIAnalysis, error)
AnalyzeProject performs OpenAPI-based analysis of a project
Types ¶
type Components ¶
type MediaTypeObject ¶
type MediaTypeObject struct {
Schema *Schema `json:"schema,omitempty"`
}
type OpenAPISpec ¶
type OpenAPISpec struct {
OpenAPI string `json:"openapi"`
Info map[string]interface{} `json:"info"`
Paths map[string]PathItem `json:"paths"`
Components *Components `json:"components,omitempty"`
}
OpenAPISpec represents the OpenAPI 3.x specification structure
type Operation ¶
type Operation struct {
OperationID string `json:"operationId,omitempty"`
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Parameters []Parameter `json:"parameters,omitempty"`
RequestBody *RequestBody `json:"requestBody,omitempty"`
Responses map[string]ResponseObject `json:"responses,omitempty"`
}
type RequestBody ¶
type RequestBody struct {
Description string `json:"description,omitempty"`
Required bool `json:"required"`
Content map[string]MediaTypeObject `json:"content"`
}
type ResponseObject ¶
type ResponseObject struct {
Description string `json:"description"`
Content map[string]MediaTypeObject `json:"content,omitempty"`
}
type Schema ¶
type Schema struct {
Type interface{} `json:"type,omitempty"` // Can be string or array
Properties map[string]Schema `json:"properties,omitempty"`
Items *Schema `json:"items,omitempty"`
Required []string `json:"required,omitempty"`
Description string `json:"description,omitempty"`
Example interface{} `json:"example,omitempty"`
Enum []interface{} `json:"enum,omitempty"`
AdditionalProperties interface{} `json:"additionalProperties,omitempty"`
Ref string `json:"$ref,omitempty"`
Format string `json:"format,omitempty"`
AllOf []Schema `json:"allOf,omitempty"`
OneOf []Schema `json:"oneOf,omitempty"`
AnyOf []Schema `json:"anyOf,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.