You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API Platform Client Generator is a generator to scaffold app with Create-Retrieve-Update-Delete features for any API exposing a [Hydra](http://www.hydra-cg.com/spec/latest/core/) or [OpenAPI](https://www.openapis.org/) documentation for:
7
-
* Quasar Framework
8
-
* Next.js
9
-
* React/Redux
10
-
* React Native
11
-
* TypeScript Interfaces
12
-
* Vue.js
13
-
* Vuetify.js
7
+
8
+
* Next.js
9
+
* Nuxt.js
10
+
* Quasar Framework
11
+
* React/Redux
12
+
* React Native
13
+
* TypeScript Interfaces
14
+
* Vue.js
15
+
* Vuetify.js
14
16
15
17
Works especially well with APIs built with the [API Platform](https://api-platform.com) framework.
16
18
17
19
## Documentation
18
20
19
21
The documentation of API Platform's Client Generator can be browsed [on the official website](https://api-platform.com/docs/client-generator).
20
22
21
-
## Usage
22
-
23
-
**Hydra**
24
-
```sh
25
-
npx @api-platform/client-generator https://demo.api-platform.com/ output/ --resource Book
26
-
```
27
-
28
-
**OpenAPI v2 (formerly known as Swagger)** (experimental)
29
-
```sh
30
-
npx @api-platform/client-generator https://demo.api-platform.com/docs.json output/ --resource Book --format swagger
31
-
```
32
-
33
-
or
34
-
35
-
```sh
36
-
npx @api-platform/client-generator https://demo.api-platform.com/docs.json output/ --resource Book --format openapi2
37
-
```
38
-
39
-
**OpenAPI v3** (experimental)
40
-
```sh
41
-
npx @api-platform/client-generator https://demo.api-platform.com/docs.json?spec_version=3 output/ --resource Book --format openapi3
42
-
```
43
-
44
23
## Features
45
24
46
-
* Generate high-quality ES6 components and files built with [React](https://facebook.github.io/react/), [Redux](http://redux.js.org), [React Router](https://reacttraining.com/react-router/) and [Redux Form](http://redux-form.com/) including:
47
-
*A list view
48
-
*A creation form
49
-
*An editing form
50
-
*A deletion button
51
-
* Use the Hydra or Swagger API documentation to generate the code
25
+
* Generate high-quality TypeScript or ES6 components:
26
+
*List view
27
+
*Creation form
28
+
*Editing form
29
+
*Deletion button
30
+
* Use the Hydra or OpenAPI documentations to generate the code
52
31
* Generate the suitable HTML5 input type (`number`, `date`...) according to the type of the API property
53
32
* Display of the server-side validation errors under the related input (if using API Platform Core)
54
33
* Client-side validation (`required` attributes)
55
34
* The generated HTML is compatible with [Bootstrap](https://getbootstrap.com/) and includes mandatory classes
56
35
* The generated HTML code is accessible to people with disabilities ([ARIA](https://www.w3.org/WAI/intro/aria) support)
57
-
* The Redux and the React Router configuration is also generated
36
+
37
+
38
+
## Usage
39
+
40
+
### Hydra
41
+
42
+
npx @api-platform/client-generator https://demo.api-platform.com/ output/ --resource Book
43
+
44
+
### OpenAPI v3 (experimental)
45
+
46
+
npx @api-platform/client-generator https://demo.api-platform.com/docs.json?spec_version=3 output/ --resource Book --format openapi3
47
+
48
+
### OpenAPI v2 (formerly known as Swagger, deprecated)
49
+
50
+
npx @api-platform/client-generator https://demo.api-platform.com/docs.json?spec_version=2 output/ --resource Book --format openapi2
0 commit comments