{
  "openapi": "3.1.1",
  "info": {
    "title": "MAKNOW synthetic orders contract",
    "version": "1"
  },
  "paths": {
    "/orders/{id}": {
      "get": {
        "operationId": "GetOrder",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-policy": "Orders.Read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/orders": {
      "post": {
        "operationId": "CreateOrder",
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "409",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "415",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-policy": "Orders.Write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrder"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateOrder": {
        "type": "object",
        "required": [
          "customerReference",
          "quantity"
        ],
        "additionalProperties": false,
        "properties": {
          "customerReference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          }
        }
      },
      "PatchOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          }
        }
      },
      "Order": {
        "type": "object",
        "required": [
          "id",
          "customerReference",
          "quantity"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "customerReference": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "instance",
          "traceId"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "instance": {
            "type": "string",
            "format": "uri"
          },
          "traceId": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-evidence-kind": "PYTHON_METADATA_GENERATION_NOT_ASPNET",
  "x-implementation-digest": "53619eaadac8bb1c8d3991a26d4cf4194aa785c77a8138b90480a8ba44ceea33"
}
