Skip to content

Add OpenAPI descriptions to group endpoints #419

Description

@tompscanlan

Problem

Some API endpoints lack detailed OpenAPI/Swagger descriptions, making the API harder to understand for developers.

Solution

Add @ApiOperation, @ApiResponse, and @ApiParam decorators to group-related endpoints.

Files to modify

  • src/group/group.controller.ts
  • src/group-member/group-member.controller.ts

Example

@Get(':slug')
@ApiOperation({ 
  summary: 'Get group by slug',
  description: 'Retrieves a group by its URL slug. Returns group details including member count and upcoming events.'
})
@ApiParam({ name: 'slug', description: 'URL-friendly group identifier' })
@ApiResponse({ status: 200, description: 'Group found' })
@ApiResponse({ status: 404, description: 'Group not found' })
async findBySlug(@Param('slug') slug: string) {
  // ...
}

How to verify

Visit /api/docs after making changes to see updated Swagger documentation.

Acceptance Criteria

  • All group endpoints have @ApiOperation with summary and description
  • Path parameters have @ApiParam decorators
  • Common responses (200, 400, 404, 401) are documented

Difficulty: Easy - great for learning NestJS patterns

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions