Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi2html

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi2html - npm Package Compare versions

Comparing version 1.1.18 to 1.1.20

5

build/components/Api.js

@@ -11,3 +11,3 @@ const React = require('react');

const Api = ({ api, options = {} }) => {
function Api({ api, options = {} }) {
const classname = 'o2h-api';

@@ -31,2 +31,3 @@ if (api.swagger !== '2.0') {

}, tagColorsGiven);
// eslint-disable-next-line react/jsx-no-constructed-context-values
const theme = { tagColors };

@@ -122,4 +123,4 @@

);
};
}
module.exports = Api;

4

build/components/Badges.js

@@ -5,3 +5,3 @@ const React = require('react');

const Badges = ({ tags = [], deprecated }) => {
function Badges({ tags = [], deprecated }) {
const classname = 'o2h-badges';

@@ -28,3 +28,3 @@ const badges = deprecated ? [...tags, 'deprecated'] : tags;

);
};
}

@@ -31,0 +31,0 @@ Badges.contextTypes = {

const React = require('react');
const Codes = ({ codes, labelIfEmpty }) => {
function Codes({ codes, labelIfEmpty }) {
const classname = 'o2h-codes';

@@ -27,4 +27,4 @@ if (!codes) return '';

);
};
}
module.exports = Codes;
const React = require('react');
const renderHtml = require('react-render-html');
const renderHtml = require('html-react-parser');
const md2html = require('markdown-it')({

@@ -9,3 +9,3 @@ html: true, // Enable HTML tags in source

const Description = ({ format = 'gfm', children = '', externalDocs = {} }) => {
function Description({ format = 'gfm', children = '', externalDocs = {} }) {
const classname = 'o2h-description';

@@ -28,7 +28,7 @@ const { url, description: text = url } = externalDocs;

{ className: classname },
renderHtml(React.createElement(
React.createElement(
'p',
null,
html
))
)
);

@@ -49,4 +49,4 @@ }

return '';
};
}
module.exports = Description;
const React = require('react');
const Link = ({ href, label }) => {
function Link({ href, label }) {
const classname = 'o2h-link';

@@ -18,4 +18,4 @@ if (!href) return '';

);
};
}
module.exports = Link;
const React = require('react');
const Badges = require('./Badges');
const Summary = ({ api }) => {
function Summary({ api }) {
const classname = 'o2h-summary';

@@ -52,4 +52,4 @@ const endpoints = [];

);
};
}
module.exports = Summary;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerDataType = type => {
function SwaggerDataType(type) {
const classname = 'o2h-data-type';

@@ -99,4 +99,4 @@ const extended = Object.keys(type).filter(key => key.match(/^x-/)); // e.g., `x-format`

);
};
}
module.exports = SwaggerDataType;
const React = require('react');
const SwaggerSchema = require('./SwaggerSchema');
const SwaggerDefinition = ({ name, schema }) => {
function SwaggerDefinition({ name, schema }) {
const classname = 'o2h-definition';

@@ -33,4 +33,4 @@ const anchor = `/definitions/${name}`;

);
};
}
module.exports = SwaggerDefinition;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerDefinitions = ({ definitions }) => {
function SwaggerDefinitions({ definitions }) {
const classname = 'o2h-definitions';

@@ -26,4 +26,4 @@ if (!definitions) return '';

);
};
}
module.exports = SwaggerDefinitions;
const React = require('react');
const stringify = require('json-stringify-safe');
const SwaggerExample = ({ example }) => {
function SwaggerExample({ example }) {
const classname = 'o2h-example';

@@ -27,4 +27,4 @@ return React.createElement(

);
};
}
module.exports = SwaggerExample;

@@ -9,3 +9,3 @@ const React = require('react');

const SwaggerOperation = ({ operation, path, details }) => {
function SwaggerOperation({ operation, path, details }) {
const classname = `o2h-operation o2h-operation-${operation}`;

@@ -79,4 +79,4 @@ const anchor = `/operations/${operation}${path}`;

);
};
}
module.exports = SwaggerOperation;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerParameter = ({ parameter }) => {
function SwaggerParameter({ parameter }) {
const classname = 'o2h-parameter';

@@ -34,4 +34,4 @@ const {

);
};
}
module.exports = SwaggerParameter;

