ContributionsMost RecentMost LikesSolutionsRe: Response mixing object and number in an array Think i answered it myself Object -> Array -> Object paths: /results: get: responses: "200": description: OK content: application/json: schema: type: object properties: total_items: type: integer example: 116 total_pages: type: integer example: 12 users: type: array items: type: object properties: given_name: type: string maxLength: 50 example: James surname: type: string maxLength: 50 example: Greenwood Re: Response mixing object and number in an array Thanks, i had that as well before. But next to the multiple name object (given and surname) I also need to have other items. Which for what I understand disqualifies the use of Array, and forces me to go to Object. But then I no longer can have 2 instances of the name object in the example desired output: { "total_items": 116, "total_pages": 12, "users": [{ "given_name": "James", "surname": "Greenwood" }, { "given_name": "David", "surname": "Brown", }} Re: Response mixing object and number in an array See below, I have already moved away from the use of Array, and now have object within object openapi: 3.0.0 info: version: 1.0.0 title: recordset description: recordset servers: # Added by API Auto Mocking Plugin - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/fake paths: /results: get: responses: "200": description: OK content: application/json: schema: type: object properties: total_items: type: integer example: 116 total_pages: type: integer example: 12 users: type: object properties: given_name: type: string maxLength: 50 example: James surname: type: string maxLength: 50 example: Greenwood Which automatically provides the example { "total_items": 116, "total_pages": 12, "users": { "given_name": "James", "surname": "Greenwood" } } But how to create example with 2 users? Response mixing object and number in an array I am trying to model the following structure (taken from Paypal API guidelines) into openapi 3.0.0 I have no problem getting the object users in the array, but I cannot get the total_items and total_pages into the array without getting indent error (tried all the indent levels) and have failed to find an example So any help/example would be appreciated { "total_items": "166", "total_pages": "83", "users": [ { "given_name": "James", "surname": "Greenwood", ... "links": [ { "href": "https://api.foo.com/v1/customer/users/ALT-JFWXHGUV7VI", "rel": "self" } ] }, { "given_name": "David", "surname": "Brown", ... "links": [ { "href": "https://api.foo.com/v1/customer/users/ALT-MDFSKFGIFJ86DSF", "rel": "self" } }, ... } Solved