Add a part of api-wg guideline

During nova-specs reviews, it is difficult to check all API changes
for following api-wg guideline because there is a lot of nova-specs
patches. There are some common mistakes against following guideline[1],
then this patch adds a part of the guideline to the template file for
avoiding these mistakes.

  REST API resource names
    * Resource names may include hyphens.
    * Resource names should not include underscores or other punctuation
      (sole exception is the hyphen).
  Fields in an API request or response body
    * Field names should use snake_case style, not CamelCase or MixedCase
      style.

[1]: https://github.com/openstack/api-wg/blob/master/guidelines/naming.rst

Change-Id: I20039ad1f7882cd5341431690b82dadab3cd1588
This commit is contained in:
Ken'ichi Ohmichi 2015-12-03 01:44:14 +00:00
parent e54fef91e5
commit 254110bc67
1 changed files with 10 additions and 2 deletions

View File

@ -156,11 +156,19 @@ Each API method which is either added or changed should have the following
* URL for the resource
* URL should not include underscores, and use hyphens instead.
* Parameters which can be passed via the url
* JSON schema definition for the body data if allowed
* JSON schema definition for the request body data if allowed
* JSON schema definition for the response data if any
* Field names should use snake_case style, not CamelCase or MixedCase
style.
* JSON schema definition for the response body data if any
* Field names should use snake_case style, not CamelCase or MixedCase
style.
* Example use case including typical API samples for both data supplied
by the caller and the response