github.com/kaisawind/go-swagger@v0.19.0/fixtures/bugs/1042/fixture-1042.yaml (about)

     1  swagger: "2.0"
     2  info:
     3    title: allOf marshalling
     4    description: |
     5      when the specification incorrectly defines the allOf,
     6      generated unmarshalling is wrong.
     7      This fixture asserts that with correct spec, the generated models are correct.
     8    version: "0.0"
     9    
    10  basePath: "/test"
    11  
    12  paths:
    13    "/allof":
    14      get:
    15        responses:
    16          '200':
    17            description: test
    18            schema:
    19              "$ref": "#/definitions/B"
    20    
    21  definitions:
    22    A:
    23      description: a first definition A
    24      type: object
    25      properties:
    26        f1:
    27          type: string
    28        f2: 
    29          type: string
    30  
    31    B:
    32      description: a second definition B, which extends A
    33      type: object
    34      allOf:
    35        - "$ref": "#/definitions/A"
    36        -
    37          required:
    38            - f3
    39            - f4
    40          properties:
    41            f3: 
    42              type: string
    43            f4: 
    44              type: array
    45              items:
    46                type: string