The Azure DocumentDB Blog

All about DocumentDB and Logic Apps

Invalid Swagger from API App – Tip

Have you ever received an Invalid Swagger 2.0 Error for an API App?

If you are returning the standard status codes, you will find that there are duplicate codes.  This is one cause of the error.

If you edit your SwaggerConfig.cs, as shown below, this will solve the problem

 // In accordance with the built in JsonSerializer, Swashbuckle will, by default, describe enums as integers.
 // You can change the serializer behavior by configuring the StringToEnumConverter globally or for a given
 // enum type. Swashbuckle will honor this change out-of-the-box. However, if you use a different
 // approach to serialize enums as strings, you can also force Swashbuckle to describe them as strings.
 // 
 c.DescribeAllEnumsAsStrings()

 

Speaking at Global Integration Boot camp

On Saturday,  March 25th 2017, I will be speaking at the Global Integration Boot camp being held at the Microsoft Technology Center in NYC.

I will be doing the Azure Service Bus + Enterprise Integration Pack + On-prem Data Gateway Lab

I will be joined by Mandi Ohlinger (Microsoft),  Stephen Thomas (MVP) and  Kent Weare (MVP)

The FREE event  will take place from 8:30 AM to 5:00 PM . Registration is now open 

This event is being sponsored by VNB Consulting 

The event is also taking place in other places simultaneously worldwide including  Australia, Belgium, Finland, India, New Zealand, The Netherlands, Norway, Portugal, UK, and  Sweden.

In the US, the other places are Chicago and Redmond (Microsoft)

 

You can find more information at the boot camp’s website

« Older posts
%d bloggers like this:
Skip to toolbar