Skip to main content

4 posts tagged with "Swagger"

The Swagger API documentation framework - now known as OpenAPI.

View All Tags

Swashbuckle and schemaId is already used

· 3 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

Swashbuckle can fail to generate a swagger / Open API document with the message "The same schemaId is already used...". This post explains what that means, and offers a way to work around it.

title image reading "Swashbuckle and schemaId is already used" with the Azure Static Web Apps logo and a Terry Pratchett icon by Lisa Krymova from NounProject.com

Swashbuckle & inheritance: Give. Me. The. Types

· 6 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

For API endpoints that return multiple types, you can use inheritance with Swashbuckle to get create a Swagger / Open API definition featuring the variety of available types. Serving all these types is not the default behaviour. This post shows you how to opt in.

title image reading "Swashbuckle and inheritance: Give. Me. The. Types" with Sid Swashbuckle the Pirate and Open API logos

NSwag generated C# client: Open API property name clashes and decimal types rather than double

· 11 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

NSwag is a great tool for generating client libraries in C# and TypeScript from Open API / Swagger definitions. You can face issues where Open API property names collide due to the nature of the C# language, and when you want to use decimal for your floating point numeric type over double. This post demonstrates how to get over both issues.

title image reading "NSwag generated C# client: Open API property name clashes and decimal types rather than double" with a C# logo and Open API logos