QingStor API Specs
Specifications of QingStor APIs.
Specification
We use OpenAPI Specification (Swagger) v2.0 to describe QingStor APIs, the API specifications can be used to generate API documentation and SDK for various programming languages.
A customized data type was added to the original OpenAPI Specification v2.0 standard for better describing our APIs.
View the OpenAPI Specification (Swagger) v2.0 schema.
View an API specification example using this schema.
Customized Data Types
Common Name | type |
format |
Comments |
---|---|---|---|
DateTime (RFC 822) | string |
date-time-rfc822 |
Example: Mon, 02 Jan 2006 15:04:05 GMT |
Refer to data types in OpenAPI Specification (Swagger) v2.0 for more information.
Directory Organization
The structure of the directories has following levels:
- API Version
- Specification Format
- the Specification
For Example:
└── 2016-01-06
└── swagger
└── api_v2.0.json
├── bucket.json
├── bucket_acl.json
...
Currently, the specifications are expected to be in the OpenAPI Specification (Swagger) v2.0's JSON format.
Validation
There are lots of tools to validate JSON file with its JSON schema, we chose z-schema
to do this.
Notice: NodeJS is required.
Get in the project directory and install dependencies.
$ npm install
Run the validate script.
$ npm test # or `npm t`
Reference Documentations
Contributing
- Fork it ( https://github.com/yunify/qingstor-api-specs/fork )
- Create your feature branch (
git checkout -b new-feature
) - Commit your changes (
git commit -asm 'Add some feature'
) - Push to the branch (
git push origin new-feature
) - Create a new Pull Request