Skip to content

Instantly share code, notes, and snippets.

View AlexNolasco's full-sized avatar
🎯
Focusing

Alex Nolasco AlexNolasco

🎯
Focusing
View GitHub Profile
@AlexNolasco
AlexNolasco / swagger-type-variance.md
Created May 3, 2016 21:25 — forked from leedm777/swagger-type-variance.md
Type variance in Swagger models

This document describes how to extend Swagger data models to allow the types of fields to vary.

Given that Swagger models need to map cleanly to a statically typed object model, a subclassing approach seems like it would be a good fit.

Inheritance

Inheritance allows a model (the derived type) to inherit all of the