承接 rpodwika/fakerestserverbundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rpodwika/fakerestserverbundle

Composer 安装命令:

composer require rpodwika/fakerestserverbundle

包简介

Bundles creates Rest API based on schema provided in files. Supports most of the request types and provides routing

README 文档

README

Build Status Coverage Status

FakeRestServerBundle is a bundle to create a fully working API based on YAML schema definition.

How it works?

It parsers a YAML file with the database schema and based on that it creates the endpoints with possibility to perform requests such as GET, POST, PUT, HEAD, DELETE and OPTIONS

Schema definition

Given following schema defined in YAML

    user:
        - {id: 5, name: "John", surname: "Doe"}
        - {id: 6, name: "Jane", surname: "Doe"}
        - {id: 7, name: "Jack", surname: "Daniels"}
        
    pictures:
        - {id: 1, name: "A", src: "images/img.jpg"}
        - {id: 2, name: "B", src: "images/213.png"}
        - {id: 3, name: "C", src: "images/12.jpg"}

Following endpoints will be created

  ➜  fakeserver php bin/console debug:router
   ------------------------------ --------- -------- ------ ----------------------------------- 
    Name                           Method    Scheme   Host   Path                               
   ------------------------------ --------- -------- ------ ----------------------------------- 
    FAKE_SERVER_GET_user           GET       ANY      ANY    /user/{user}                       
    FAKE_SERVER_POST_user          POST      ANY      ANY    /user                              
    FAKE_SERVER_PUT_user           PUT       ANY      ANY    /user/{user}                       
    FAKE_SERVER_DELETE_user        DELETE    ANY      ANY    /user/{user}                       
    FAKE_SERVER_PATCH_user         PATCH     ANY      ANY    /user/{user}                       
    FAKE_SERVER_HEAD_user          HEAD      ANY      ANY    /user/{user}                       
    FAKE_SERVER_OPTIONS_user       OPTIONS   ANY      ANY    /user/{user}                       
    FAKE_SERVER_GET_pictures       GET       ANY      ANY    /pictures/{pictures}               
    FAKE_SERVER_POST_pictures      POST      ANY      ANY    /pictures                          
    FAKE_SERVER_PUT_pictures       PUT       ANY      ANY    /pictures/{pictures}               
    FAKE_SERVER_DELETE_pictures    DELETE    ANY      ANY    /pictures/{pictures}               
    FAKE_SERVER_PATCH_pictures     PATCH     ANY      ANY    /pictures/{pictures}               
    FAKE_SERVER_HEAD_pictures      HEAD      ANY      ANY    /pictures/{pictures}               
    FAKE_SERVER_OPTIONS_pictures   OPTIONS   ANY      ANY    /pictures/{pictures}  

Plans

  • Adding JSON schema definition
  • Adding PHP array schema definition
  • Creating schema definition which connects definitions in different type
  • Setting FakeServerApiController as a service and adding it to DI
  • Other?

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL
  • 更新时间: 2017-03-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固