Skip to content

Commit

Permalink
add summaries to user api
Browse files Browse the repository at this point in the history
  • Loading branch information
IkeHunter committed Oct 1, 2024
1 parent 31002fe commit 896821e
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 155 deletions.
11 changes: 9 additions & 2 deletions server/docs/swagger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BASE_URL } from 'server/config'
import type { IGroup, IGroupFields } from 'server/models'
import type { IGroup, IGroupFields, IUser } from 'server/models'
import { ResponseCodes, formatJsonResponse } from 'server/utils'
import swaggerAutogen from 'swagger-autogen'

Expand Down Expand Up @@ -44,7 +44,14 @@ const doc = {
},
definitions: {
IGroupFields: { name: '', ownerId: '' } as IGroupFields,
IGroup: { id: '', name: '', ownerId: '' } as IGroup
IGroup: { id: '', name: '', ownerId: '' } as IGroup,
IUser: new class implements IUser {
id: string = 'some-id'
email: string = '[email protected]'
firstName?: string | undefined
lastName?: string | undefined
image?: string | undefined
}()
}
}
const generateResponseDocs = () => {
Expand Down
Loading

0 comments on commit 896821e

Please sign in to comment.