diff --git a/parser_test.go b/parser_test.go index 7862796d1..0479a7595 100644 --- a/parser_test.go +++ b/parser_test.go @@ -3864,6 +3864,24 @@ func TestTryAddDescription(t *testing.T) { }, }, }, + { + name: "added description with multiline", + lines: []string{ + "\t@securitydefinitions.apikey test", + "\t@in header", + "\t@name x-api-key", + "\t@description line1", + "\t@description line2", + }, + want: &spec.SecurityScheme{ + SecuritySchemeProps: spec.SecuritySchemeProps{ + Name: "x-api-key", + Type: "apiKey", + In: "header", + Description: "line1\nline2", + }, + }, + }, { name: "no description", lines: []string{