Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A beautiful and fully-featured administration interface builder for hypermedia APIs

License

NotificationsYou must be signed in to change notification settings

SebLevDev/api-platform-admin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actionsnpm version

API Platform Admin is a tool to automatically create a beautiful (Material Design) and fully-featured administration interfacefor any API supportingthe Hydra Core Vocabulary or exposing anOpenAPI documentation,including but not limited to all APIs created usingthe API Platform framework.

Demo of API Platform Admin in action

The generated administration is a 100% standalone Single-Page-Application with no coupling to the server part, accordingto the API-first paradigm.

API Platform Admin parses Hydra or OpenAPI documentations, then uses the awesomeReact-adminlibrary (andReact) to expose a nice, responsive, management interface (Create-Retrieve-Update-Delete)for all available resources.

You can also customize all screens by using React-admin components and even raw JavaScript/React code.

Demo

Click here to test API Platform Admin in live.

The source code of the demo is availablein this repository.

Installation

yarn add @api-platform/admin

Usage

importReactfrom'react';importReactDOMfrom'react-dom';import{HydraAdmin,OpenApiAdmin}from'@api-platform/admin';// To use Hydra:constAdmin=()=><HydraAdminentrypoint="https://demo.api-platform.com"/>;// Replace with your own API entrypoint// To use OpenAPI (with a very simple REST data provider):constAdmin=()=><OpenApiAdmindocEntrypoint="https://demo.api-platform.com/docs.json"// Replace with your own OpenAPI documentation entrypointentrypoint="https://demo.api-platform.com"// Replace with your own API entrypoint/>;ReactDOM.render(<Admin/>,document.getElementById('root'));

Or alternatively:

importReactfrom'react';importReactDOMfrom'react-dom';import{AdminGuesser,hydraDataProvider,hydraSchemaAnalyzer,openApiDataProvider,openApiSchemaAnalyzer}from'@api-platform/admin';importsimpleRestProviderfrom'ra-data-simple-rest';// Use your custom data provider or resource schema analyzer// Hydra:constdataProvider=hydraDataProvider({entrypoint:'https://demo.api-platform.com'});constschemaAnalyzer=hydraSchemaAnalyzer();// OpenAPI:constdataProvider=openApiDataProvider({// Use any data provider you likedataProvider:simpleRestProvider('https://demo.api-platform.com'),entrypoint:'https://demo.api-platform.com',docEntrypoint:'https://demo.api-platform.com/docs.json',});constschemaAnalyzer=openApiSchemaAnalyzer();constAdmin=()=>(<AdminGuesserdataProvider={dataProvider}schemaAnalyzer={schemaAnalyzer}/>);ReactDOM.render(<Admin/>,document.getElementById('root'));

Features

  • Automatically generates an admin interface for all the resources of the API thanks to the hypermedia features of Hydra or to the OpenAPI documentation
  • Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
  • Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
  • Generates suitable inputs and fields according to Schema.org types if available (e.g. email field forhttp://schema.org/email)
  • Handles relationships
  • Supports pagination
  • Supports filters and ordering
  • Automatically validates whether a field is mandatory client-side according to the API description
  • Sends proper HTTP requests to the API and decodes them using Hydra and JSON-LD formats if available
  • Nicely displays server-side errors (e.g. advanced validation)
  • Supports real-time updates withMercure
  • All thefeatures provided by React-admin can also be used
  • 100% customizable

Documentation

The documentation of API Platform Admin can be browsedon the official website.

Check also the documentation of React-adminon their official website.

Credits

Created byKévin Dunglas. Sponsored byLes-Tilleuls.coop.Commercial support available upon request.

About

A beautiful and fully-featured administration interface builder for hypermedia APIs

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript94.7%
  • PHP2.4%
  • Dockerfile1.2%
  • JavaScript0.8%
  • Shell0.5%
  • Twig0.2%
  • MDX0.2%

[8]ページ先頭

©2009-2025 Movatter.jp