-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from mnfst/feature/api-doc
Display API Documentation (Swagger UI)
- Loading branch information
Showing
22 changed files
with
2,567 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
"metas", | ||
"mnfst", | ||
"nestjs", | ||
"openapi", | ||
"typeorm", | ||
"uniqid" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
describe('Open API (e2e)', () => { | ||
it('GET /api', async () => { | ||
const response = await global.request.get('/api') | ||
|
||
expect(response.status).toBe(200) | ||
expect(response.text).toContain('<html lang="en">') | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/core/manifest/src/auth/dtos/signup-authenticable-entity.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import { ApiProperty } from '@nestjs/swagger' | ||
import { IsEmail, IsNotEmpty } from 'class-validator' | ||
|
||
export class SignupAuthenticableEntityDto { | ||
@ApiProperty({ | ||
description: 'The email of the user', | ||
example: 'admin@manifest.build' | ||
}) | ||
@IsNotEmpty() | ||
@IsEmail() | ||
public email: string | ||
|
||
@ApiProperty({ | ||
description: 'The password of the user', | ||
example: 'admin' | ||
}) | ||
@IsNotEmpty() | ||
public password: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export default (): { paths: { admin: string } } => { | ||
export default (): { paths: { admin: string; database: string } } => { | ||
return { | ||
paths: { | ||
admin: `${process.cwd()}/node_modules/@mnfst/admin/dist` | ||
admin: `${process.cwd()}/node_modules/@mnfst/admin/dist`, | ||
database: `${process.cwd()}/manifest/backend.yml` | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.