{
  "openapi": "3.1.0",
  "info": {
    "title": "OPRP experimental protected exchange",
    "version": "0.1.0-dev.7",
    "description": "Reference HTTP wrapper. Not the complete OPRP/FHIR API. The advertised endpoint may have another path. Message-level authentication and scoped authorization are inside the protected exchange. No ordinary bearer-header security scheme is declared."
  },
  "paths": {
    "/oprp/exchange": {
      "post": {
        "operationId": "protectedExchange",
        "summary": "Exchange an authenticated encrypted application message",
        "requestBody": {
          "required": true,
          "content": {
            "application/oprp+json": {
              "schema": {
                "$ref": "./exchange.schema.json"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed encrypted response, including authenticated application errors. Cache-Control: no-store.",
            "content": {
              "application/oprp+json": {
                "schema": {
                  "$ref": "./exchange.schema.json"
                }
              }
            }
          },
          "400": {
            "description": "Outer message rejected; empty body."
          },
          "404": {
            "description": "Unsupported route; empty body."
          }
        }
      }
    },
    "/.well-known/webfinger": {
      "get": {
        "operationId": "discoverHost",
        "summary": "Resolve account to signed domain-authorized Host delegation",
        "parameters": [
          {
            "name": "resource",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "acct:synthetic@patients.example"
          }
        ],
        "responses": {
          "200": {
            "description": "WebFinger JRD containing the experimental OPRP delegation link.",
            "content": {
              "application/jrd+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Address not resolved; empty body."
          }
        }
      }
    }
  }
}
