...

Text file src/github.com/go-openapi/analysis/fixtures/enums.yml

Documentation: github.com/go-openapi/analysis/fixtures

     1---
     2swagger: "2.0"
     3info:
     4  version: "0.1.0"
     5  title: reference analysis
     6
     7parameters:
     8  idParam:
     9    name: id
    10    in: path
    11    type: string
    12    pattern: 'a[A-Za-Z0-9]+'
    13    enum:
    14      - aA
    15      - b9
    16      - c3
    17
    18responses:
    19  notFound:
    20    headers:
    21      ContentLength:
    22        type: string
    23        pattern: '[0-9]+'
    24        enum:
    25          - '1234'
    26          - '123'
    27    schema:
    28      $ref: "#/definitions/error"
    29
    30paths:
    31  "/some/where/{id}":
    32    parameters:
    33      - $ref: "#/parameters/idParam"
    34      - name: name
    35        in: query
    36        pattern: 'b[A-Za-z0-9]+'
    37        enum:
    38          - bA
    39          - ba
    40          - b9
    41      - name: bodyId
    42        in: body
    43        schema:
    44          type: object
    45    get:
    46      parameters:
    47      - name: filter
    48        in: query
    49        type: string
    50        pattern: "[abc][0-9]+"
    51        enum:
    52          - a0
    53          - b1
    54          - c2
    55      - name: other
    56        in: query
    57        type: array
    58        items:
    59          type: string
    60          pattern: 'c[A-Za-z0-9]+'
    61          enum:
    62            - cA
    63            - cz
    64            - c9
    65        enum:
    66          -
    67            - cA
    68            - cz
    69            - c9
    70          -
    71            - cA
    72            - cz
    73          -
    74            - cz
    75            - c9
    76      - name: body
    77        in: body
    78        schema:
    79          type: object
    80          enum:
    81            - '{"a": 10, "b": 20}'
    82            - '{"a": 11, "d": "zzz"}'
    83            
    84      responses:
    85        default:
    86          schema:
    87            type: object
    88        404:
    89          $ref: "#/responses/notFound"
    90        200:
    91          headers:
    92            X-Request-Id:
    93              type: string
    94              pattern: 'd[A-Za-z0-9]+'
    95              enum:
    96                - dA
    97                - d9
    98          schema:
    99            $ref: "#/definitions/tag"
   100  "/other/place":
   101    post:
   102      parameters:
   103        - name: body
   104          in: body
   105          schema:
   106            type: object
   107            properties:
   108              value:
   109                type: string
   110                pattern: 'e[A-Za-z0-9]+'
   111                enum:
   112                  - eA
   113                  - e9
   114      responses:
   115        default:
   116          headers:
   117            Via:
   118              type: array
   119              items:
   120                type: string
   121                pattern: '[A-Za-z]+'
   122                enum:
   123                  - AA
   124                  - Ab
   125        200:
   126          schema:
   127            type: object
   128            properties:
   129              data:
   130                type: string
   131                pattern: "[0-9]+[abd]"
   132                enum:
   133                  - 123a
   134                  - 123b
   135                  - 123d
   136definitions:
   137  named:
   138    type: string
   139    pattern: 'f[A-Za-z0-9]+'
   140    enum:
   141      - fA
   142      - f9
   143  tag:
   144    type: object
   145    properties:
   146      id:
   147        type: integer
   148        format: int64
   149      value:
   150        type: string
   151        pattern: 'g[A-Za-z0-9]+'
   152        enum:
   153          - gA
   154          - ga
   155          - g9
   156      audit:
   157        $ref: "#/definitions/record"
   158  record:
   159    type: object
   160    properties:
   161      createdAt:
   162        type: string
   163        format: date
   164    enum:
   165      - '{"createdAt": "2018-08-31"}'
   166      - '{"createdAt": "2018-09-30"}'
   167  error:
   168    type: object
   169    required:
   170      - id
   171      - message
   172    properties:
   173      id:
   174        type: integer
   175        format: int64
   176        readOnly: true
   177      message:
   178        type: string
   179        readOnly: true
   180  withPatternProperties:
   181    type: object
   182    additionalProperties: true
   183    patternProperties:
   184      '^prop[0-9]+$':
   185        type: string

View as plain text