client-generator

Generate React or Vue.js-based Progressive Web Apps from an Hydra-enabled API. Also support React Native.

Github星跟蹤圖

API Platform Client Generator

Build Status
npm version

API Platform Client Generator is a generator to scaffold app with Create-Retrieve-Update-Delete features for any API exposing a Hydra or OpenAPI documentation for:

  • React/Redux
  • React Native
  • Vue.js

Works especially well with APIs built with the API Platform framework.

Documentation

The documentation of API Platform's Client Generator can be browsed on the official website.

Usage

Hydra

npx @api-platform/client-generator https://demo.api-platform.com/ output/ --resource Book

OpenAPI v2 (formerly known as Swagger) (experimental)

npx @api-platform/client-generator https://demo.api-platform.com/docs.json output/ --resource Book --format swagger

or

npx @api-platform/client-generator https://demo.api-platform.com/docs.json output/ --resource Book --format openapi2

OpenAPI v3 (experimental)

npx @api-platform/client-generator https://demo.api-platform.com/docs.json?spec_version=3 output/ --resource Book --format openapi3

Features

  • Generate high-quality ES6 components and files built with React, Redux, React Router and Redux Form including:
    • A list view
    • A creation form
    • An editing form
    • A deletion button
  • Use the Hydra or Swagger API documentation to generate the code
  • Generate the suitable HTML5 input type (number, date...) according to the type of the API property
  • Display of the server-side validation errors under the related input (if using API Platform Core)
  • Client-side validation (required attributes)
  • The generated HTML is compatible with Bootstrap and includes mandatory classes
  • The generated HTML code is accessible to people with disabilities (ARIA support)
  • The Redux and the React Router configuration is also generated

Credits

Created by Kévin Dunglas. Sponsored by Les-Tilleuls.coop.
Commercial support available upon request.

主要指標

概覽
名稱與所有者api-platform/create-client
主編程語言TypeScript
編程語言JavaScript (語言數: 5)
平台
許可證MIT License
所有者活动
創建於2017-03-27 15:38:03
推送於2025-03-10 15:11:37
最后一次提交
發布數34
最新版本名稱v0.10.0 (發布於 )
第一版名稱v0.1.6 (發布於 2017-08-23 10:44:21)
用户参与
星數377
關注者數23
派生數131
提交數378
已啟用問題?
問題數152
打開的問題數46
拉請求數196
打開的拉請求數7
關閉的拉請求數32
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?