jeudi 25 mai 2017

Sub types with swagger API

I have an api that exposes a resource such as /stores. The problem is that stores have different types which require different json schemas (there are only 4 types though).

My question is how can I use swagger to validate the incoming data based on the type of store. Is it possible to have conditional checks based out of type with swagger or should I look into creating sub types such as

/stores/it

/stores/cars

...

thanks!




Aucun commentaire:

Enregistrer un commentaire