3.0.40 • Published 6 months ago

@visulima/api-platform v3.0.40

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

OpenAPI (Swagger) specification, node-rate-limiter-flexible, @visulima/connect

With a more intuitive API for creating HTTP API endpoints.

typescript-image npm-image license-image



Features

Installation

Npm

npm install @visulima/api-platform zod

Installation for Next.js

npm install @visulima/api-platform zod @visulima/fs

Yarn

yarn add @visulima/api-platform zod

Installation for Next.js

yarn add @visulima/api-platform zod @visulima/fs

Pnpm

pnpm add @visulima/api-platform zod

Installation for Next.js

pnpm add @visulima/api-platform zod @visulima/fs

To use the swagger-ui or the redoc-ui you need to install the following packages:

npm install swagger-ui-react

To have a styled version of the swagger-ui you need to add the following css to your project:

import "swagger-ui-react/swagger-ui.css";

Note: For next.js you can add it to your _app.tsx file

Or

npm install redoc

Usage

CLI:

To use the CLI, you need to install this missing packages:

npm install cli-progress commander chalk
yarn add cli-progress commander chalk
pnpm add cli-progress commander chalk

Then you can use the CLI like this:

// Shows the help with all available commands

pnpm api-platform --help

connect

This package has an extended version of the @visulima/connect package. That means you can use all the features of the @visulima/connect package, in addition to the features of this package.

// pages/api/hello.js
import type { NextApiRequest, NextApiResponse } from "next";
import { createNodeRouter } from "@visulima/api-platform";
import cors from "cors";

// Default Req and Res are IncomingMessage and ServerResponse
// You may want to pass in NextApiRequest and NextApiResponse
const router = createNodeRouter<NextApiRequest, NextApiResponse>();

router.get((req, res) => {
    res.send("Hello world");
});

export default router.nodeHandler();

Supported Node.js Versions

Libraries in this ecosystem make the best effort to track Node.js’ release schedule. Here’s a post on why we think this is important.

Contributing

If you would like to help take a look at the list of issues and check our Contributing guild.

Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Credits

License

The visulima api-platform is open-sourced software licensed under the MIT

typescript-url: https://www.typescriptlang.org/ "TypeScript" "typescript"

3.0.40

6 months ago

3.0.39

6 months ago

3.0.34

7 months ago

3.0.35

7 months ago

3.0.38

6 months ago

3.0.36

7 months ago

3.0.37

7 months ago

3.0.32

8 months ago

3.0.33

8 months ago

3.0.30

8 months ago

3.0.31

8 months ago

3.0.29

8 months ago

3.0.28

8 months ago

3.0.27

9 months ago

3.0.26

10 months ago

3.0.23

11 months ago

3.0.24

11 months ago

3.0.25

11 months ago

3.0.22

11 months ago

3.0.17

1 year ago

3.0.21

12 months ago

3.0.20

12 months ago

3.0.18

12 months ago

3.0.19

12 months ago

3.0.16

1 year ago

3.0.15

1 year ago

3.0.14

1 year ago

3.0.12

1 year ago

3.0.13

1 year ago

3.0.10

1 year ago

3.0.11

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.9

1 year ago

3.0.5

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.39

1 year ago

2.0.37

1 year ago

2.0.38

1 year ago

2.0.36

1 year ago

2.0.35

1 year ago

2.0.33

1 year ago

2.0.34

1 year ago

2.0.31

1 year ago

2.0.32

1 year ago

2.0.28

1 year ago

2.0.29

1 year ago

2.0.30

1 year ago

2.0.27

1 year ago

2.0.26

1 year ago

2.0.24

1 year ago

2.0.25

1 year ago

2.0.22

1 year ago

2.0.23

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

2.0.19

2 years ago

2.0.18

2 years ago

2.0.17

2 years ago

2.0.16

2 years ago

2.0.15

2 years ago

2.0.14

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.13

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.11

2 years ago

2.0.7

2 years ago

2.0.12

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.13

2 years ago

1.2.14

2 years ago

1.2.15

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.9

2 years ago

1.2.12

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago