Skip to content

Commit

Permalink
Upgrade dependencies (#741)
Browse files Browse the repository at this point in the history
* upgrade deps

* address linter errors
  • Loading branch information
sserrata authored Mar 15, 2024
1 parent 88a8640 commit 506cc4b
Show file tree
Hide file tree
Showing 25 changed files with 3,631 additions and 2,978 deletions.
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,13 +5,13 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { MediaTypeObject } from "../openapi/types";
import { ApiItem } from "../types";
import { createDescription } from "./createDescription";
import { createMethodEndpoint } from "./createMethodEndpoint";
import { createRequestBodyDetails } from "./createRequestBodyDetails";
import { createStatusCodes } from "./createStatusCodes";
import { create } from "./utils";
import { MediaTypeObject } from "../openapi/types";
import { ApiItem } from "../types";

interface Props {
callbacks: ApiItem["callbacks"];
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 { 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 { ApiItem } from "../types";
import { createDetails } from "./createDetails";
import { createDetailsSummary } from "./createDetailsSummary";
import { create } from "./utils";
import { ApiItem } from "../types";

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,12 +5,12 @@
* 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";
import { createNodes } from "./createSchema";
import { create, guard } 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,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 @@ -16,6 +15,7 @@ import {
createResponseExamples,
} from "./createStatusCodes";
import { create, guard } 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 @@ -7,8 +7,8 @@

import * as prettier from "prettier";

import { SchemaObject } from "../openapi/types";
import { createNodes } from "./createSchema";
import { SchemaObject } from "../openapi/types";

describe("createNodes", () => {
it("should create readable MODs for oneOf primitive properties", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import clsx from "clsx";

import { SchemaObject } from "../openapi/types";
import {
createClosingArrayBracket,
createOpeningArrayBracket,
Expand All @@ -17,6 +16,7 @@ import { createDetails } from "./createDetails";
import { createDetailsSummary } from "./createDetailsSummary";
import { getQualifierMessage, getSchemaName } from "./schema";
import { create, guard } 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
24 changes: 12 additions & 12 deletions packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import {
ContactObject,
LicenseObject,
MediaTypeObject,
SecuritySchemeObject,
} from "../openapi/types";
import {
ApiPageMetadata,
InfoPageMetadata,
SchemaPageMetadata,
TagPageMetadata,
} from "../types";
import { createAuthentication } from "./createAuthentication";
import { createAuthorization } from "./createAuthorization";
import { createCallbacks } from "./createCallbacks";
Expand All @@ -37,6 +25,18 @@ import { createTermsOfService } from "./createTermsOfService";
import { createVendorExtensions } from "./createVendorExtensions";
import { createVersionBadge } from "./createVersionBadge";
import { create, greaterThan, lessThan, render } from "./utils";
import {
ContactObject,
LicenseObject,
MediaTypeObject,
SecuritySchemeObject,
} from "../openapi/types";
import {
ApiPageMetadata,
InfoPageMetadata,
SchemaPageMetadata,
TagPageMetadata,
} from "../types";

interface RequestBodyProps {
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import chalk from "chalk";
import merge from "lodash/merge";

import { mergeAllOf } from "../markdown/createSchema";
import { SchemaObject } from "./types";
import { mergeAllOf } from "../markdown/createSchema";

interface OASTypeToTypeMap {
string: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import chalk from "chalk";
import merge from "lodash/merge";

import { mergeAllOf } from "../markdown/createSchema";
import { SchemaObject } from "./types";
import { mergeAllOf } from "../markdown/createSchema";

interface OASTypeToTypeMap {
string: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import kebabCase from "lodash/kebabCase";
import unionBy from "lodash/unionBy";
import uniq from "lodash/uniq";

import { sampleRequestFromSchema } from "./createRequestExample";
import { OpenApiObject, TagGroupObject, TagObject } from "./types";
import { loadAndResolveSpec } from "./utils/loadAndResolveSpec";
import { isURL } from "../index";
import {
ApiMetadata,
Expand All @@ -28,9 +31,6 @@ import {
SidebarOptions,
TagPageMetadata,
} from "../types";
import { sampleRequestFromSchema } from "./createRequestExample";
import { OpenApiObject, TagGroupObject, TagObject } from "./types";
import { loadAndResolveSpec } from "./utils/loadAndResolveSpec";

/**
* Convenience function for converting raw JSON to a Postman Collection object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import chalk from "chalk";
// @ts-ignore
import { convertObj } from "swagger2openapi";

import { OpenApiObject } from "../types";
import { OpenAPIParser } from "./services/OpenAPIParser";
import { OpenApiObject } from "../types";

function serializer(replacer: any, cycleReplacer: any) {
var stack: any = [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

// @ts-nocheck

import { RedocNormalizedOptions } from "./RedocNormalizedOptions";
import { OpenAPIRef, OpenAPISchema, OpenAPISpec, Referenced } from "../types";
import { isArray, isBoolean } from "../utils/helpers";
import { JsonPointer } from "../utils/JsonPointer";
import { getDefinitionName, isNamedDefinition } from "../utils/openapi";
import { RedocNormalizedOptions } from "./RedocNormalizedOptions";

export type MergedOpenAPISchema = OpenAPISchema & { parentRefs?: string[] };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

import { dirname } from "path";

import {
isNumeric,
removeQueryString,
resolveUrl,
isArray,
isBoolean,
} from "./helpers";
import { OpenAPIParser } from "../services/OpenAPIParser";
import {
OpenAPIEncoding,
Expand All @@ -21,13 +28,6 @@ import {
OpenAPIServer,
Referenced,
} from "../types";
import {
isNumeric,
removeQueryString,
resolveUrl,
isArray,
isBoolean,
} from "./helpers";

function isWildcardStatusCode(
statusCode: string | number
Expand Down
2 changes: 1 addition & 1 deletion scripts/changelog-beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import pkg from "../lerna.json";
import { getOutput } from "./utils/get-output";
import { printBanner, printSpacer } from "./utils/print-utils";
import pkg from "../lerna.json";

const ORG = "PaloAltoNetworks";
const REPO = "docusaurus-openapi-docs";
Expand Down
2 changes: 1 addition & 1 deletion scripts/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import pkg from "../lerna.json";
import { getOutput } from "./utils/get-output";
import { printBanner, printSpacer } from "./utils/print-utils";
import pkg from "../lerna.json";

const ORG = "PaloAltoNetworks";
const REPO = "docusaurus-openapi-docs";
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-pr-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { version } from "../lerna.json";
import { getOutput } from "./utils/get-output";
import { version } from "../lerna.json";

// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { execSync } from "child_process";
import fs from "fs";
import path from "path";

import { version } from "../lerna.json";
import { createDryRun } from "./utils/dry-run";
import { getOutput } from "./utils/get-output";
import { printBanner } from "./utils/print-utils";
import { version } from "../lerna.json";

const ORG = "PaloAltoNetworks";
const REPO = "docusaurus-openapi-docs";
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { execSync } from "child_process";
import fs from "fs";
import path from "path";

import { version } from "../lerna.json";
import { createDryRun } from "./utils/dry-run";
import { getOutput } from "./utils/get-output";
import { printBanner } from "./utils/print-utils";
import { version } from "../lerna.json";

const ORG = "PaloAltoNetworks";
const REPO = "docusaurus-openapi-docs";
Expand Down
Loading

0 comments on commit 506cc4b

Please sign in to comment.