Documentation
¶
Index ¶
- func ExtractAPIDocs(module, modelDir string, excludes []string) (gen.APIDocEntries, error)
- func FindModels(module, modelDir, serviceDir string, excludes []string) ([]*gen.ModelInfo, error)
- func FindServiceStruct(file *ast.File, modelName string) *ast.TypeSpec
- func HasMethod(file *ast.File, structName, methodName string) bool
- func IsServiceBaseType(expr ast.Expr, modelName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAPIDocs ¶
func ExtractAPIDocs(module, modelDir string, excludes []string) (gen.APIDocEntries, error)
ExtractAPIDocs extracts the struct doc comments and enum declarations of every exported type declared under modelDir, including custom request and response types; unexported types never reach the API surface and are skipped. Enum constants may live in a different file than their type declaration; entries of the same package are merged. The returned entries are sorted by package path and type name so generated output stays deterministic.
func FindModels ¶
FindModels finds all model infos in a directory
func FindServiceStruct ¶
FindServiceStruct finds the service struct that inherits from service.Base[*Model]
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package codegenast provides AST helpers for codegen; the name avoids conflicting with the standard library "go/ast" package.
|
Package codegenast provides AST helpers for codegen; the name avoids conflicting with the standard library "go/ast" package. |
|
cmd
|
|
|
apidocgen
command
Command apidocgen regenerates the apidoc registration file of the framework package that ships struct doc comments to the OpenAPI generator.
|
Command apidocgen regenerates the apidoc registration file of the framework package that ships struct doc comments to the OpenAPI generator. |
Click to show internal directories.
Click to hide internal directories.