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

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "allOf marshalling",
     5      "description": "when the specification incorrectly defines the allOf,\ngenerated unmarshalling is wrong.\nThis fixture asserts that with correct spec, the generated models are correct.\n",
     6      "version": "0.0"
     7    },
     8    "basePath": "/test",
     9    "paths": {
    10      "/allof": {
    11        "get": {
    12          "responses": {
    13            "200": {
    14              "description": "test",
    15              "schema": {
    16                "$ref": "#/definitions/B"
    17              }
    18            }
    19          }
    20        }
    21      }
    22    },
    23    "definitions": {
    24      "A": {
    25        "description": "a first definition A",
    26        "type": "object",
    27        "properties": {
    28          "f1": {
    29            "type": "string"
    30          },
    31          "f2": {
    32            "type": "string"
    33          }
    34        }
    35      },
    36      "B": {
    37        "description": "a second definition B, which extends A",
    38        "type": "object",
    39        "allOf": [
    40          {
    41            "$ref": "#/definitions/A"
    42          },
    43          null
    44        ],
    45        "required": [
    46          "f3",
    47          "f4"
    48        ],
    49        "properties": {
    50          "f3": {
    51            "type": "string"
    52          },
    53          "f4": {
    54            "type": "array",
    55            "items": {
    56              "type": "string"
    57            }
    58          }
    59        }
    60      }
    61    }
    62  }