mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
static identifier in docs
* OPTIONS response descritpion for workflow job template node identifier value was an ever changing uuid4(). This is telling the user the wrong thing. We can not know what uuid4() is going to be in the docs. Instead, for the OPTIONS response description, tell the user the form that the uuid4() takes, ie. xxx-xxxx... * Note that the API browser still populates a uuid4 for the user when it generates the sample POST data. This is nice.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# All Rights Reserved.
|
||||
|
||||
from collections import OrderedDict
|
||||
from uuid import UUID
|
||||
|
||||
# Django
|
||||
from django.core.exceptions import PermissionDenied
|
||||
@@ -86,6 +87,8 @@ class Metadata(metadata.SimpleMetadata):
|
||||
# FIXME: Still isn't showing all default values?
|
||||
try:
|
||||
default = field.get_default()
|
||||
if type(default) is UUID:
|
||||
default = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
if field.field_name == 'TOWER_URL_BASE' and default == 'https://towerhost':
|
||||
default = '{}://{}'.format(self.request.scheme, self.request.get_host())
|
||||
field_info['default'] = default
|
||||
|
||||
Reference in New Issue
Block a user