Skip to content

Commit

Permalink
fix(editor): adjust according to code review
Browse files Browse the repository at this point in the history
closes #214
  • Loading branch information
ostridm committed Sep 20, 2023
1 parent 0cf4d69 commit 874e4bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@apidevtools/json-schema-ref-parser": "^9.0.9",
"@har-sdk/core": "*",
"@har-sdk/validator": "*",
"@har-sdk/types": "*",
"@types/jsonpath": "^0.2.0",
"js-yaml": "^4.1.0",
"json-pointer": "^0.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
SpecTreeRequestBodyParam,
SpecTreeNodeParam
} from '../../../models';
import { isOASV2 } from '../../../utils';
import { BaseOasParameterObjectsParser } from '../BaseOasParameterObjectsParser';
import jsonPointer from 'json-pointer';
import { OpenAPIV2 } from '@har-sdk/core';
import { isOASV2 } from '@har-sdk/types';

export class OasV2ParameterObjectsParser extends BaseOasParameterObjectsParser<
OpenAPIV2.Document,
Expand Down
5 changes: 5 additions & 0 deletions packages/editor/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { OpenAPI, OpenAPIV2, OpenAPIV3 } from '@har-sdk/core';
export const isOASV2 = (doc: OpenAPI.Document): doc is OpenAPIV2.Document =>
'swagger' in doc;
export const isOASV3 = (doc: OpenAPI.Document): doc is OpenAPIV3.Document =>
'openapi' in doc;

0 comments on commit 874e4bf

Please sign in to comment.