Co-authored-by: Tianxiang Chen <tianxchen@microsoft.com>
This commit is contained in:
tianxchen-ms 2022-07-25 11:43:30 +08:00 коммит произвёл GitHub
Родитель 1a4e303380
Коммит f37550d3cb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -92,7 +92,6 @@ export interface NewmanReportValidatorOption extends ApiScenarioLoaderOption {
markdown?: boolean;
junit?: boolean;
html?: boolean;
specPathPrefix?: string;
baseUrl?: string;
runId?: string;
validationLevel?: ValidationLevel;

Просмотреть файл

@ -49,7 +49,6 @@ export interface PostmanCollectionGeneratorOption
markdown?: boolean;
junit?: boolean;
html?: boolean;
specPathPrefix: string;
runCollection: boolean;
generateCollection: boolean;
baseUrl: string;
@ -248,7 +247,13 @@ export class PostmanCollectionGenerator {
const operationCoverageResult: OperationCoverageInfo[] = [];
operationIdCoverageResult.forEach((result, key) => {
const specPath = this.fileLoader.resolvePath(key);
let specPath = this.fileLoader.resolvePath(key);
if (process.env.REPORT_SPEC_PATH_PREFIX) {
specPath = path.join(
process.env.REPORT_SPEC_PATH_PREFIX,
specPath.substring(specPath.indexOf("specification"))
);
}
operationCoverageResult.push({
totalOperations: result.totalOperationNumber,
spec: specPath,
@ -283,8 +288,7 @@ export class PostmanCollectionGenerator {
const options: TrafficValidationOptions = {
reportPath: path.resolve(reportExportPath, "report.html"),
overrideLinkInReport: this.opt.specPathPrefix !== undefined,
specLinkPrefix: this.opt.specPathPrefix,
overrideLinkInReport: false,
sdkPackage: providerNamespace,
};
@ -440,7 +444,6 @@ export class PostmanCollectionGenerator {
markdown: this.opt.markdown,
junit: this.opt.junit,
html: this.opt.html,
specPathPrefix: this.opt.specPathPrefix,
baseUrl: this.opt.baseUrl,
runId: this.opt.runId,
validationLevel: this.opt.validationLevel,

Просмотреть файл

@ -55,10 +55,6 @@ export const builder: yargs.CommandBuilder = {
describe: "Generate report type. Supported types: html, markdown, junit",
type: "array",
},
specPathPrefix: {
describe: "The prefix of spec path in reports.",
string: true,
},
level: {
describe:
"Validation level. oav runner validate request and response with different strict level. 'validate-request' validates requests should be successful. 'validate-request-response' validate both request and response.",
@ -206,7 +202,6 @@ export async function handler(argv: yargs.Arguments): Promise<void> {
markdown: (argv.report ?? []).includes("markdown"),
junit: (argv.report ?? []).includes("junit"),
html: (argv.report ?? []).includes("html"),
specPathPrefix: argv.specPathPrefix,
eraseXmsExamples: false,
eraseDescription: false,
baseUrl: argv.armEndpoint,