2017 © Pedro Peláez
 

library carrier-specification

MyParcel.com carrier API specification.

image

myparcelcom/carrier-specification

MyParcel.com carrier API specification.

  • Friday, July 20, 2018
  • by myparcelcom
  • Repository
  • 5 Watchers
  • 0 Stars
  • 1,980 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 33 Versions
  • 90 % Grown

The README.md

MyParcel.com carrier API specification

Packagist OpenAPI Specification, (*1)

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., (*2)

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., (*3)

To set up the project for development run:, (*4)

./mp.sh setup

Commands

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

./mp.sh down - Stop the containers., (*6)

./mp.sh validate - Validate the specification., (*7)

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

Conventions

Conventions based on the Swagger and JSON Schema specs., (*9)

Our internal conventions are described below., (*10)

PUT, POST, PATCH

To avoid discussion, the use of the above HTTP methods is described below., (*11)

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., (*12)

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:, (*13)

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:, (*14)

carriers/{carrier_id}/services

can be found in:, (*15)

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:, (*16)

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., (*17)

License

All software by MyParcel.com is licensed under the MyParcel.com general terms and conditions., (*18)

The Versions

20/07 2018

dev-master

9999999-dev https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

20/07 2018

dev-feature/maintenance

dev-feature/maintenance https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

22/06 2018

v0.4.0

0.4.0.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

11/06 2018

v0.3.2

0.3.2.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

24/05 2018

v0.3.1

0.3.1.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

23/05 2018

dev-feature/MP-801-pudo-categories

dev-feature/MP-801-pudo-categories https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

23/05 2018

dev-feature/MP-870-pudo-categories

dev-feature/MP-870-pudo-categories https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

23/05 2018

dev-bugfix/broken-setup

dev-bugfix/broken-setup https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

25/04 2018

dev-feature/change-service-code-example

dev-feature/change-service-code-example https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

07/03 2018

v0.3.0

0.3.0.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

06/03 2018

dev-feature/shipment-return-address

dev-feature/shipment-return-address https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

01/03 2018

v0.2.4

0.2.4.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

28/02 2018

dev-feature/readme

dev-feature/readme https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

28/02 2018

dev-feature/region-code-regex

dev-feature/region-code-regex https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

22/02 2018

v0.2.3

0.2.3.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

22/02 2018

v0.2.2

0.2.2.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

21/02 2018

v0.2.1

0.2.1.0 https://docs.myparcel.com/carrier-specification

MyParcel.com carrier API specification.

  Sources   Download

16/02 2018

v0.2.0

0.2.0.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

06/02 2018

v0.1.14

0.1.14.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

06/02 2018

v0.1.13

0.1.13.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

24/01 2018

v0.1.12

0.1.12.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

17/01 2018

v0.1.11

0.1.11.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

27/12 2017

v0.1.10

0.1.10.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

01/12 2017

v0.1.9

0.1.9.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

15/11 2017

v0.1.8

0.1.8.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

01/11 2017

v0.1.7

0.1.7.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

11/10 2017

v0.1.6

0.1.6.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

10/10 2017

v0.1.5

0.1.5.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

10/10 2017

v0.1.4

0.1.4.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

09/10 2017

v0.1.2

0.1.2.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

09/10 2017

v0.1.3

0.1.3.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

04/10 2017

v0.1.1

0.1.1.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download

29/09 2017

v0.1.0

0.1.0.0 https://www.myparcel.com

MyParcel.com carrier API specification powering the Swagger documentation.

  Sources   Download