cryptomator / hub

Cryptomator Hub helps you manage vaults in large teams
GNU Affero General Public License v3.0
36 stars 8 forks source link

Incomplete openapi for devices-requiring-access-grant due to missing 200 response code declaration #199

Closed chenkins closed 1 year ago

chenkins commented 1 year ago

Please agree to the following

Summary

Incomplete OpenApi documentation

System Setup

- Hub: 1.2.0-SNAPSHOT
- Keycloak: 21.1.1

Steps to Reproduce

  1. Get the json from http://localhost:8080/q/openapi?format=json

Expected Behavior

"/api/vaults/{vaultId}/devices-requiring-access-grant" : {
      "get" : {
        "tags" : [ "Vault Resource" ],
        "summary" : "list devices requiring access rights",
        "description" : "lists all devices owned by vault members, that don't have a device-specific masterkey yet",
        "parameters" : [ {
          "name" : "vaultId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/UUID"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/DeviceDto"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "VaultAdminAuthorizationJWT not provided"
          },
          "403" : {
            "description" : "VaultAdminAuthorizationJWT expired or not yet valid"
          },
          "404" : {
            "description" : "vault not found"
          }
        },
        "security" : [ {
          "SecurityScheme" : [ "user" ]
        } ]
      }
    },

Actual Behavior

"/api/vaults/{vaultId}/devices-requiring-access-grant" : {
      "get" : {
        "tags" : [ "Vault Resource" ],
        "summary" : "list devices requiring access rights",
        "description" : "lists all devices owned by vault members, that don't have a device-specific masterkey yet",
        "parameters" : [ {
          "name" : "vaultId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/UUID"
          }
        } ],
        "responses" : {
          "401" : {
            "description" : "VaultAdminAuthorizationJWT not provided"
          },
          "403" : {
            "description" : "VaultAdminAuthorizationJWT expired or not yet valid"
          },
          "404" : {
            "description" : "vault not found"
          }
        },
        "security" : [ {
          "SecurityScheme" : [ "user" ]
        } ]
      }
    },

Same for GET /api/vaults/{vaultId} and GET /api/vaults/{vaultId}/members.

Reproducibility

Always

Relevant Log Output

No response

Anything else?

No response