Forum Discussion

Karsten's avatar
Karsten
New Contributor
2 years ago
Solved

Schema in Swagger Editor?

Hello everyone,

 

totally new to Swagger and I'm struggeling with creating a schema for an API response:

{"1236211": "0.9375959", "1174144": "0.8684537", "1236205": "0.8637224", "1213616": "0.8455657", "1172207": "0.80773705", "1212238": "0.79395837", "1174062": "0.79395837", "947023": "0.7878885", "947007": "0.7837074", "1172208": "0.78324217", "1174053": "0.77915275", "1172204": "0.7417756"}

How does a schema for a response like this look like?

 

I wish it was like

{{ "id": "1236211", "percentage": "0.9375959" }, { "id": "1174144", "percentage": "0.8684537" },...

But that would be too easy.

 

I hope you can help. Thanks in advance.

2 Replies