Skip to content

Commit 7147921

Browse files
Merge pull request #675 from US-EPA-CAMD/develop
Sprint 22 Migration to Test
2 parents 09027a5 + 1ebc788 commit 7147921

File tree

67 files changed

+1035
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1035
-238
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@nestjs/swagger": "^11.1.5",
4141
"@nestjs/typeorm": "^11.0.0",
4242
"@types/multer": "^1.4.12",
43-
"@us-epa-camd/easey-common": "21.1.8",
43+
"@us-epa-camd/easey-common": "21.1.10",
4444
"axios": "^1.9.0",
4545
"class-transformer": "0.5.1",
4646
"class-validator": "0.14.1",

src/air-emission-testing-workspace/air-emission-testing-workspace.controller.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
import {
1111
ApiCreatedResponse, ApiOkResponse,
1212
ApiSecurity,
13-
ApiTags,
14-
} from '@nestjs/swagger';
13+
ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1514
import { AuditLog, RoleGuard, User } from '@us-epa-camd/easey-common/decorators';
1615
import { CurrentUser } from '@us-epa-camd/easey-common/interfaces';
1716
import {
@@ -29,6 +28,7 @@ import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.inter
2928
@ApiSecurity('APIKey')
3029
@ApiTags('Air Emission Testing')
3130
@ApiExcludeControllerByEnv()
31+
@ApiExtraModels(AirEmissionTestingDTO)
3232
export class AirEmissionTestingWorkspaceController {
3333
constructor(
3434
private readonly service: AirEmissionTestingWorkspaceService,
@@ -37,10 +37,21 @@ export class AirEmissionTestingWorkspaceController {
3737

3838
@Get()
3939
@ApiOkResponse({
40-
isArray: true,
41-
type: AirEmissionTestingRecordDTO,
4240
description:
4341
'Retrieves official Air Emission Testing records by Rata Summary Id',
42+
content: {
43+
'application/json': {
44+
schema: {
45+
type: 'object',
46+
properties: {
47+
items: {
48+
type: 'array',
49+
items: { $ref: getSchemaPath(AirEmissionTestingDTO) },
50+
},
51+
},
52+
},
53+
},
54+
}
4455
})
4556
@RoleGuard(
4657
{

src/air-emission-testing/air-emission-testing.controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
import { Controller, Get, Param } from '@nestjs/common';
2-
import { ApiOkResponse, ApiSecurity, ApiTags } from '@nestjs/swagger';
2+
import { ApiOkResponse, ApiSecurity, ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
33
import { AirEmissionTestingDTO } from '../dto/air-emission-test.dto';
44
import { AirEmissionTestingService } from './air-emission-testing.service';
55
import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.interface';
66

77
@Controller()
88
@ApiSecurity('APIKey')
99
@ApiTags('Air Emission Testing')
10+
@ApiExtraModels(AirEmissionTestingDTO)
1011
export class AirEmissionTestingController {
1112
constructor(private readonly service: AirEmissionTestingService) {}
1213

1314
@Get()
1415
@ApiOkResponse({
15-
isArray: true,
16-
type: AirEmissionTestingDTO,
1716
description:
1817
'Retrieves official Air Emission Testing records by Rata Summary Id',
18+
content: {
19+
'application/json': {
20+
schema: {
21+
type: 'object',
22+
properties: {
23+
items: {
24+
type: 'array',
25+
items: { $ref: getSchemaPath(AirEmissionTestingDTO) },
26+
},
27+
},
28+
},
29+
},
30+
}
1931
})
2032
async getAirEmissionsTestings(
2133
@Param('locId') _locationId: string,

src/app-e-correlation-test-run-workspace/app-e-correlation-test-run-workspace.controller.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
import {
1111
ApiCreatedResponse, ApiOkResponse,
1212
ApiSecurity,
13-
ApiTags,
14-
} from '@nestjs/swagger';
13+
ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1514
import { AuditLog, RoleGuard, User } from '@us-epa-camd/easey-common/decorators';
1615
import { CurrentUser } from '@us-epa-camd/easey-common/interfaces';
1716
import {
@@ -28,6 +27,7 @@ import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.inter
2827
@ApiSecurity('APIKey')
2928
@ApiTags('Appendix E Correlation Test Run')
3029
@ApiExcludeControllerByEnv()
30+
@ApiExtraModels(AppECorrelationTestRunBaseDTO)
3131
export class AppECorrelationTestRunWorkspaceController {
3232
constructor(
3333
private readonly service: AppECorrelationTestRunWorkspaceService,
@@ -36,10 +36,21 @@ export class AppECorrelationTestRunWorkspaceController {
3636

3737
@Get()
3838
@ApiOkResponse({
39-
isArray: true,
40-
type: AppECorrelationTestRunRecordDTO,
4139
description:
4240
'Retrieves aworkspace Appendix E Correlation Test Run records by Appendix E Correlation Test Summary Id',
41+
content: {
42+
'application/json': {
43+
schema: {
44+
type: 'object',
45+
properties: {
46+
items: {
47+
type: 'array',
48+
items: { $ref: getSchemaPath(AppECorrelationTestRunBaseDTO) },
49+
},
50+
},
51+
},
52+
},
53+
}
4354
})
4455
@RoleGuard(
4556
{

src/app-e-correlation-test-run/app-e-correlation-test-run.controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Controller, Get, Param } from '@nestjs/common';
2-
import { ApiOkResponse, ApiSecurity, ApiTags } from '@nestjs/swagger';
2+
import { ApiOkResponse, ApiSecurity, ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
33
import { AppECorrelationTestRunBaseDTO, AppECorrelationTestRunRecordDTO } from '../dto/app-e-correlation-test-run.dto';
44
import { AppECorrelationTestRunService } from './app-e-correlation-test-run.service';
55
import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.interface';
@@ -8,15 +8,27 @@ import { TestExtensionExemptionRecordDTO } from '../dto/test-extension-exemption
88
@Controller()
99
@ApiSecurity('APIKey')
1010
@ApiTags('Appendix E Correlation Test Run')
11+
@ApiExtraModels(AppECorrelationTestRunBaseDTO)
1112
export class AppECorrelationTestRunController {
1213
constructor(private readonly service: AppECorrelationTestRunService) {}
1314

1415
@Get()
1516
@ApiOkResponse({
16-
isArray: true,
17-
type: AppECorrelationTestRunRecordDTO,
1817
description:
1918
'Retrieves an official Appendix E Correlation Test Run records by Appendix E Correlation Test Summary Id',
19+
content: {
20+
'application/json': {
21+
schema: {
22+
type: 'object',
23+
properties: {
24+
items: {
25+
type: 'array',
26+
items: { $ref: getSchemaPath(AppECorrelationTestRunBaseDTO) },
27+
},
28+
},
29+
},
30+
},
31+
}
2032
})
2133
async getAppECorrelationTestRuns(
2234
@Param('locId') _locationId: string,

src/app-e-correlation-test-summary-workspace/app-e-correlation-test-summary-workspace.controller.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
import {
1111
ApiCreatedResponse, ApiOkResponse,
1212
ApiSecurity,
13-
ApiTags,
14-
} from '@nestjs/swagger';
13+
ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1514
import {
1615
AppECorrelationTestSummaryBaseDTO,
1716
AppECorrelationTestSummaryRecordDTO,
@@ -28,6 +27,7 @@ import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.inter
2827
@ApiSecurity('APIKey')
2928
@ApiTags('Appendix E Correlation Test Summary')
3029
@ApiExcludeControllerByEnv()
30+
@ApiExtraModels(AppECorrelationTestSummaryRecordDTO)
3131
export class AppendixETestSummaryWorkspaceController {
3232
constructor(
3333
private readonly service: AppECorrelationTestSummaryWorkspaceService,
@@ -36,10 +36,21 @@ export class AppendixETestSummaryWorkspaceController {
3636

3737
@Get()
3838
@ApiOkResponse({
39-
isArray: true,
40-
type: AppECorrelationTestSummaryRecordDTO,
4139
description:
4240
'Retrieves workspace Appendix E Correlation Test Summary records by Test Summary Id',
41+
content: {
42+
'application/json': {
43+
schema: {
44+
type: 'object',
45+
properties: {
46+
items: {
47+
type: 'array',
48+
items: { $ref: getSchemaPath(AppECorrelationTestSummaryRecordDTO) },
49+
},
50+
},
51+
},
52+
},
53+
}
4354
})
4455
@RoleGuard(
4556
{

src/app-e-correlation-test-summary/app-e-correlation-test-summary.controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
import { Controller, Param, Get } from '@nestjs/common';
2-
import { ApiOkResponse, ApiSecurity, ApiTags } from '@nestjs/swagger';
2+
import { ApiOkResponse, ApiSecurity, ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
33
import { AppECorrelationTestSummaryRecordDTO } from '../dto/app-e-correlation-test-summary.dto';
44
import { AppECorrelationTestSummaryService } from './app-e-correlation-test-summary.service';
55
import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.interface';
66

77
@Controller()
88
@ApiSecurity('APIKey')
99
@ApiTags('Appendix E Correlation Test Summary')
10+
@ApiExtraModels(AppECorrelationTestSummaryRecordDTO)
1011
export class AppendixETestSummaryController {
1112
constructor(private readonly service: AppECorrelationTestSummaryService) {}
1213

1314
@Get()
1415
@ApiOkResponse({
15-
isArray: true,
16-
type: AppECorrelationTestSummaryRecordDTO,
1716
description:
1817
'Retrieves Appendix E Correlation Test Summary records by Test Summary Id',
18+
content: {
19+
'application/json': {
20+
schema: {
21+
type: 'object',
22+
properties: {
23+
items: {
24+
type: 'array',
25+
items: { $ref: getSchemaPath(AppECorrelationTestSummaryRecordDTO) },
26+
},
27+
},
28+
},
29+
},
30+
}
1931
})
2032
async getAppECorrelations(
2133
@Param('locId') _locationId: string,

src/app-e-heat-input-from-gas-workspace/app-e-heat-input-from-gas-workspace.controller.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
ApiCreatedResponse, ApiExcludeController,
1212
ApiOkResponse,
1313
ApiSecurity,
14-
ApiTags,
15-
} from '@nestjs/swagger';
14+
ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1615
import { AuditLog, RoleGuard, User } from '@us-epa-camd/easey-common/decorators';
1716
import { CurrentUser } from '@us-epa-camd/easey-common/interfaces';
1817
import {
@@ -29,6 +28,7 @@ import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.inter
2928
@ApiSecurity('APIKey')
3029
@ApiTags('Appendix E Heat Input From Gas')
3130
@ApiExcludeControllerByEnv()
31+
@ApiExtraModels(AppEHeatInputFromGasRecordDTO)
3232
export class AppEHeatInputFromGasWorkspaceController {
3333
constructor(
3434
private readonly service: AppEHeatInputFromGasWorkspaceService,
@@ -37,10 +37,21 @@ export class AppEHeatInputFromGasWorkspaceController {
3737

3838
@Get()
3939
@ApiOkResponse({
40-
isArray: true,
41-
type: AppEHeatInputFromGasRecordDTO,
4240
description:
4341
'Retrieves a workspace Appendix E Heat Input From Gas records by Appendix E Correlation Test Run Id',
42+
content: {
43+
'application/json': {
44+
schema: {
45+
type: 'object',
46+
properties: {
47+
items: {
48+
type: 'array',
49+
items: { $ref: getSchemaPath(AppEHeatInputFromGasRecordDTO) },
50+
},
51+
},
52+
},
53+
},
54+
}
4455
})
4556
@RoleGuard(
4657
{

src/app-e-heat-input-from-gas/app-e-heat-input-from-gas.controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,35 @@ import {
77
Param,
88
Delete,
99
} from '@nestjs/common';
10-
import { ApiOkResponse, ApiSecurity, ApiTags } from '@nestjs/swagger';
10+
import { ApiOkResponse, ApiSecurity, ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1111
import { AppEHeatInputFromGasRecordDTO } from '../dto/app-e-heat-input-from-gas.dto';
1212
import { AppEHeatInputFromGasService } from './app-e-heat-input-from-gas.service';
1313
import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.interface';
1414

1515
@Controller()
1616
@ApiSecurity('APIKey')
1717
@ApiTags('Appendix E Heat Input From Gas')
18+
@ApiExtraModels(AppEHeatInputFromGasRecordDTO)
1819
export class AppEHeatInputFromGasController {
1920
constructor(private readonly service: AppEHeatInputFromGasService) {}
2021

2122
@Get()
2223
@ApiOkResponse({
23-
isArray: true,
24-
type: AppEHeatInputFromGasRecordDTO,
2524
description:
2625
'Retrieves a workspace Appendix E Heat Input From Gas records by Appendix E Correlation Test Run Id',
26+
content: {
27+
'application/json': {
28+
schema: {
29+
type: 'object',
30+
properties: {
31+
items: {
32+
type: 'array',
33+
items: { $ref: getSchemaPath(AppEHeatInputFromGasRecordDTO) },
34+
},
35+
},
36+
},
37+
},
38+
}
2739
})
2840
async getAppEHeatInputFromGases(
2941
@Param('locId') _locationId: string,

src/app-e-heat-input-from-oil-workspace/app-e-heat-input-from-oil.controller.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
import {
1111
ApiCreatedResponse, ApiOkResponse,
1212
ApiSecurity,
13-
ApiTags,
14-
} from '@nestjs/swagger';
13+
ApiTags, ApiExtraModels, getSchemaPath } from '@nestjs/swagger';
1514

1615
import { AuditLog, RoleGuard, User } from '@us-epa-camd/easey-common/decorators';
1716
import { CurrentUser } from '@us-epa-camd/easey-common/interfaces';
@@ -29,6 +28,7 @@ import { ArrayResponse } from '@us-epa-camd/easey-common/interfaces/common.inter
2928
@ApiSecurity('APIKey')
3029
@ApiTags('Appendix E Heat Input From Oil')
3130
@ApiExcludeControllerByEnv()
31+
@ApiExtraModels(AppEHeatInputFromOilRecordDTO)
3232
export class AppEHeatInputFromOilWorkspaceController {
3333
constructor(
3434
private readonly service: AppEHeatInputFromOilWorkspaceService,
@@ -37,10 +37,21 @@ export class AppEHeatInputFromOilWorkspaceController {
3737

3838
@Get()
3939
@ApiOkResponse({
40-
isArray: true,
41-
type: AppEHeatInputFromOilRecordDTO,
4240
description:
4341
'Retrieves workspace Appendix E Heat Input from Oil records by Appendix E CorrelationTestRun Id',
42+
content: {
43+
'application/json': {
44+
schema: {
45+
type: 'object',
46+
properties: {
47+
items: {
48+
type: 'array',
49+
items: { $ref: getSchemaPath(AppEHeatInputFromOilRecordDTO) },
50+
},
51+
},
52+
},
53+
},
54+
}
4455
})
4556
@RoleGuard(
4657
{

0 commit comments

Comments
 (0)