
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@sauce-api/visualizer-ui
Advanced tools
A Swagger UI esque visualizer for Sauce API
Consuming in Sauce API would look similar to:
import { visualizerUI, setupVisualizerUI } from "@sauce-api/visualizer-ui";
setupVisualizerUI(this.app);
this.app.get("/docs", async (req, res, next)=>{
const appRoutes = await new Routes(sauceConfig)
.getFormattedRoutes(true);
const ui = await visualizerUI({
appRoutes,
appName: "Visualizer",
apiBaseUrl: process.env.REACT_APP_BASE_URL,
apiHealthcheckPath: process.env.REACT_APP_DOCS_HEALTHCHECK_ENDPOINT,
defaultTheme: "dark",
brandIcon: "bullseye",
brandImageUrl: "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg"
});
res.send(ui);
});
import { VisualizerConfig } from "./@types/VisualizerConfig";
const visualizerConfig = {
appRoutes: [],
appName: "Visualizer",
apiBaseUrl: process.env.REACT_APP_BASE_URL,
apiHealthcheckPath: process.env.REACT_APP_DOCS_HEALTHCHECK_ENDPOINT,
defaultTheme: "dark",
brandIcon: "bullseye",
brandImageUrl: "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg"
};
Config Property | Description |
---|---|
appRoutes | An Array of formatted Sauce API route objects. See Sauce API for details on formatted routes |
appName | The App name that will be displayed in the docs UI |
apiBaseUrl | The base URL for the API you're displaying docs for. Ex: https://<some-sauce-api>.com |
apiHealthcheckPath | If you have a healthcheck endpoint, you can supply it here and the UI will do a healthcheck for you. This value will be appended to the apiBaseUrl . Example: /healthcheck |
defaultTheme | The default theme to display |
brandIcon | You can supply a (free) font-awesome icon name here to display in the upper left corner. |
brandImageUrl | This is an alternative to the brandIcon value. You can supply your own image here to be displayed in the upper left corner |
Icon | Requirements |
---|---|
Admin Shield | Expects a route to have a policy named isAdmin |
Authentication Lock | Expects a route to have a policy named isAuthenticated |
(Requires Docker)
Run make run
and the app will come up on http://localhost:3001
Run make package
This project was bootstrapped with Create React App.
FAQs
A Swagger UI esque visualizer for Sauce API
The npm package @sauce-api/visualizer-ui receives a total of 2 weekly downloads. As such, @sauce-api/visualizer-ui popularity was classified as not popular.
We found that @sauce-api/visualizer-ui 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.