Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: yarn
Expand All @@ -33,8 +33,8 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
- name: Installation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/canary-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
if: ${{ github.repository == 'PaloAltoNetworks/docusaurus-openapi-docs' && github.ref == 'refs/heads/v2.0.0' && github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
if: ${{ github.repository == 'PaloAltoNetworks/docusaurus-openapi-docs' && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/combine-dependabot-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: github.repository_owner == 'PaloAltoNetworks'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
- uses: actions/github-script@v4
id: fetch-branch-names
name: Fetch dependabot branches
with:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
APP_PEM: ${{ secrets.APP_PEM }}
APP_ID: ${{ secrets.APP_ID }}

- uses: actions/github-script@v3
- uses: actions/github-script@v4
name: Create Combined Pull Request
env:
PRS_STRING: ${{ steps.fetch-branch-names.outputs.prs-string }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Build site
run: yarn build-demo && zip -r build.zip demo/build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build
path: build.zip
Expand All @@ -41,15 +41,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -89,12 +89,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
Expand All @@ -108,7 +108,7 @@ jobs:
- name: Build site
run: yarn build-demo && zip -r build.zip demo/build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build
path: build.zip
Expand All @@ -121,15 +121,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -59,7 +59,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -79,7 +79,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
node_modules
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@mxenabled/docusaurus-plugin-openapi-docs": "^2.0.3",
"@mxenabled/docusaurus-theme-openapi-docs": "^2.0.3",
"clsx": "^1.1.1",
"prism-react-renderer": "^2.1.0",
"prism-react-renderer": "^1.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
"ts-node": "^10.4.0",
"typescript": "^4.4.4"
},
"resolutions": {
"convert-source-map": "^2.0.0"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { OAuthFlowObject, SecuritySchemeObject } from "../openapi/types";
import { createDescription } from "./createDescription";
import { create, guard } from "./utils";
import { OAuthFlowObject, SecuritySchemeObject } from "../openapi/types";

export function createAuthentication(securitySchemes: SecuritySchemeObject) {
if (!securitySchemes || !Object.keys(securitySchemes).length) return "";
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 { ContactObject } from "../openapi/types";
import { create, guard } from "./utils";
import { ContactObject } from "../openapi/types";

export function createContactInfo(contact: ContactObject) {
if (!contact || !Object.keys(contact).length) return "";
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 { ApiPageMetadata } from "../types";
import { create } from "./utils";
import { ApiPageMetadata } from "../types";

type Method = Pick<ApiPageMetadata, "api">["api"]["method"];
type Path = Pick<ApiPageMetadata, "api">["api"]["path"];
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 { LicenseObject } from "../openapi/types";
import { create, guard } from "./utils";
import { LicenseObject } from "../openapi/types";

export function createLicense(license: LicenseObject) {
if (!license || !Object.keys(license).length) return "";
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 { LogoObject } from "../openapi/types";
import { create, guard } from "./utils";
import { LogoObject } from "../openapi/types";

export function createLogo(
logo: LogoObject | undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { create } from "./utils";
import { ApiItem } from "../types";
// import { createDetails } from "./createDetails";
// import { createDetailsSummary } from "./createDetailsSummary";
import { create } from "./utils";

interface Props {
parameters: ApiItem["parameters"];
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 { MediaTypeObject } from "../openapi/types";
import { createRequestSchema } from "./createRequestSchema";
import { MediaTypeObject } from "../openapi/types";

interface Props {
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { MediaTypeObject, SchemaObject } from "../openapi/types";
import { createDescription } from "./createDescription";
import { createNodes } from "./createSchema";
import { create } from "./utils";
import { MediaTypeObject, SchemaObject } from "../openapi/types";

interface Props {
style?: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { MediaTypeObject } from "../openapi/types";
import { createDescription } from "./createDescription";
// import { createDetails } from "./createDetails";
// import { createDetailsSummary } from "./createDetailsSummary";
Expand All @@ -17,6 +16,7 @@ import { getRequestBody as getResponseBody } from "./createRequestSchema";
// createResponseExamples,
// } from "./createStatusCodes";
import { create } from "./utils";
import { MediaTypeObject } from "../openapi/types";

interface Props {
style?: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { SchemaObject } from "../openapi/types";
import { createDescription } from "./createDescription";
import { getQualifierMessage, getSchemaName } from "./schema";
import { create } from "./utils";
import { SchemaObject } from "../openapi/types";

const jsonSchemaMergeAllOf = require("json-schema-merge-allof");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import format from "xml-formatter";

import { sampleResponseFromSchema } from "../openapi/createResponseExample";
import { ApiItem } from "../types";
import { createDescription } from "./createDescription";
import { createDetails } from "./createDetails";
import { createDetailsSummary } from "./createDetailsSummary";
import { createResponseSchema } from "./createResponseSchema";
import { create } from "./utils";
import { guard } from "./utils";
import { sampleResponseFromSchema } from "../openapi/createResponseExample";
import { ApiItem } from "../types";

export default function json2xml(o: any, tab: any) {
var toXml = function (v: any, name: string, ind: any) {
Expand Down
14 changes: 7 additions & 7 deletions packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import {
ContactObject,
LicenseObject,
// MediaTypeObject,
SecuritySchemeObject,
} from "../openapi/types";
import { ApiPageMetadata, InfoPageMetadata, TagPageMetadata } from "../types";
import { createAuthentication } from "./createAuthentication";
import { createContactInfo } from "./createContactInfo";
// import { createDeprecationNotice } from "./createDeprecationNotice";
Expand All @@ -28,6 +21,13 @@ import { createTermsOfService } from "./createTermsOfService";
// import { createVendorExtensions } from "./createVendorExtensions";
import { createVersionBadge } from "./createVersionBadge";
import { greaterThan, lessThan, render } from "./utils";
import {
ContactObject,
LicenseObject,
// MediaTypeObject,
SecuritySchemeObject,
} from "../openapi/types";
import { ApiPageMetadata, InfoPageMetadata, TagPageMetadata } from "../types";

// interface Props {
// title: string;
Expand Down
Loading
Loading