analyzer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAPIConstraint

type OpenAPIConstraint struct {
	Name  string // OpenAPI property name (e.g., "minLength", "minimum", "format")
	Value any    // Constraint value (string, int, bool, []string for enum)
}

OpenAPIConstraint represents a single OpenAPI schema constraint

func MapConstraintToOpenAPI

func MapConstraintToOpenAPI(fieldType, underlyingKind string, constraints map[string]string) []OpenAPIConstraint

MapConstraintToOpenAPI converts validation constraints to OpenAPI schema properties Takes the field type and constraints map, returns OpenAPI-compatible constraints

type ProjectAnalyzer

type ProjectAnalyzer struct {
	// contains filtered or unexported fields
}

ProjectAnalyzer analyzes Go-Bricks projects to extract module and route information

func New

func New(projectRoot string) *ProjectAnalyzer

New creates a new project analyzer

func (*ProjectAnalyzer) AnalyzeProject

func (a *ProjectAnalyzer) AnalyzeProject() (*models.Project, error)

AnalyzeProject discovers modules and routes from a go-bricks project

func (*ProjectAnalyzer) Warnings

func (a *ProjectAnalyzer) Warnings(_ context.Context) []string

Warnings returns a copy of the non-fatal diagnostics collected during the last analysis. ctx is accepted per the repo's context-first convention for exported APIs; the returned slice is cloned so callers cannot mutate analyzer state.

Jump to

Keyboard shortcuts

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