
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.
grand-swagger
Advanced tools
A grandjs helper package for generating swagger documentation from json
A grandjs helper package for generating swagger documentation from json
About Installing Usage Example Render Swagger Component
This package is developed for grandjs framework to allow you write swagger documentation for your Grandjs Application!
Tou Install Grand-swagger you just need to write the following command!
npm i grand-swagger
Grand Swagger exposed to you a simple jsx component that you can use to render your swagger documentation easily!
import {SwaggerComponent} from "grand-swagger";
To render Grand Swagger Component you can define a new route and in the handler you can use res.render
to render this component, this component takes the following properties
property | type | required | description |
---|---|---|---|
docs | object | true | this property is an object which implies your swagger documentation that you want to show |
import {Server, Router} from "grandjs"
import {SwaggerComponent} from "grand-swagger";
import docs from "./doc.json";
class MainRouter extends Router{}
const mainRouter = new MainRouter({base: "/"});
mainRouter.addRoute({
url: "/docs",
method: "GET",
handler: (req, res) => {
res.render(SwaggerComponent, {docs: docs})
}
})
FAQs
A grandjs helper package for generating swagger documentation from json
We found that grand-swagger 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.