Skip to content

Commit

Permalink
Fix quotes in documentation of build-images
Browse files Browse the repository at this point in the history
In JSON, strings must be wrapped in double quotes. The list of
serializer fields is not actually JSON, but for consistency it makes
sense to use double quotes everywhere.

JIRA: PDC-854
  • Loading branch information
lubomir committed Aug 10, 2015
1 parent 4a81b0a commit e0795d5
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions pdc/apps/package/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def create(self, request, *args, **kwargs):
__Data__:
{
'image_id': string, # required
'image_format': string, # required
'md5': string, # required
'rpms': [
"image_id": string, # required
"image_format": string, # required
"md5": string, # required
"rpms": [
{
"name": string, # required
"epoch": int, # required
Expand All @@ -167,7 +167,7 @@ def create(self, request, *args, **kwargs):
}
...
], # optional
'archives': [
"archives": [
{
"build_nvr": string, # required
"name": string, # required
Expand All @@ -176,7 +176,7 @@ def create(self, request, *args, **kwargs):
}
...
], # optional
'releases': [
"releases": [
release_id, string # optional
......
] # optional
Expand All @@ -189,14 +189,14 @@ def create(self, request, *args, **kwargs):
{
"url": url,
'image_id': string,
'image_format': string,
'md5': string,
'rpms': [
"image_id": string,
"image_format": string,
"md5": string,
"rpms": [
"rpm_nevra", string,
...
],
'archives': [
"archives": [
{
"build_nvr": string,
"name": string,
Expand All @@ -205,7 +205,7 @@ def create(self, request, *args, **kwargs):
}
...
],
'releases': [
"releases": [
"release_id", string
......
]
Expand Down Expand Up @@ -243,14 +243,14 @@ def list(self, request, *args, **kwargs):
"results": [
{
"url": url,
'image_id': string,
'image_format': string,
'md5': string,
'rpms': [
"image_id": string,
"image_format": string,
"md5": string,
"rpms": [
"rpm_nevra", string,
...
],
'archives': [
"archives": [
{
"build_nvr": string,
"name": string,
Expand All @@ -259,7 +259,7 @@ def list(self, request, *args, **kwargs):
}
...
],
'releases': [
"releases": [
"release_id", string
......
]
Expand All @@ -282,14 +282,14 @@ def retrieve(self, request, *args, **kwargs):
{
"url": url,
'image_id': string,
'image_format': string,
'md5': string,
'rpms': [
"image_id": string,
"image_format": string,
"md5": string,
"rpms": [
"rpm_nevra", string,
...
],
'archives': [
"archives": [
{
"build_nvr": string,
"name": string,
Expand All @@ -298,7 +298,7 @@ def retrieve(self, request, *args, **kwargs):
}
...
],
'releases': [
"releases": [
"release_id", string
......
]
Expand All @@ -313,10 +313,10 @@ def update(self, request, *args, **kwargs):
PUT: for full fields update
{
'image_id': string,
'image_format': string,
'md5': string,
'rpms': [
"image_id": string,
"image_format": string,
"md5": string,
"rpms": [
{
"name": string,
"epoch": int,
Expand All @@ -328,7 +328,7 @@ def update(self, request, *args, **kwargs):
}
...
],
'archives': [
"archives": [
{
"build_nvr": string,
"name": string,
Expand All @@ -337,19 +337,19 @@ def update(self, request, *args, **kwargs):
}
...
],
'releases': [
"releases": [
"release_id", string
......
]
}
PATCH: for partial update
# so you can give one or more fields in ['image_id', 'image_format',
# 'md5', 'rpms', 'archives']
# so you can give one or more fields in ["image_id", "image_format",
# "md5", "rpms", "archives"]
# to do the update
__NOTE:__ when updating 'image_format', its value must be an existed one, otherwise it will
__NOTE:__ when updating `image_format`, its value must be an existed one, otherwise it will
cause HTTP 400 BAD REQUEST error.
__URL__:
Expand All @@ -359,14 +359,14 @@ def update(self, request, *args, **kwargs):
{
"url": url,
'image_id': string,
'image_format': string,
'md5': string,
'rpms': [
"image_id": string,
"image_format": string,
"md5": string,
"rpms": [
"rpm_nevra", string,
...
],
'archives': [
"archives": [
{
"build_nvr": string,
"name": string,
Expand All @@ -375,7 +375,7 @@ def update(self, request, *args, **kwargs):
}
...
],
'releases': [
"releases": [
"release_id", string
......
]
Expand Down

0 comments on commit e0795d5

Please sign in to comment.