myparcelcom/carrier-specification 问题修复 & 功能扩展

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

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

myparcelcom/carrier-specification

Composer 安装命令:

composer require myparcelcom/carrier-specification

包简介

MyParcel.com carrier API specification.

README 文档

README

Packagist OpenAPI Specification

The microservice API specification used by MyParcel.com located at https://carrier-specification.myparcel.com. This specification adheres to the OpenApi 3.1.0 specification and implements the JSON API specification.

Content

Installation

The repository provides Docker containers to validate and preview the spec before committing changes. This is also used when validating pull requests. To install Docker, follow the steps in the documentation.

To set up the project for development run:

./mp.sh setup

Commands

./mp.sh up - Start the containers which will start a server to watch file changes and reload automatically.

./mp.sh down - Stop the containers.

./mp.sh validate - Validate the specification.

NOTE: The validator only works when the containers are already running. Don't forget to start them.

Conventions

Conventions based on the Swagger and JSON Schema specs.

Our internal conventions are described below.

PUT, POST, PATCH

To avoid discussion, the use of the above HTTP methods is described below.

PUT

  • Used to create or replace a resource.
  • Always returns the same response on repeated requests.
  • Needs the full resource for the request (including the id for the to be created or replaced resource).

POST

  • Used to create a resource.
  • Does not return the same response on repeated requests.
  • Does not need the full resource for the request (often does not need the id for the to be created resource).

PATCH

  • Used to update an existing resource.
  • Does not return the same response on repeated requests.
  • Does not need the full resource for the request (you might only want to update a user's name for example).

API versioning

The API versioning follows semantic versioning. The increment in version number is done manually and should be part of the pull request.

Schema file naming

Definition file names follow PascalCasing. Where every first letter of a word (including the first word) is uppercase. For example, the definition for a country code would be found in:

specification/schemas/CountryCode.json

Path file naming

The files in specification/paths are named after their corresponding API endpoints. Where resources start with an uppercase letter and path variables with a lowercase letter. For example, the definition of the following route:

carriers/{carrier_id}/services

can be found in:

specification/paths/Carriers-carrier_id-Services.json

Parameter file naming

Parameter file names are prefixed with the corresponding parameter type. A path parameter for carrier_id would get the following file path:

specification/parameters/path-carrier_id.json

Unique parameters can just remain in the path file and do not need to be extracted to their own files.

License

All software by MyParcel.com is licensed under the MyParcel.com general terms and conditions.

myparcelcom/carrier-specification 适用场景与选型建议

myparcelcom/carrier-specification 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 22.94k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 02 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 myparcelcom/carrier-specification 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-02-06