Skip to content

Commit

Permalink
oa test t1
Browse files Browse the repository at this point in the history
  • Loading branch information
DumpySquare committed Dec 12, 2022
1 parent 76083e6 commit cde5811
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/suite/next_oai_validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs = require('fs');
import path = require('path');

import { OpenApiValidator } from 'openapi-data-validator';
import { OpenApiRequest } from 'openapi-data-validator/dist/framework/types';

const localOaiPath = path.join(__dirname, '..', '..', '..', 'openapi_nextCm_minor.json');
const apiSpec = JSON.parse(fs.readFileSync(localOaiPath).toString());
Expand All @@ -11,7 +12,7 @@ suite('NEXT CM OpenApi Schema Validation', () => {

test('simple validate', async () => {

const body = {
const reqBody = {
"address": "10.145.10.1",
"device_password": "admin",
"device_user": "admin",
Expand All @@ -21,10 +22,10 @@ suite('NEXT CM OpenApi Schema Validation', () => {
};


const req = {
const req: OpenApiRequest = {
method: "POST",
route: "/api/device/v1/inventory",
body
body: reqBody
};

const openApiValidator = new OpenApiValidator({
Expand Down

0 comments on commit cde5811

Please sign in to comment.