scitran/core

View on GitHub
swagger/paths/groups.yaml

Summary

Maintainability
Test Coverage
$template_arguments:
  resource: group
  tag: groups
  parameter: GroupId

/groups:
  get:
    summary: List all groups
    operationId: get_all_groups
    tags:
    - groups
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/groups-list.json
        examples:
          response:
            $ref: examples/output/groups-list.json
  post:
    summary: Add a group
    operationId: add_group
    tags:
    - groups
    parameters:
      - name: body
        in: body 
        required: true
        schema:
          $ref: schemas/input/group-new.json
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/group-new.json
      '400':
        $ref: '#/responses/400:invalid-body-json'
        
/groups/{GroupId}:
  parameters:
    - required: true
      type: string
      in: path
      name: GroupId
  get:
    summary: Get group info
    operationId: get_group
    tags:
    - groups
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/group.json
        examples:
          response:
            $ref: examples/output/group.json
  put:
    summary: Update group
    operationId: modify_group
    tags:
    - groups
    parameters:
      - in: body
        name: body
        required: true
        schema:
          $ref: schemas/input/group-update.json
    responses:
      '400':
        $ref: '#/responses/400:invalid-body-json'
  delete:
    summary: Delete a group
    operationId: delete_group
    tags:
    - groups
    responses:
      '200':
        $ref: '#/responses/200:deleted-with-count'

/groups/{GroupId}/projects:
  parameters:
    - required: true
      type: string
      in: path
      name: GroupId
  get:
    summary: Get all projects in a group
    operationId: get_group_projects
    tags:
    - groups
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/project-list.json
        examples:
          response:
            $ref: examples/output/project-list.json

# ===== Permissions =====
/groups/{GroupId}/permissions:
  $template: templates/permissions.yaml
/groups/{GroupId}/permissions/{UserId}:
  $template: templates/permissions-user.yaml

# ===== Tags =====
/groups/{GroupId}/tags:
  $template: templates/tags.yaml
/groups/{GroupId}/tags/{TagValue}:
  $template: templates/tags-tag.yaml