Documentation
¶
Overview ¶
Docstring example: generate OpenAPI metadata from namespaced handler doc-comment directives instead of goai.Register calls.
go run ./goai/examples/docstring
What this example shows:
- Handler struct comments can provide shared operation metadata.
- Handler method comments provide endpoint-specific metadata.
- Only `@goai.*` lines flow into OpenAPI; ordinary Go comments stay private to source readers.
- `schemaType=SomeStruct` and `schemaType=packageAlias.SomeStruct` resolve Go structs into components.schemas and use $ref from operations.
Click to show internal directories.
Click to hide internal directories.