Specifications of QingCloud APIs.
In QingCloud, we use OpenAPI Specification (Swagger) v2.0 to describe our APIs, and this API specifications can be used to generate code for SDKs and generate documentations.
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.
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.
The structure of the directories has following levels:
- Name of Service
- API Version
- Specification Format
- the Specification
└── 2013-08-30
└── swagger
├── api_v2.0.json
├── definitions.json
├── instance.json
├── volume.json
...
Currently, the specifications are expected to be in the OpenAPI Specification (Swagger) v2.0's JSON format.
There is a lot 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`
- Fork it ( https://github.com/yunify/qingcloud-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