azure-functions-openapi-extension
                                
                                 azure-functions-openapi-extension copied to clipboard
                                
                                    azure-functions-openapi-extension copied to clipboard
                            
                            
                            
                        Unnecessary quotes within example
Taken from the docs:
// Example
public class CatExample : OpenApiExample<Cat>
{
    public override IOpenApiExample<Cat> Build(NamingStrategy namingStrategy = null)
    {
        this.Examples.Add(OpenApiExampleResolver.Resolve("nabi", new Cat() { Id = 123, Name = "Nabi" }, namingStrategy));
        return this;
    }
}
// Model
[OpenApiExample(typeof(CatExample))]
public class Cat
{
    public int Id { get; set; }
    public string Name { get; set; }
}
// This will result in:
// {
//   "components": {
//     "schemas": {
//       "cat": {
//         "type": "object",
//         "properties": {
//           "id": {
//             "type": "integer"
//             "format": "int32"
//           },
//           "name": {
//             "type": "string"
//           }
//         },
//         "example": "{\"id\":123,\"name\":\"Nabi\"}"
//       }
//     }
//   }
// }
Focusing on "example": "{"id":123,"name":"Nabi"}" I have found when importing into APIM that the example does not run as there are quotes and escape characters within the payload, should importing the specification correctly parse this into a valid json string or should this value within the spec be valid json?