har-sdk

HAR SDK enables Node.js developers to easily work with HAR, convert it from OAS/Swagger and Postman collection, and more.

MIT License

Downloads
26K
Stars
9
Committers
8

Bot releases are visible (Hide)

har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/capture 1.2.0 (2021-11-09)

Features

har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/editor 1.0.0 (2021-11-09)

Features

har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/validator 2.0.1 (2021-11-09)

Bug Fixes

  • validator: quotes unification for property names in validation messages (#24) (cf190ab), closes #22
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/postman 2.0.1 (2021-11-09)

Dependencies

  • @har-sdk/validator: upgraded to 2.0.1
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/oas 2.0.1 (2021-11-09)

Dependencies

  • @har-sdk/validator: upgraded to 2.0.1
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/validator 2.0.0 (2021-11-08)

  • validator: humanized validation messages (#23) (7beee99), closes #23 #22

BREAKING CHANGES

  • The verify method has been reworked. In case of validation failure, the returned promise is resolved with an array of ErrorObject instances.

Before:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, Validator } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'http://localhost:3000',
  info: {
    title: 'Some valid API document',
    version: '1.0.0'
  },
  paths: {}
} as OpenAPIV2.Document;

const result = await new OASValidator().verify(doc);
console.log(result);
// {
//   valid: false,
//   errors: [
//     {
//       instancePath: '/info',
//       schemaPath: '#/required',
//       keyword: 'required',
//       params: { missingProperty: 'version' },
//       message: "must have required property 'version'"
//     }
//   ]
// }

After:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, ErrorHumanizer } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'localhost',
  info: {
    title: 'Some valid API document'
  },
  paths: {}
} as OpenAPIV2.Document;

const errors = await new OASValidator().verify(doc);
console.log(errors);
// [
//   {
//     instancePath: '/info',
//     schemaPath: '#/required',
//     keyword: 'required',
//     params: { missingProperty: 'version' },
//     message: "must have required property 'version'"
//   }
// ]
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/openapi-sampler 2.0.0 (2021-11-08)

  • validator: humanized validation messages (#23) (7beee99), closes #23 #22

BREAKING CHANGES

  • The verify method has been reworked. In case of validation failure, the returned promise is resolved with an array of ErrorObject instances.

Before:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, Validator } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'http://localhost:3000',
  info: {
    title: 'Some valid API document',
    version: '1.0.0'
  },
  paths: {}
} as OpenAPIV2.Document;

const result = await new OASValidator().verify(doc);
console.log(result);
// {
//   valid: false,
//   errors: [
//     {
//       instancePath: '/info',
//       schemaPath: '#/required',
//       keyword: 'required',
//       params: { missingProperty: 'version' },
//       message: "must have required property 'version'"
//     }
//   ]
// }

After:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, ErrorHumanizer } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'localhost',
  info: {
    title: 'Some valid API document'
  },
  paths: {}
} as OpenAPIV2.Document;

const errors = await new OASValidator().verify(doc);
console.log(errors);
// [
//   {
//     instancePath: '/info',
//     schemaPath: '#/required',
//     keyword: 'required',
//     params: { missingProperty: 'version' },
//     message: "must have required property 'version'"
//   }
// ]
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/oas 2.0.0 (2021-11-08)

  • validator: humanized validation messages (#23) (7beee99), closes #23 #22

BREAKING CHANGES

  • The verify method has been reworked. In case of validation failure, the returned promise is resolved with an array of ErrorObject instances.

Before:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, Validator } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'http://localhost:3000',
  info: {
    title: 'Some valid API document',
    version: '1.0.0'
  },
  paths: {}
} as OpenAPIV2.Document;

const result = await new OASValidator().verify(doc);
console.log(result);
// {
//   valid: false,
//   errors: [
//     {
//       instancePath: '/info',
//       schemaPath: '#/required',
//       keyword: 'required',
//       params: { missingProperty: 'version' },
//       message: "must have required property 'version'"
//     }
//   ]
// }

After:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, ErrorHumanizer } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'localhost',
  info: {
    title: 'Some valid API document'
  },
  paths: {}
} as OpenAPIV2.Document;

const errors = await new OASValidator().verify(doc);
console.log(errors);
// [
//   {
//     instancePath: '/info',
//     schemaPath: '#/required',
//     keyword: 'required',
//     params: { missingProperty: 'version' },
//     message: "must have required property 'version'"
//   }
// ]

Dependencies

  • @har-sdk/openapi-sampler: upgraded to 2.0.0
  • @har-sdk/validator: upgraded to 2.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk almost 3 years ago

@har-sdk/postman 2.0.0 (2021-11-08)

  • validator: humanized validation messages (#23) (7beee99), closes #23 #22

BREAKING CHANGES

  • The verify method has been reworked. In case of validation failure, the returned promise is resolved with an array of ErrorObject instances.

Before:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, Validator } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'http://localhost:3000',
  info: {
    title: 'Some valid API document',
    version: '1.0.0'
  },
  paths: {}
} as OpenAPIV2.Document;

const result = await new OASValidator().verify(doc);
console.log(result);
// {
//   valid: false,
//   errors: [
//     {
//       instancePath: '/info',
//       schemaPath: '#/required',
//       keyword: 'required',
//       params: { missingProperty: 'version' },
//       message: "must have required property 'version'"
//     }
//   ]
// }

After:

import { OpenAPIV2 } from '@har-sdk/types';
import { OASValidator, ErrorHumanizer } from '@har-sdk/validator';

const doc = {
  swagger: '2.0',
  host: 'localhost',
  info: {
    title: 'Some valid API document'
  },
  paths: {}
} as OpenAPIV2.Document;

const errors = await new OASValidator().verify(doc);
console.log(errors);
// [
//   {
//     instancePath: '/info',
//     schemaPath: '#/required',
//     keyword: 'required',
//     params: { missingProperty: 'version' },
//     message: "must have required property 'version'"
//   }
// ]

Dependencies

  • @har-sdk/validator: upgraded to 2.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk about 3 years ago

@har-sdk/postman 1.1.1 (2021-09-15)

Dependencies

  • @har-sdk/validator: upgraded to 1.0.1
har-sdk - @har-sdk/[email protected]

Published by derevnjuk about 3 years ago

@har-sdk/validator 1.0.1 (2021-09-15)

Bug Fixes

har-sdk - @har-sdk/[email protected]

Published by derevnjuk about 3 years ago

@har-sdk/openapi-sampler 1.1.1 (2021-09-15)

Bug Fixes

har-sdk - @har-sdk/[email protected]

Published by derevnjuk about 3 years ago

@har-sdk/oas 1.1.1 (2021-09-15)

Bug Fixes

Dependencies

  • @har-sdk/openapi-sampler: upgraded to 1.1.1
  • @har-sdk/validator: upgraded to 1.0.1
har-sdk - @har-sdk/[email protected]

Published by derevnjuk about 3 years ago

@har-sdk/capture 1.1.1 (2021-09-15)

Bug Fixes

har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/validator 1.0.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6

Dependencies

  • @har-sdk/types: upgraded to 1.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/types 1.0.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6
har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/postman 1.1.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6

Dependencies

  • @har-sdk/types: upgraded to 1.0.0
  • @har-sdk/validator: upgraded to 1.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/openapi-sampler 1.1.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6

Dependencies

  • @har-sdk/types: upgraded to 1.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/oas 1.1.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6

Dependencies

  • @har-sdk/openapi-sampler: upgraded to 1.1.0
  • @har-sdk/types: upgraded to 1.0.0
  • @har-sdk/validator: upgraded to 1.0.0
har-sdk - @har-sdk/[email protected]

Published by derevnjuk over 3 years ago

@har-sdk/capture 1.1.0 (2021-06-22)

Features

  • validator: introduce a schema validator (#7) (046fdf9), closes #6