{
  "openapi": "3.1.1",
  "info": {"title": "Conditional item example", "version": "1.0.0"},
  "paths": {
    "/items/1": {
      "get": {
        "operationId": "getItem",
        "parameters": [{"name": "If-None-Match", "in": "header", "schema": {"type": "string"}}],
        "responses": {
          "200": {"description": "Current item", "headers": {"ETag": {"schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Item"}}}},
          "304": {"description": "Unchanged"}
        }
      },
      "put": {
        "operationId": "replaceItem",
        "parameters": [{"name": "If-Match", "in": "header", "required": true, "schema": {"type": "string"}}],
        "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Item"}}}},
        "responses": {
          "204": {"description": "Replaced"},
          "400": {"$ref": "#/components/responses/Problem"},
          "412": {"$ref": "#/components/responses/Problem"},
          "428": {"$ref": "#/components/responses/Problem"}
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Item": {"type": "object", "required": ["title"], "additionalProperties": false, "properties": {"title": {"type": "string", "minLength": 1}}},
      "Problem": {"type": "object", "required": ["type", "title", "status"], "properties": {"type": {"type": "string"}, "title": {"type": "string"}, "status": {"type": "integer"}}}
    },
    "responses": {"Problem": {"description": "Request failed", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}}}
  }
}
