Skip to content

Commit ff9ce71

Browse files
author
Gabriel Garcia
committed
fix: allow to keep unquoted profile based on query-string
(cherry picked from commit 1d7d45b)
1 parent 0220963 commit ff9ce71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/MakingSense.AspNetCore.HypermediaApi/Metadata/ActionRelationAttribute.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ public void OnResultExecuting([NotNull]ResultExecutingContext context)
9090

9191
if (schemaAttribute != null)
9292
{
93+
var keepUnquoted = context.HttpContext.Request.Query.ContainsKey("keep-unquoted-profile");
94+
9395
context.HttpContext.Response.OnStarting((o) =>
9496
{
95-
AddProfileToContentType(context, schemaAttribute);
97+
AddProfileToContentType(context, schemaAttribute, keepUnquoted);
9698
return Task.FromResult(0);
9799
}, null);
98100
}

0 commit comments

Comments
 (0)