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
Copy file name to clipboardExpand all lines: admin/components.md
+78-46Lines changed: 78 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@
4
4
5
5
### AdminGuesser
6
6
7
-
`<AdminGuesser>` renders automatically an [Admin component](https://marmelab.com/react-admin/Admin.html) for resources exposed by a web API documented with any format supported by `@api-platform/api-doc-parser` (for Hydra documented APIs,
8
-
use the [HydraAdmin component](components.md#hydraadmin) instead).
7
+
`<AdminGuesser>` renders automatically an [Admin component](https://marmelab.com/react-admin/Admin.html) for resources exposed by a web API documented with any format supported by `@api-platform/api-doc-parser`
8
+
(for Hydra documented APIs, use the [HydraAdmin component](components.md#hydraadmin) instead,
9
+
for OpenAPI documented APIs, use the [OpenApiAdmin component](components.md#openapiadmin) instead).
9
10
It also creates a [schema analyzer](components.md#schema-analyzer) context, where the `schemaAnalyzer` service (for getting information about the provided API documentation) is stored.
10
11
11
12
`<AdminGuesser>` renders all exposed resources by default, but you can choose what resource you want to render by passing [ResourceGuesser components](components.md#resourceguesser) as children.
| entrypoint | string | - | yes | entrypoint of the API |
217
+
| mercure | object|boolean | * | no | configuration to use Mercure |
218
+
| dataProvider | object | dataProvider | no | hydra data provider to use |
219
+
220
+
\*`false` to explicitly disable, `true` to enable with default parameters or an object with the following properties:
221
+
-`hub`: the URL to your Mercure hub
222
+
-`jwt`: a subscriber JWT to access your Mercure hub
223
+
-`topicUrl`: the topic URL of your resources
224
+
225
+
### Hydra Data Provider
226
+
227
+
Based on React Admin `create`, `delete`, `getList`, `getManyReference`, `getOne`, `update` methods, the `dataProvider` is used by API Platform Admin to communicate with the API.
228
+
In addition, the specific `introspect` method parses your API documentation.
229
+
Note that the `dataProvider` can be overridden to fit your API needs.
230
+
231
+
### Hydra Schema Analyzer
232
+
233
+
Analyses your resources and retrieves their types according to the [Schema.org](https://schema.org) vocabulary.
234
+
235
+
## OpenAPI
236
+
237
+
### OpenApiAdmin
238
+
239
+
Creates a complete Admin, as [AdminGuesser](components.md#adminguesser), but configured specially for [OpenAPI](https://www.openapis.org/).
240
+
If you want to use other formats (see supported formats: `@api-platform/api-doc-parser`) use [AdminGuesser](components.md#adminguesser) instead.
| dataProvider | dataProvider | - | yes | data provider to use |
266
+
| docEntrypoint | string | - | yes | doc entrypoint of the API |
267
+
| entrypoint | string | - | yes | entrypoint of the API |
268
+
| mercure | object|boolean | * | no | configuration to use Mercure |
237
269
238
270
\*`false` to explicitly disable, `true` to enable with default parameters or an object with the following properties:
239
271
-`hub`: the URL to your Mercure hub
240
272
-`jwt`: a subscriber JWT to access your Mercure hub
241
273
-`topicUrl`: the topic URL of your resources
242
274
243
-
### Data Provider
275
+
### Open API Data Provider
244
276
245
277
Based on React Admin `create`, `delete`, `getList`, `getManyReference`, `getOne`, `update` methods, the `dataProvider` is used by API Platform Admin to communicate with the API.
246
278
In addition, the specific `introspect` method parses your API documentation.
247
279
Note that the `dataProvider` can be overridden to fit your API needs.
248
280
249
-
### Schema Analyzer
281
+
### Open API Schema Analyzer
250
282
251
283
Analyses your resources and retrieves their types according to the [Schema.org](https://schema.org) vocabulary.
Copy file name to clipboardExpand all lines: admin/customizing.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,10 @@ To do so, you can use the React components provided by API Platform Admin itself
6
6
7
7
## Customizing the Admin's Main Page and the Resource List
8
8
9
-
By default, API Platform Admin automatically builds a tailored [Resource component](https://marmelab.com/react-admin/Resource.html) (and all its appropriate children) for each resource type exposed by a web API.
10
-
Under the hood it uses the `@api-platform/api-doc-parser` library to parse the API documentation. The API documentation can use Hydra, OpenAPI and any other format supported by the library.
9
+
By default, API Platform Admin automatically builds a tailored [Resource component](https://marmelab.com/react-admin/Resource.html)
10
+
(and all its appropriate children) for each resource type exposed by a web API.
11
+
Under the hood it uses the `@api-platform/api-doc-parser` library to parse the API documentation.
12
+
The API documentation can use Hydra, OpenAPI and any other format supported by the library.
11
13
Resources are listed in the order they appear in the machine-readable documentation.
12
14
13
15
However, it's also possible to display only specific resources, and to order them, while still benefiting from all discovery features provided by API Platform Admin.
Copy file name to clipboardExpand all lines: admin/index.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@
2
2
3
3

4
4
5
-
API Platform Admin is a tool to automatically create a beautiful and fully featured administration interface
6
-
for any API supporting [the Hydra Core Vocabulary](http://www.hydra-cg.com/) or other API specification formats supported by [`@api-platform/api-doc-parser`](https://github.com/api-platform/api-doc-parser) (experimental support for [OpenAPI](https://www.openapis.org/) is also available).
5
+
API Platform Admin is a tool to automatically create a beautiful (Material Design) and fully-featured administration interface
6
+
for any API supporting [the Hydra Core Vocabulary](http://www.hydra-cg.com/), exposing an [OpenAPI documentation](https://www.openapis.org/)
7
+
or other API specification formats supported by [`@api-platform/api-doc-parser`](https://github.com/api-platform/api-doc-parser).
7
8
8
9
API Platform Admin is the perfect companion of APIs created
9
-
using [the API Platform framework](https://api-platform.com), but also supports APIs written with any other programming language or framework as long as they expose a standard Hydra API documentation.
10
+
using [the API Platform framework](https://api-platform.com), but also supports APIs written with any other programming language or framework as long as they expose a standard Hydra API documentation or an OpenAPI documentation.
10
11
11
12
API Platform Admin is a 100% standalone Single-Page-Application written in TypeScript with no coupling to the server part,
12
13
according to the API-first paradigm.
@@ -18,15 +19,16 @@ You can **customize everything** by using provided React Admin and [MUI](https:/
18
19
19
20
## Features
20
21
21
-
* Automatically generates an admin interface for all the resources of the API thanks to hypermedia features of Hydra
22
+
* Automatically generates an admin interface for all the resources of the API thanks to the hypermedia features of Hydra or to the OpenAPI documentation
22
23
* Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
23
24
* Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
24
25
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `http://schema.org/email`)
25
26
* Handles relationships
26
27
* Supports pagination
27
28
* Supports filters and ordering
28
29
* Automatically validates whether a field is mandatory client-side according to the API description
29
-
* Sends proper HTTP requests to the API and decodes them using Hydra and JSON-LD formats
30
+
* Sends proper HTTP requests to the API and decodes them using Hydra and JSON-LD formats if available
0 commit comments