openapi2html
Advanced tools
Comparing version 1.1.18 to 1.1.20
@@ -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; |
@@ -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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
991
36136
+ Addedhtml-react-parser@^2.0.0
+ Addeddom-serializer@1.4.1(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@4.3.1(transitive)
+ Addeddomutils@2.8.0(transitive)
+ Addedentities@2.2.03.0.1(transitive)
+ Addedhtml-dom-parser@2.0.0(transitive)
+ Addedhtml-react-parser@2.0.0(transitive)
+ Addedhtmlparser2@7.2.0(transitive)
+ Addedinline-style-parser@0.1.1(transitive)
+ Addedlinkify-it@4.0.1(transitive)
+ Addedmarkdown-it@13.0.2(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedreact-property@2.0.0(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedstyle-to-js@1.1.1(transitive)
+ Addedstyle-to-object@0.3.0(transitive)
- Removedreact-render-html@^0.6.0
- Removed@types/node@22.9.3(transitive)
- Removedentities@2.1.0(transitive)
- Removedlinkify-it@3.0.3(transitive)
- Removedmarkdown-it@12.3.2(transitive)
- Removedparse5@3.0.3(transitive)
- Removedreact@16.14.017.0.2(transitive)
- Removedreact-attr-converter@0.3.1(transitive)
- Removedreact-dom@17.0.2(transitive)
- Removedreact-render-html@0.6.0(transitive)
- Removedscheduler@0.20.2(transitive)
- Removedundici-types@6.19.8(transitive)
Updatedmarkdown-it@^13.0.1
Updatedprop-types@^15.8.1
Updatedreact@^18.2.0
Updatedreact-dom@^18.2.0