openapi/v2/restful/role.yaml
# Copyright © 2023 Horizoncd.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License. openapi: 3.0.1info: title: Horizon Role Restful version: 2.0.0servers: - url: 'http://localhost:8080/'paths: /apis/core/v2/roles: get: tags: - role description: list roles operationId: listRoles responses: '200': description: Success content: application/json: schema: properties: data: type: array items: $ref: "#/components/schemas/Role" default: description: Unexpected error content: application/json: schema: $ref: "common.yaml#/components/schemas/Error"components: schemas: Verbs: type: array items: type: string APIGroups: type: array items: type: string Resources: type: array items: type: string Scopes: type: array items: type: string NonResourceURLs: type: array items: type: string PolicyRules: type: object properties: verbs: $ref: "#/components/schemas/Verbs" apiGroups: $ref: "#/components/schemas/APIGroups" resources: $ref: "#/components/schemas/Resources" scopes: $ref: "#/components/schemas/Scopes" nonResourceURLs: $ref: "#/components/schemas/NonResourceURLs" Role: type: object properties: name: type: string description: name of role desc: type: string description: desc of role rules: type: array items: $ref: "#/components/schemas/PolicyRules"