Skip to content

Commit

Permalink
migrate back to canonical postman deps (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
sserrata authored Jul 1, 2024
1 parent 8ea889e commit 03f3c9a
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 132 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-openapi-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@docusaurus/plugin-content-docs": "^3.0.1",
"@docusaurus/utils": "^3.0.1",
"@docusaurus/utils-validation": "^3.0.1",
"@paloaltonetworks/openapi-to-postmanv2": "3.1.0-hotfix.1",
"@paloaltonetworks/postman-collection": "^4.1.0",
"openapi-to-postmanv2": "^4.21.0",
"postman-collection": "^4.4.0",
"@redocly/openapi-core": "^1.10.5",
"chalk": "^4.1.2",
"clsx": "^1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

declare module "@paloaltonetworks/openapi-to-postmanv2" {
declare module "openapi-to-postmanv2" {
export default any;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
import path from "path";

import { Globby, GlobExcludeDefault, posixPath } from "@docusaurus/utils";
import Converter from "@paloaltonetworks/openapi-to-postmanv2";
import sdk from "@paloaltonetworks/postman-collection";
import Collection from "@paloaltonetworks/postman-collection";
import chalk from "chalk";
import fs from "fs-extra";
import cloneDeep from "lodash/cloneDeep";
import kebabCase from "lodash/kebabCase";
import unionBy from "lodash/unionBy";
import uniq from "lodash/uniq";
import Converter from "openapi-to-postmanv2";
import Collection from "postman-collection";
import sdk from "postman-collection";

import { sampleRequestFromSchema } from "./createRequestExample";
import { OpenApiObject, TagGroupObject, TagObject } from "./types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

declare module "@paloaltonetworks/postman-collection" {
declare module "postman-collection" {
export default any;
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-openapi-docs/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import type Request from "@paloaltonetworks/postman-collection";
import type Request from "postman-collection";

import {
InfoObject,
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-openapi-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"dependencies": {
"@docusaurus/theme-common": "^3.0.1",
"@hookform/error-message": "^2.0.1",
"@paloaltonetworks/postman-code-generators": "1.1.15-patch.2",
"@paloaltonetworks/postman-collection": "^4.1.0",
"postman-code-generators": "^1.10.1",
"postman-collection": "^4.4.0",
"@reduxjs/toolkit": "^1.7.1",
"clsx": "^1.1.1",
"copy-text-to-clipboard": "^3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* ========================================================================== */

// TODO: Remove this when https://github.com/facebook/docusaurus/issues/6087 is resolved.
declare module "@paloaltonetworks/postman-code-generators";
declare module "postman-code-generators";
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import React, { useState, useEffect } from "react";

import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import codegen from "@paloaltonetworks/postman-code-generators";
import sdk from "@paloaltonetworks/postman-collection";
import ApiCodeBlock from "@theme/ApiExplorer/ApiCodeBlock";
import buildPostmanRequest from "@theme/ApiExplorer/buildPostmanRequest";
import CodeTabs from "@theme/ApiExplorer/CodeTabs";
import { useTypedSelector } from "@theme/ApiItem/hooks";
import merge from "lodash/merge";
import codegen from "postman-code-generators";
import sdk from "postman-collection";

import { CodeSample, Language } from "./code-snippets-types";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import React, { useState } from "react";

import { useDoc } from "@docusaurus/theme-common/internal";
import sdk from "@paloaltonetworks/postman-collection";
import Accept from "@theme/ApiExplorer/Accept";
import Authorization from "@theme/ApiExplorer/Authorization";
import Body from "@theme/ApiExplorer/Body";
Expand All @@ -27,6 +26,7 @@ import Server from "@theme/ApiExplorer/Server";
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
import { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import sdk from "postman-collection";
import { FormProvider, useForm } from "react-hook-form";

import makeRequest from "./makeRequest";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import sdk from "@paloaltonetworks/postman-collection";
import { Body } from "@theme/ApiExplorer/Body/slice";
import sdk from "postman-collection";

function fetchWithtimeout(
url: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import sdk from "@paloaltonetworks/postman-collection";
import { AuthState, Scheme } from "@theme/ApiExplorer/Authorization/slice";
import { Body, Content } from "@theme/ApiExplorer/Body/slice";
import {
ParameterObject,
ServerObject,
} from "docusaurus-plugin-openapi-docs/src/openapi/types";
import cloneDeep from "lodash/cloneDeep";
import sdk from "postman-collection";

type Param = {
value?: string | string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

import React from "react";

import sdk from "@paloaltonetworks/postman-collection";
import CodeSnippets from "@theme/ApiExplorer/CodeSnippets";
import Request from "@theme/ApiExplorer/Request";
import Response from "@theme/ApiExplorer/Response";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import sdk from "postman-collection";

function ApiExplorer({
item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

declare module "@paloaltonetworks/postman-collection" {
declare module "postman-collection" {
export = Request.sdk;
}
Loading

0 comments on commit 03f3c9a

Please sign in to comment.