swagger: '2.0'
info:
  description: 'blah'
  version: 1.0.0
  title: sample spec
host: fake.site.com
tags:
  - name: Test
schemes:
  - https
paths:
  /test:
    post:
      summary: Post to test
      description: ''
      operationId: postToTest
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: body
          name: Obj to test
          schema:
            $ref: '#/definitions/ObjTest'
      responses:
        '201':
          description: successful operation
          schema:
            $ref: '#/definitions/ObjTest'
definitions:
  ObjTest:
    description: A model to return
    type: object
    properties:
      field1:
        type: integer
        format: int64
      field2:
        type: string
        pattern: "\\w"
        x-pattern-message: "Only letters, numbers and underscore"
      field3:
        type: string
        pattern: "\\w"
  EnumTest:
    title: An enum to test
    type: string
    enum:
      - ONE
      - Two
      - three