Merge "Correct the api samples of type extra APIs"

This commit is contained in:
Jenkins 2016-12-21 04:04:34 +00:00 committed by Gerrit Code Review
commit 68b50a1640
5 changed files with 16 additions and 53 deletions

View File

@ -192,12 +192,12 @@ Response
:language: javascript
Create Extra Spec
=================
Create/update Extra Spec
========================
.. rest_method:: POST /types/{type_uuid}/extraspecs
.. rest_method:: PATCH /types/{type_uuid}/extraspecs
Create extra specs to the given type.
Create/update extra specs to the given type.
Normal response codes: 201
@ -213,7 +213,7 @@ Request
**Example Create Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-post-req.json
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-patch-req.json
:language: javascript
Response
@ -225,44 +225,7 @@ Response
**Example Create Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-list-resp.json
:language: javascript
Update Extra Spec
=================
.. rest_method:: PUT /types/{type_uuid}/extraspecs
Updates extra specs to the given type.
Normal response codes: 202
Error response codes: unauthorized(401), forbidden(403)
Request
-------
.. rest_parameters:: parameters.yaml
- type_uuid: type_uuid_path
- extra_specs: type_extra_specs
**Example Update Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-post-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- extra_specs: type_extra_specs
**Example Update Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-list-resp.json
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-patch-resp.json
:language: javascript

View File

@ -0,0 +1,3 @@
{
"key_3": "value_3"
}

View File

@ -0,0 +1,7 @@
{
"extra_specs":{
"key_1": "value_1",
"key_2": "value_2",
"key_3": "value_3"
}
}

View File

@ -1,5 +0,0 @@
{
"extra_specs":{
"key_2":"value_2"
}
}

View File

@ -1,5 +0,0 @@
{
"extra_specs":{
"key_2":"value_2"
}
}