Skip to content

chilianyi/qingcloud-api-specs

 
 

Repository files navigation

QingCloud API Specs

[![Build Status]()]() [![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingcloud-api-specs/blob/master/LICENSE)

Specifications of QingCloud APIs.

Specification

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.

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:

  1. Name of Service
  2. API Version
  3. Specification Format
  4. the Specification

For Example:

└── 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.

Validation

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`

Reference Documentations

Contributing

  1. Fork it ( https://github.com/yunify/qingcloud-api-specs/fork )
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -asm 'Add some feature')
  4. Push to the branch (git push origin new-feature)
  5. Create a new Pull Request

LICENSE

The Apache License (Version 2.0, January 2004).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%