name: Swagger Petstore - OpenAPI 3.0
profiles:
  /v3:
    name: /v3
    data:
      host: /v3

requests:
  tag/pet:
    name: pet
    requests:
      addPet:
        name: Add a new pet to the store
        method: POST
        url: "{{ host }}/pet"
        body:
          type: json
          data:
            {
              "id": 10,
              "name": "doggie",
              "category": { "id": 1, "name": "Dogs" },
              "photoUrls": [""],
              "tags": [{ "id": 0, "name": "" }],
              "status": "available",
            }
      updatePet:
        name: Update an existing pet
        method: PUT
        url: "{{ host }}/pet"
        body:
          type: json
          data:
            {
              "id": 10,
              "name": "doggie",
              "category": { "id": 1, "name": "Dogs" },
              "photoUrls": [""],
              "tags": [{ "id": 0, "name": "" }],
              "status": "available",
            }
      findPetsByStatus:
        name: Finds Pets by status
        method: GET
        url: "{{ host }}/pet/findByStatus"
        query:
          status: ""
      findPetsByTags:
        name: Finds Pets by tags
        method: GET
        url: "{{ host }}/pet/findByTags"
        query:
          tags: ""
      deletePet:
        name: Deletes a pet
        method: DELETE
        url: "{{ host }}/pet/{{petId}}"
        headers:
          api_key: ""
      getPetById:
        name: Find pet by ID
        method: GET
        url: "{{ host }}/pet/{{petId}}"
        headers:
          api_key: "{{api_key}}"
      updatePetWithForm:
        name: Updates a pet in the store with form data
        method: POST
        url: "{{ host }}/pet/{{petId}}"
        query:
          name: ""
          status: ""
      uploadFile:
        name: uploads an image
        method: POST
        url: "{{ host }}/pet/{{petId}}/uploadImage"
        query:
          additionalMetadata: ""
        body: '""'
  tag/store:
    name: store
    requests:
      getInventory:
        name: Returns pet inventories by status
        method: GET
        url: "{{ host }}/store/inventory"
        headers:
          api_key: "{{api_key}}"
      placeOrder:
        name: Place an order for a pet
        method: POST
        url: "{{ host }}/store/order"
        body:
          type: json
          data:
            {
              id: 10,
              petId: 198772,
              quantity: 7,
              shipDate: "",
              status: "approved",
              complete: false,
            }
      deleteOrder:
        name: Delete purchase order by ID
        method: DELETE
        url: "{{ host }}/store/order/{{orderId}}"
      getOrderById:
        name: Find purchase order by ID
        method: GET
        url: "{{ host }}/store/order/{{orderId}}"
  tag/user:
    name: user
    requests:
      createUser:
        name: Create user
        method: POST
        url: "{{ host }}/user"
        body:
          type: json
          data: {
              id: 10,
              username: "theUser",
              firstName: "John",
              lastName: "James",
              email: "john@email.com",
              # The schema says these are string fields, but the example values
              # in the spec are numbers, so we just use the examples
              password: 12345,
              phone: 12345,
              userStatus: 1,
            }
      createUsersWithListInput:
        name: Creates list of users with given input array
        method: POST
        url: "{{ host }}/user/createWithList"
        body:
          type: json
          data:
            [
              {
                id: 10,
                username: "theUser",
                firstName: "John",
                lastName: "James",
                email: "john@email.com",
                password: 12345,
                phone: 12345,
                userStatus: 1,
              },
            ]
      loginUser:
        name: Logs user into the system
        method: GET
        url: "{{ host }}/user/login"
        query:
          username: ""
          password: ""
      logoutUser:
        name: Logs out current logged in user session
        method: GET
        url: "{{ host }}/user/logout"
      deleteUser:
        name: Delete user
        method: DELETE
        url: "{{ host }}/user/{{ username }}"
      getUserByName:
        name: Get user by user name
        method: GET
        url: "{{ host }}/user/{{ username }}"
      updateUser:
        name: Update user
        method: PUT
        url: "{{ host }}/user/{{ username }}"
        body:
          type: json
          data:
            {
              id: 10,
              username: "theUser",
              firstName: "John",
              lastName: "James",
              email: "john@email.com",
              password: 12345,
              phone: 12345,
              userStatus: 1,
            }
