Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _generate_ansible_docs(args, api_spec, template_ctx):


def _generate_ftd_api_docs(args, api_spec, template_ctx, errors_codes):
if template_ctx['ftd_version'] == '7.0.0':
if template_ctx['ftd_version'] == '7.0.0' or template_ctx['ftd_version'] == '7.1.0':
# SSLGroupType has incorrect representation in 7.0.0 API spec, as it doesn't contain possible enum values.
# We need to add these enum values here to generate docs and represent possible values.
api_spec['models']['SSLGroupType']['enum'] = ["GROUP_14", "GROUP_15", "GROUP_19", "GROUP_20", "GROUP_21"]
Expand Down
6 changes: 3 additions & 3 deletions docs/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def generate_doc_files(self, dest_dir):
module_name = os.path.splitext(module_filename)[0]
module = importlib.import_module(module_name)

module_docs = yaml.load(module.DOCUMENTATION)
module_docs = yaml.load(module.DOCUMENTATION, Loader=yaml.FullLoader)
module_spec = ModuleSpec(
name=module_name,
short_description=self._doc_to_text(module_docs.get('short_description')),
Expand All @@ -270,7 +270,7 @@ def _doc_to_text(text):

@staticmethod
def _get_module_params(module):
docs = yaml.load(module.DOCUMENTATION)
docs = yaml.load(module.DOCUMENTATION, Loader=yaml.FullLoader)
return {k: {
'description': ModuleDocGenerator._doc_to_text(v.get('description')),
'required': v.get('required', False),
Expand All @@ -279,7 +279,7 @@ def _get_module_params(module):

@staticmethod
def _get_module_return_values(module):
return_params = yaml.load(module.RETURN)
return_params = yaml.load(module.RETURN, Loader=yaml.FullLoader)
return {k: {
'description': ModuleDocGenerator._doc_to_text(v.get('description')),
'returned': v.get('returned', ''),
Expand Down