github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/enhancements/2224/fixture-2224-models.yaml (about)

     1  definitions:
     2    Time:
     3      type: string
     4      format: date-time
     5      x-go-type:
     6        import:
     7          package: time
     8        embedded: true
     9        type: Time
    10      x-nullable: true
    11  
    12    TimeAsObject:  # <- time.Time is actually a struct
    13      type: string
    14      format: date-time
    15      x-go-type:
    16        import:
    17          package: time
    18          hints:
    19            kind: object
    20        embedded: true
    21        type: Time
    22      x-nullable: true
    23  
    24    Raw:
    25      x-go-type:
    26        import:
    27          package: encoding/json
    28        hints:
    29          kind: primitive
    30        embedded: true
    31        type: RawMessage
    32  
    33    Request:
    34      x-go-type:
    35        import:
    36          package: net/http
    37        hints:
    38          kind: object
    39        embedded: true
    40        type: Request
    41  
    42    RequestPointer:
    43      x-go-type:
    44        import:
    45          package: net/http
    46        hints:
    47          kind: object
    48          nullable: true
    49        embedded: true
    50        type: Request
    51  
    52    OldStyleImport:
    53      type: object
    54      x-go-type:
    55        import:
    56          package: net/http
    57        type: Request
    58        hints:
    59          noValidation: true
    60  
    61    OldStyleRenamed:
    62      type: object
    63      x-go-type:
    64        import:
    65          package: net/http
    66        type: Request
    67        hints:
    68          noValidation: true
    69      x-go-name: OldRenamed
    70  
    71    ObjectWithEmbedded:
    72      type: object
    73      properties:
    74        a:
    75          $ref: '#/definitions/Time'
    76        b:
    77          $ref: '#/definitions/Request'
    78        c:
    79          $ref: '#/definitions/TimeAsObject'
    80        d:
    81          $ref: '#/definitions/Raw'
    82        e:
    83          $ref: '#/definitions/JSONObject'
    84        f:
    85          $ref: '#/definitions/JSONMessage'
    86        g:
    87          $ref: '#/definitions/JSONObjectWithAlias'
    88  
    89    ObjectWithExternals:
    90      type: object
    91      properties:
    92        a:
    93          $ref: '#/definitions/OldStyleImport'
    94        b:
    95          $ref: '#/definitions/OldStyleRenamed'
    96  
    97    Base:
    98      properties: &base
    99        id:
   100          type: integer
   101          format: uint64
   102          x-go-custom-tag: 'gorm:"primary_key"'
   103        FBID:
   104          type: integer
   105          format: uint64
   106          x-go-custom-tag: 'gorm:"index"'
   107        created_at:
   108          $ref: "#/definitions/Time"
   109        updated_at:
   110          $ref: "#/definitions/Time"
   111        version:
   112          type: integer
   113          format: uint64
   114  
   115    HotspotType:
   116      type: string
   117      enum:
   118        - A
   119        - B
   120        - C
   121  
   122    Hotspot:
   123      type: object
   124      allOf:
   125        - properties: *base
   126        - properties:
   127            access_points:
   128              type: array
   129              items:
   130                $ref: '#/definitions/AccessPoint'
   131            type:
   132              $ref: '#/definitions/HotspotType'
   133          required:
   134            - type
   135  
   136    AccessPoint:
   137      type: object
   138      allOf:
   139        - properties: *base
   140        - properties:
   141            mac_address:
   142              type: string
   143              x-go-custom-tag: 'gorm:"index;not null;unique"'
   144            hotspot_id:
   145              type: integer
   146              format: uint64
   147            hotspot:
   148              $ref: '#/definitions/Hotspot'
   149  
   150    JSONObject:
   151      type: object
   152      additionalProperties:
   153        type: array
   154        items:
   155          $ref: '#/definitions/Raw'
   156  
   157    JSONObjectWithAlias:
   158      type: object
   159      additionalProperties:
   160        type: object
   161        properties:
   162          message:
   163            $ref: '#/definitions/JSONMessage'
   164  
   165    JSONMessage:
   166      $ref: '#/definitions/Raw'
   167  
   168    Incorrect:
   169      x-go-type:
   170        import:
   171          package: net
   172          hints:
   173            kind: array
   174        embedded: true
   175        type: Buffers
   176      x-nullable: true