openapi: 3.0.0 info: title: 'Nested schemas' description: 'Example info' contact: name: 'Swagger API Team' version: 1.0.0 servers: - url: 'https://example.localhost' description: 'API server' paths: '/entity/{id}': get: tags: - api description: 'Get the entity' operationId: dd148eadcee53770e24b2350f932e3bd parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: 'successful operation' content: application/json: schema: $ref: '#/components/schemas/ActualModel' components: schemas: ActualModel: type: object allOf: - $ref: '#/components/schemas/AlmostModel' - properties: actual: type: string soClose: type: string AlmostModel: type: object allOf: - $ref: '#/components/schemas/BaseModel' - properties: almost: type: string intermediate: type: string BaseModel: properties: base: type: string type: object tags: - name: api description: 'All API endpoints'