From d55212e9dafb2e2a9e34e7a1381684743e02962e Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 4 Jun 2019 11:19:37 +1200 Subject: [PATCH] docs(api): update Swagger documentation --- api/swagger.yaml | 87 +++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index ad3ee7089..2b5ed89e6 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2964,7 +2964,29 @@ definitions: type: "string" example: "member" description: "LDAP attribute which denotes the group membership." - + UserAccessPolicies: + type: "object" + description: "User access policies associated to a registry/endpoint/endpoint group. RoleID is not required for registry access policies and can be set to 0." + additionalProperties: + $ref: "#/definitions/AccessPolicy" + example: + 1: { RoleID: 1 } + 2: { RoleID: 3 } + TeamAccessPolicies: + type: "object" + description: "Team access policies associated to a registry/endpoint/endpoint group. RoleID is not required for registry access policies and can be set to 0." + additionalProperties: + $ref: "#/definitions/AccessPolicy" + example: + 1: { RoleID: 1 } + 2: { RoleID: 3 } + AccessPolicy: + type: "object" + properties: + RoleID: + type: "integer" + example: "1" + description: "Role identifier. Reference the role that will be associated to this access policy" LDAPSettings: type: "object" properties: @@ -3416,40 +3438,10 @@ definitions: type: "string" example: "cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk=" description: "Azure authentication key" - EndpointAccessUpdateRequest: - type: "object" - properties: - AuthorizedUsers: - type: "array" - description: "List of user identifiers authorized to connect to this endpoint" - items: - type: "integer" - example: 1 - description: "User identifier" - AuthorizedTeams: - type: "array" - description: "List of team identifiers authorized to connect to this endpoint" - items: - type: "integer" - example: 1 - description: "Team identifier" - EndpointGroupAccessUpdateRequest: - type: "object" - properties: - AuthorizedUsers: - type: "array" - description: "List of user identifiers authorized to connect to this endpoint" - items: - type: "integer" - example: 1 - description: "User identifier" - AuthorizedTeams: - type: "array" - description: "List of team identifiers authorized to connect to this endpoint" - items: - type: "integer" - example: 1 - description: "Team identifier" + UserAccessPolicies: + $ref: "#/definitions/UserAccessPolicies" + TeamAccessPolicies: + $ref: "#/definitions/TeamAccessPolicies" RegistryCreateRequest: type: "object" required: @@ -3514,23 +3506,10 @@ definitions: type: "string" example: "registry_password" description: "Password used to authenticate against this registry" - RegistryAccessUpdateRequest: - type: "object" - properties: - AuthorizedUsers: - type: "array" - description: "List of user identifiers authorized to use thi registry" - items: - type: "integer" - example: 1 - description: "User identifier" - AuthorizedTeams: - type: "array" - description: "List of team identifiers authorized to use thi registry" - items: - type: "integer" - example: 1 - description: "Team identifier" + UserAccessPolicies: + $ref: "#/definitions/UserAccessPolicies" + TeamAccessPolicies: + $ref: "#/definitions/TeamAccessPolicies" ResourceControlCreateRequest: type: "object" required: @@ -3681,6 +3660,10 @@ definitions: type: "integer" example: 1 description: "Endpoint identifier" + UserAccessPolicies: + $ref: "#/definitions/UserAccessPolicies" + TeamAccessPolicies: + $ref: "#/definitions/TeamAccessPolicies" UserCreateRequest: type: "object" required: