Skip to content

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

License

Notifications You must be signed in to change notification settings

pringuin/api-platform-client-generator

 
 

Repository files navigation

API Platform Create Client

GitHub Actions npm version

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

  • Next.js
  • Nuxt
  • Quasar
  • React
  • React Native
  • TypeScript Interfaces
  • Vue.js
  • Vuetify.js

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

Documentation

The documentation of API Platform Create Client can be browsed on the official website.

Features

  • Generate high-quality TypeScript or ES6 components:
    • List view
    • Creation form
    • Editing form
    • Deletion button
  • Use the Hydra or OpenAPI documentation to generate the code
  • Generate the suitable 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)
  • Bring your own templates

Setup for development

Note that you'll need node v 16+ with npx 8+.

  1. Clone this repository
  2. Install dependencies:
    yarn
  3. Build the code:
    yarn build

Usage

Hydra

npm init @api-platform/client https://demo.api-platform.com/ output/ --resource Book

OpenAPI 3

npm init @api-platform/client https://demo.api-platform.com/docs.json output/ --resource Book --format openapi3

Credits

Created by Kévin Dunglas.

Sponsored by Les-Tilleuls.coop.

Commercial support is available upon request.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 52.1%
  • Vue 27.8%
  • TypeScript 20.0%
  • Shell 0.1%