How to document a struct with two constructors?

using Parameters, StaticArrays

const MVec3    = MVector{3, Float64}

"""
    Section

Represents a wing section with leading edge, trailing edge, and aerodynamic properties.

# Fields
- `LE_point::MVec3` = zeros(MVec3): Leading edge point coordinates
- `TE_point::MVec3` = zeros(MVec3): Trailing edge point coordinates
"""
@with_kw mutable struct Section
    LE_point::MVec3 = zeros(MVec3)
    TE_point::MVec3 = zeros(MVec3)
end
"""
    Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})

Constructor for Section that allows to pass Vectors of Float64 as point coordinates.
"""
function Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})
    Section(MVec3(LE_point), MVec3(TE_point))
end

How can I document the second version of the constructor? It does not appear in the html file created by Documenter.jl .

1 Like

Found the answer myself. I just need to use both signatures in the .md file that is used by Documenter.jl:

```@docs
Section
Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})
.```

(The dot in the last line should not be there.)

4 Likes