Skip to content

Commit

Permalink
restructured swagger and changed path name
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwas1 committed Nov 13, 2023
1 parent 07c938a commit 70b4b6c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/app-auth/controllers/app-auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { TransformResponseInterceptor } from '../interceptors/transformResponse.
import { AuthenticatedGuard } from 'src/org-user/guard/authenticated.guard';

@UseFilters(AllExceptionsFilter)
@ApiTags('Super Admin')
@ApiTags('Application')
@Controller('/api/v1/app')
// @UseGuards(AuthenticatedGuard)
export class AppAuthController {
Expand Down
4 changes: 2 additions & 2 deletions src/app-oauth/app-oauth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
} from './dtos/generate-token.dto';

@UseFilters(AllExceptionsFilter)
@ApiTags('Super Admin')
@Controller('app')
@ApiTags('Application')
@Controller('/api/v1/app')
export class AppOauthController {
constructor(private readonly appAuthService: AppAuthService) {}

Expand Down
39 changes: 21 additions & 18 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ async function bootstrap() {
if (!existDir(process.env.EDV_CONFIG_DIR)) {
createDir(process.env.EDV_CONFIG_DIR);
}
if (!existDir(process.env.EDV_DID_FILE_PATH)) {
store(kmsVaultWallet.didDocument, process.env.EDV_DID_FILE_PATH);
const EDV_DID_FILE_PATH = `${process.env.EDV_CONFIG_DIR}/edv-did.json`
if (!existDir(EDV_DID_FILE_PATH)) {
store(kmsVaultWallet.didDocument, EDV_DID_FILE_PATH);
}
if (!existDir(process.env.EDV_KEY_FILE_PATH)) {
store(kmsVaultWallet.keys, process.env.EDV_KEY_FILE_PATH);

const EDV_KEY_FILE_PATH = `${process.env.EDV_CONFIG_DIR}/edv-keys.json`
if (!existDir(EDV_KEY_FILE_PATH)) {
store(kmsVaultWallet.keys, EDV_KEY_FILE_PATH);
}

const config = new ConfigService();
Expand Down Expand Up @@ -100,24 +103,24 @@ async function bootstrap() {
// Swagger documentation setup

const orgDocConfig = new DocumentBuilder()
.setTitle('Entity Studio SSI API Playground')
.setTitle('Entity Studio API')
.setDescription('Open API Documentation of the Entity Studio')
.setVersion('1.0')
.build();

const tenantDocConfig = new DocumentBuilder()
.setTitle('Entity Studio SSI API Playground')
.setDescription('Open API Documentation of the Entity Studio')
.addBearerAuth(
{
type: 'http',
name: 'Authorization',
in: 'header',
},
'Authorization',
)
.setVersion('1.0')
.build();
// const tenantDocConfig = new DocumentBuilder()
// .setTitle('Entity Studio SSI API Playground')
// .setDescription('Open API Documentation of the Entity Studio')
// .addBearerAuth(
// {
// type: 'http',
// name: 'Authorization',
// in: 'header',
// },
// 'Authorization',
// )
// .setVersion('1.0')
// .build();

// const tenantDocuments = SwaggerModule.createDocument(app, tenantDocConfig, {
// include: [
Expand Down
2 changes: 1 addition & 1 deletion src/user/controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { AuthenticatedGuard } from 'src/org-user/guard/authenticated.guard';
import { UserService } from '../services/user.service';

@UseFilters(AllExceptionsFilter)
@ApiTags('Super Admin')
@ApiTags('Authentication')
@Controller()
export class UserController {
constructor(private readonly userService: UserService) {}
Expand Down

0 comments on commit 70b4b6c

Please sign in to comment.