Skip to content

Commit

Permalink
Added tests for multiline for @description attribute for securityDefi…
Browse files Browse the repository at this point in the history
…nition
  • Loading branch information
golandprog committed Apr 22, 2024
1 parent b61baec commit dd28e17
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit dd28e17

Please sign in to comment.