schemes: - https securityDefinitions: api_token: type: apiKey in: header name: Swagger-Token definitions: BaseModel: description: BaseModel is the top-level definition in this example type: object properties: directChildren: description: A nested array of direct recursive models. type: array items: $ref: '#/definitions/DirectRecursiveModel' indirectChildren: description: A nested array of indirect recursive models. type: array items: $ref: '#/definitions/IndirectRecursiveModelOne' additionalProperties: false required: - directChildren - indirectChildren DirectRecursiveModel: description: DirectRecursiveModel is a nested model which can optionally contain itself. type: object properties: children: description: A nested array of direct recursive models. type: array items: $ref: '#/definitions/DirectRecursiveModel' additionalProperties: false required: - children IndirectRecursiveModelOne: description: IndirectRecursiveModelOne is a nested model which can optionally contain IndirectRecursiveModelTwo. type: object properties: children: description: A nested array of indirect recursive models. type: array items: $ref: '#/definitions/IndirectRecursiveModelTwo' additionalProperties: false required: - children IndirectRecursiveModelTwo: description: IndirectRecursiveModelTwo is a nested model which can optionally contain IndirectRecursiveModelOne. type: object properties: children: description: A nested array of indirect recursive models. type: array items: $ref: '#/definitions/IndirectRecursiveModelOne' additionalProperties: false required: - children security: - api_token: [] produces: - application/json paths: /baseModels: post: parameters: - in: body name: BaseModel description: '' required: true schema: $ref: '#/definitions/BaseModel' responses: '201': schema: $ref: '#/definitions/BaseModel' description: Resource '400': description: Schema mismatch '404': description: Resource does not exist '422': description: Unprocessable operationId: createBaseModel description: Create BaseModel allows you to create a new BaseModel summary: Create BaseModel consumes: - application/json host: api.app.example.com info: title: Invalid Recursive Definition Example version: '1.0' description: This example contains recursive model definitions which are invalid because their "children", "directChildren", and "indirectChildren" properties are all marked as required. swagger: '2.0' basePath: /