@@ -6,3 +6,3 @@ const React = require('react');

const SwaggerParameters = ({ parameters }) => {
function SwaggerParameters({ parameters }) {
const classname = 'o2h-parameters';

@@ -42,4 +42,4 @@ if (!parameters || !parameters.length) return '';

);
};
}
module.exports = SwaggerParameters;
const React = require('react');
const SwaggerOperation = require('./SwaggerOperation');
const SwaggerPathItem = ({ path, item }) => {
function SwaggerPathItem({ path, item }) {
const classname = 'o2h-path-item';

@@ -12,4 +12,4 @@ const operations = Object.keys(item);

);
};
}
module.exports = SwaggerPathItem;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerPaths = ({ paths }) => {
function SwaggerPaths({ paths }) {
const classname = 'o2h-paths';

@@ -27,4 +27,4 @@ if (!paths) return '';

);
};
}
module.exports = SwaggerPaths;

@@ -6,3 +6,3 @@ const React = require('react');

const SwaggerResponse = ({ status, response }) => {
function SwaggerResponse({ status, response }) {
const classname = 'o2h-response';

@@ -26,4 +26,4 @@ const { description, schema, examples } = response;

);
};
}
module.exports = SwaggerResponse;
const React = require('react');
const SwaggerResponse = require('./SwaggerResponse');
const SwaggerResponses = ({ responses }) => {
function SwaggerResponses({ responses }) {
const classname = 'o2h-responses';

@@ -19,4 +19,4 @@ if (!responses) return '';

);
};
}
module.exports = SwaggerResponses;

@@ -6,3 +6,3 @@ const React = require('react');

const SwaggerSchema = ({ schema }) => {
function SwaggerSchema({ schema }) {
const classname = 'o2h-schema';

@@ -80,4 +80,4 @@ const {

);
};
}
module.exports = SwaggerSchema;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerSecurityDefinitions = ({ securityDefinitions }) => {
function SwaggerSecurityDefinitions({ securityDefinitions }) {
const classname = 'o2h-security-definitions';

@@ -27,4 +27,4 @@ if (!securityDefinitions) return '';

);
};
}
module.exports = SwaggerSecurityDefinitions;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerSecurityRequirement = ({ security, format = 'api' }) => {
function SwaggerSecurityRequirement({ security, format = 'api' }) {
const classname = 'o2h-security-requirement';

@@ -61,4 +61,4 @@ if (!security) return '';

);
};
}
module.exports = SwaggerSecurityRequirement;

@@ -5,3 +5,3 @@ const React = require('react');

const SwaggerSecurityScheme = ({ securityScheme }) => {
function SwaggerSecurityScheme({ securityScheme }) {
const classname = 'o2h-security-scheme';

@@ -72,4 +72,4 @@ const {

);
};
}
module.exports = SwaggerSecurityScheme;
{
"name": "openapi2html",
"version": "1.1.18",
"version": "1.1.20",
"description": "Yet another static html generator for Open API 2.0 / Swagger 2.0",

@@ -42,19 +42,19 @@ "main": "build/index.js",

"devDependencies": {
"@hapi/hapi": "^20.2.1",
"@babel/eslint-parser": "^7.18.2",
"@hapi/hapi": "^20.2.2",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"braces": ">=2.3.1",
"coveralls": "^3.1.1",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-react": "^7.26.1",
"eslint": "^8.19.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.30.1",
"glob-parent": "^6.0.2",
"html-entities": "^2.3.2",
"jest": "^27.3.1",
"nodemon": "^2.0.14",
"html-entities": "^2.3.3",
"jest": "^28.1.2",
"nodemon": "^2.0.18",
"npm-run-all": "^4.1.5",

@@ -67,10 +67,10 @@ "request": "^2.88.2",

"decamelize": "^5.0.0",
"html-react-parser": "^2.0.0",
"json-stringify-safe": "^5.0.1",
"markdown-it": "^12.2.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-render-html": "^0.6.0",
"markdown-it": "^13.0.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"validator": ">=13.7.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc