linkorb/schemata 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

linkorb/schemata

Composer 安装命令:

composer require linkorb/schemata

包简介

Schema tooling: modelling, documentation, generators, validators

README 文档

README

Installation

You can use the included generator tools using the following steps

  • Make you have composer is installed (https://getcomposer.org/download/)
  • Add the dependency: composer require linkorb/schemata
  • Install the dependencies by running composer install. This will download all libraries we need in the vendor/ subdirectory

Usage

General CLI Usage

vendor/bin/schemata <command> <arguments>

Schema HTML documentation

Type the following command to generate HTML documentation based on the schema files:

`vendor/bin/schemata generate:html-doc /path/to/schema /path/to/build/html-doc`

This will parse the schema defined in the schema/ directory, and generate a complete set of HTML documentation in to the build/html-doc directory.

You can browse the documentation by opening the index.html file in a web-browser.

open `build/html-doc/index.html`

GraphQL schema definitions

Type the following command to generate GraphQL schema definitions based on the schema files:

`vendor/bin/schemata generate:graphql-schema /path/to/schema /path/to/build/graphql [--bundle]`

This will parse the schema defined in the schema/ directory, and generate a complete set of GraphQL types in to the build/graphql directory. Passing the --bundle flag will create a single bundled file instead of one per type

Context schema definitions

Type the following command to generate context schema definitions based on the schema files:

`vendor/bin/schemata generate:context-schema /path/to/schema /path/to/build/context [--bundle]`

This will parse the schema defined in the schema/ directory, and generate a complete set of GraphQL types in to the build/context directory. Passing the --bundle flag will create a single bundled file instead of one per type

Schema Validation

`vendor/bin/schemata schemata:validate /path/to/schema`

A service that scans through all tables and columns, performs validation. The console command returns 0 if no issues, returns -1 if issues exist.

Schema Diff

`vendor/bin/schemata schemata:diff /path/to/schemaOne /path/to/schemaTwo`

A console command that:

  • loads 2 schemas;
  • scans throught all tables+columns, and build an array of differences (added+removed tables and columns);
  • outputs the list of differences to the console.

Inline Usage Example

<?php

require_once __DIR__ . '/vendor/autoload.php';

use LinkORB\Schemata\Service\SchemaProviderPath;
use LinkORB\Schemata\Service\SchemaService;

$schemaProvider = new SchemaProviderPath('/workspace/schema');

$service = new SchemaService($schemaProvider->getSchema());

$service->parseSchema();

$schema = $service->getSchema();

echo
    'Number of tables: ' . count($schema->getTables()) . PHP_EOL,
    'Number of codelists: ' . count($schema->getCodelists()) . PHP_EOL
;

Conventional Commits

This repository is using Conventional Commits

Please run npm install at least once, in order to install the appropriate tooling and git hooks (this helps you to follow the conventions by linting them before actually committing).

In short: you should prefix your commit titles with the correct type (i.e. feat: my new cool feature). This helps to create clear commit histories, automatically handles semver, tagging and CHANGELOG.md generation.

If you'd like to reference a card in our planning system, simply add a #123 to the end of your commit title. The card will be correctly linked from the changelogs etc.

To publish a new release, simply run npm run publish. This will update the changelog, and manifests like composer.json, package.json, etc to a new tag. The tag follows Semver, and is selected based on your commit types since the last release.

linkorb/schemata 适用场景与选型建议

linkorb/schemata 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.24k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 linkorb/schemata 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 linkorb/schemata 我们能提供哪些服务?
定制开发 / 二次开发

基于 linkorb/schemata 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-05-31