goctl-swagger icon indicating copy to clipboard operation
goctl-swagger copied to clipboard

inconsistent behaviour when generating embedded structs

Open qwernser opened this issue 3 years ago • 0 comments

type (
        Part {
                Content string `path:"content"`
        }
        Combined {
                Part
                Other string `json:"other"`
        }
    Response {
        Msg string `json:"msg"`
    }
)
service api {
        @handler GetInfo
        post /api/:content(Combined) returns (Response)
}

content appears in both path and json body in final json, which is inconsistent with normal (non embedded) structs .

qwernser avatar Jun 10 '22 08:06 qwernser