GitHub Raw JSON API

usebruno / bruno

46,318 JavaScript

Opensource IDE For Exploring and Testing API's (lightweight alternative to Postman/Insomnia)

Simple Test API Specification

Located in tests/import/openapi/cli/fixtures/openapi.json on branch HEAD

3.0.0 JSON 6 Endpoints 4.7 KB

Operations & Route Endpoints (9)

GET /users
Get all users
POST /users
Create user
GET /users/{id}
Get user by ID
PUT /users/{id}
Update user
GET /products
Get all products
GET /products/{id}
Get product by ID
GET /orders
Get all orders
POST /orders
Create order
GET /orders/{id}
Get order by ID
Raw JSON Specification
{
  "openapi": "3.0.0",
  "info": {
    "title": "Simple Test API",
    "version": "1.0.0",
    "description": "A simple API for testing groupBy functionality"
  },
  "servers": [
    {
      "url": "https://api.example.com",
      "description": "Example server"
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "summary": "Get all users",
        "operationId": "getUsers",
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "List of users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create user",
        "operationId": "createUser",
        "tags": [
          "users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created"
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "summary": "Get user by ID",
        "operationId": "getUserById",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User details"
          }
        }
      },
      "put": {
        "summary": "Update user",
        "operationId": "updateUser",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated"
          }
        }
      }
    },
    "/products": {
      "get": {
        "summary": "Get all products",
        "operationId": "getProducts",
        "tags": [
          "products"
        ],
        "responses": {
          "200": {
            "description": "List of products"
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "summary": "Get product by ID",
        "operationId": "getProductById",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product details"
          }
        }
      }
    },
    "/orders": {
      "get": {
        "summary": "Get all orders",
        "operationId": "getOrders",
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "List of orders"
          }
        }
      },
      "post": {
        "summary": "Create order",
        "operationId": "createOrder",
        "tags": [
          "orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "integer"
                  },
                  "productId": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order created"
          }
        }
      }
    },
    "/orders/{id}": {
      "get": {
        "summary": "Get order by ID",
        "operationId": "getOrderById",
        "tags": [
          "orders"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order details"
          }
        }
      }
    }
  }
}