Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseWithUnresolved ¶
func ParseWithUnresolved(sourceDir string, depResolver collector.DependencyResolver, unresolved *collector.UnresolvedSet) ([]collector.ApiEndpoint, error)
ParseWithUnresolved is Parse plus an optional dependency resolver that expands types declared by pip dependencies, and an optional sink that records type names the resolver could not expand. Both may be nil.
Types ¶
type FlaskTypeResolver ¶
type FlaskTypeResolver struct {
// contains filtered or unexported fields
}
func NewFlaskTypeResolver ¶
func NewFlaskTypeResolver(pydanticModels map[string]fastapi.PydanticModel, marshmallowSchemas map[string]MarshmallowModel) *FlaskTypeResolver
func (*FlaskTypeResolver) Resolve ¶
func (r *FlaskTypeResolver) Resolve(typeText string) *model.ObjectModel
func (*FlaskTypeResolver) SetDependencyResolver ¶
func (r *FlaskTypeResolver) SetDependencyResolver(dr collector.DependencyResolver)
SetDependencyResolver attaches an optional resolver that expands type names found in pip dependency packages. It is forwarded to the wrapped FastAPI resolver, which resolves the Pydantic half of the type space.
func (*FlaskTypeResolver) SetUnresolved ¶
func (r *FlaskTypeResolver) SetUnresolved(u *collector.UnresolvedSet)
SetUnresolved attaches a shared sink that records type names this resolver could not expand. It is optional; without it Resolve behaves as before. It is forwarded to the wrapped FastAPI resolver, which resolves the Pydantic half of the type space.
func (*FlaskTypeResolver) Unresolved ¶
func (r *FlaskTypeResolver) Unresolved() map[string]int
Unresolved returns the type names this resolver failed to resolve, mapped to their occurrence counts.
type MarshmallowField ¶
type MarshmallowModel ¶
type MarshmallowModel struct {
Name string
Fields []MarshmallowField
EmbeddedTypes []string
}