-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Milestone
Description
OpenAPI.NET/src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs
Lines 71 to 74 in 8851cf3
case PrimitiveType.String: | |
var stringValue = (OpenApiString)(IOpenApiPrimitive)this; | |
writer.WriteValue(stringValue.Value); | |
break; |
Currently there is no way to write a raw string value without json encoding it as the writer does not take into account the IsExplicit value stored in OpenApiString. This feels like a bug, if so an easy fix would be to check if OpenApiString.IsExplicit() is true then call WriteRaw instead of WriteValue. If this would cause backwards compatibility issues, I suggest adding another parameter to OpenApiString that allows its contents to be called with WriteRaw instead of WriteValue.
Metadata
Metadata
Assignees
Labels
No labels