Skip to content

Commit

Permalink
Merge pull request #56 from ufosc/feature/api-docs
Browse files Browse the repository at this point in the history
Feature/api docs
  • Loading branch information
IkeHunter authored Oct 1, 2024
2 parents 7397971 + 896821e commit 5b52906
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 5b52906

Please sign in to comment.