{
  "swagger": "2.0",
  "info": {
    "title": "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
    "description": "Visibility Rule Echo Service\nSimilar to echo_service.proto but with annotations to change visibility\nof services, methods, fields and enum values.\n\n`google.api.VisibilityRule` annotations are added to customize where they are generated.\nCombined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.\nElements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.\n\nThese restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.\nIn this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "VisibilityRuleEchoService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/example/echo/{id}": {
      "post": {
        "summary": "Echo method receives a simple message and returns it.\nIt should always be visible in the open API output.",
        "operationId": "VisibilityRuleEchoService_Echo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "Id represents the message identifier.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "num",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lineNum",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "status.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "en",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "no.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "anEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_UNSPECIFIED",
              "VISIBILITY_ENUM_VISIBLE",
              "VISIBILITY_ENUM_PREVIEW"
            ],
            "default": "VISIBILITY_ENUM_UNSPECIFIED"
          },
          {
            "name": "ahiddenDefaultEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE"
            ]
          }
        ],
        "tags": [
          "VisibilityRuleEchoService"
        ]
      }
    },
    "/v1/example/echo_internal_and_preview": {
      "get": {
        "summary": "EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\" or \"INTERNAL\".",
        "operationId": "VisibilityRuleEchoService_EchoInternalAndPreview",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "Id represents the message identifier.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "num",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lineNum",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "status.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "en",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "no.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "anEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_UNSPECIFIED",
              "VISIBILITY_ENUM_VISIBLE",
              "VISIBILITY_ENUM_PREVIEW"
            ],
            "default": "VISIBILITY_ENUM_UNSPECIFIED"
          },
          {
            "name": "ahiddenDefaultEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE"
            ]
          }
        ],
        "tags": [
          "VisibilityRuleEchoService"
        ]
      }
    },
    "/v1/example/echo_preview": {
      "get": {
        "summary": "EchoPreview is a preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\".",
        "operationId": "VisibilityRuleEchoService_EchoPreview",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/examplepbVisibilityRuleMessageInPreviewMethod"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "Id represents the message identifier.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "num",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lineNum",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "status.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "en",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.progress",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "int64"
          },
          {
            "name": "no.note",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "no.previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "previewField",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "anEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_UNSPECIFIED",
              "VISIBILITY_ENUM_VISIBLE",
              "VISIBILITY_ENUM_PREVIEW"
            ],
            "default": "VISIBILITY_ENUM_UNSPECIFIED"
          },
          {
            "name": "ahiddenDefaultEnum",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE"
            ]
          }
        ],
        "tags": [
          "VisibilityRuleEchoService"
        ]
      }
    }
  },
  "definitions": {
    "VisibilityRuleSimpleMessageVisibilityEnum": {
      "type": "string",
      "enum": [
        "VISIBILITY_ENUM_UNSPECIFIED",
        "VISIBILITY_ENUM_VISIBLE",
        "VISIBILITY_ENUM_PREVIEW"
      ],
      "default": "VISIBILITY_ENUM_UNSPECIFIED"
    },
    "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": {
      "type": "string",
      "enum": [
        "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE"
      ]
    },
    "examplepbVisibilityRuleEmbedded": {
      "type": "object",
      "properties": {
        "progress": {
          "type": "string",
          "format": "int64"
        },
        "note": {
          "type": "string"
        },
        "previewField": {
          "type": "string"
        }
      },
      "description": "Embedded represents a message embedded in SimpleMessage."
    },
    "examplepbVisibilityRuleEnumInPreviewMethod": {
      "type": "string",
      "enum": [
        "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED"
      ],
      "default": "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED",
      "description": "EnumInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
    },
    "examplepbVisibilityRuleMessageInPreviewMethod": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "subMessage": {
          "$ref": "#/definitions/examplepbVisibilityRuleSubMessageInPreviewMethod"
        },
        "enum": {
          "$ref": "#/definitions/examplepbVisibilityRuleEnumInPreviewMethod"
        }
      },
      "description": "MessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
    },
    "examplepbVisibilityRuleSimpleMessage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id represents the message identifier."
        },
        "num": {
          "type": "string",
          "format": "int64"
        },
        "lineNum": {
          "type": "string",
          "format": "int64"
        },
        "lang": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
        },
        "en": {
          "type": "string",
          "format": "int64"
        },
        "no": {
          "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
        },
        "previewField": {
          "type": "string"
        },
        "anEnum": {
          "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum"
        },
        "ahiddenDefaultEnum": {
          "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault"
        }
      },
      "description": "SimpleMessage represents a simple message sent to the Echo service."
    },
    "examplepbVisibilityRuleSubMessageInPreviewMethod": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "description": "SubMessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    }
  }
}