github.com/josephspurrier/go-swagger@v0.2.1-0.20221129144919-1f672a142a00/fixtures/bugs/1042/fixture-1042.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          {
    44            "required": [
    45              "f3",
    46              "f4"
    47            ],
    48            "properties": {
    49              "f3": {
    50                "type": "string"
    51              },
    52              "f4": {
    53                "type": "array",
    54                "items": {
    55                  "type": "string"
    56                }
    57              }
    58            }
    59          }
    60        ]
    61      }
    62    }
    63  }