
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
swagger-definitions-to-react-proptypes
Advanced tools
CLI that generates React propType definitions from a swagger endpoint
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Critical CVE, High CVE, Socket optimized override available, Telemetry, and Unstable ownership
CLI that consumes a swagger endpoint and spits out React propType definitions.
npm install -g swagger-definitions-to-react-proptypes
or
yarn add --dev swagger-definitions-to-react-proptypes
swagger-definitions-to-react-proptypes http://petstore.swagger.io/v2/swagger.json
swagger-definitions-to-react-proptypes ./swagger.yml
./node_modules/bin/swagger-definitions-to-react-proptypes ./swagger.yml ./src/definitions.js
/**
Generated PropTypes for http://127.0.0.1:1337/petstore-v2.0.json
**/
import PropTypes from "prop-types";
export const Order = PropTypes.shape({
id: PropTypes.number,
petId: PropTypes.number,
quantity: PropTypes.number,
shipDate: PropTypes.date,
status: PropTypes.oneOf([
"placed",
"approved",
"delivered"
]),
complete: PropTypes.bool
});
export const Category = PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string
});
export const User = PropTypes.shape({
id: PropTypes.number,
username: PropTypes.string,
firstName: PropTypes.string,
lastName: PropTypes.string,
email: PropTypes.string,
password: PropTypes.string,
phone: PropTypes.string,
userStatus: PropTypes.number
});
export const Tag = PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string
});
export const ApiResponse = PropTypes.shape({
code: PropTypes.number,
type: PropTypes.string,
message: PropTypes.string
});
export const Pet = PropTypes.shape({
id: PropTypes.number,
category: PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string
}),
name: PropTypes.string.isRequired,
photoUrls: PropTypes.arrayOf(PropTypes.string).isRequired,
tags: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string
})),
status: PropTypes.oneOf([
"available",
"pending",
"sold"
]),
createdAt: PropTypes.date
});
FAQs
CLI that generates React propType definitions from a swagger endpoint
We found that swagger-definitions-to-react-proptypes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.