# OpenAPI stub only containing relevant info for example
openapi <- list(
components = list(
securitySchemes = list(
auth1 = list(
type = "http",
scheme = "basic"
),
auth2 = list(
type = "oauth2",
flows = list(
authorizationCode = list(
scopes = list(
read = "read data",
write = "change data"
)
)
)
)
)
),
# Global auth settings
security = list(
list(auth1 = c("read", "write"))
),
# Path specific auth settings
paths = list(
"/user/{username}" = list(
get = list(
security = list(
list(auth2 = c("read", "write", "commit")),
list(auth3 = c("read"))
)
)
)
)
)
prune_openapi(openapi)
Run the code above in your browser using DataLab