# Discriminator with AllOf and Mapping

`GET /discriminator-allof-mapping`

Tags: `discriminator`

Schema:
```yaml
type: object
discriminator: 
  propertyName: type
  mapping:
    typeA: '#/components/schemas/TypeA'
    typeB: '#/components/schemas/TypeB'
properties:
  type:
    type: string
allOf:
  - oneOf:
      - $ref: '#/components/schemas/TypeA'
      - $ref: '#/components/schemas/TypeB'
  - type: object
    properties:
      sharedProp:
        type: string
```

## Responses

### 200

Successful response

#### Content type: `application/json`

Schema: `one of`

- Discriminator: `type`
  - `typeA` selects TypeA
  - `typeB` selects TypeB
- Exactly one of these options:
  - Option 1: TypeA (object)
    A variant carrying a single string property `propA`.
    - `sharedProp` (string)
    - `type` (string, required, possible values: `typeA`)
    - `propA` (string)
  - Option 2: TypeB (object)
    A variant carrying a numeric property `propB`.
    - `sharedProp` (string)
    - `type` (string, required, possible values: `typeB`)
    - `propB` (number)
