Skip to content

Commit

Permalink
Document apispec.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Oct 3, 2015
1 parent 8a17bf0 commit 5538ddc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apispec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def dedent(content):
return content.strip()

def load_yaml_from_docstring(docstring):
"""Loads YAML from docstring"""
"""Loads YAML from docstring."""
split_lines = trim_docstring(docstring).split('\n')

# Cut YAML from rest of docstring
Expand Down Expand Up @@ -73,6 +73,9 @@ def load_yaml_from_docstring(docstring):
])

def load_operations_from_docstring(docstring):
"""Return a dictionary of Swagger operations parsed from a
a docstring.
"""
doc_data = load_yaml_from_docstring(docstring)
if doc_data:
return {key: val for key, val in iteritems(doc_data)
Expand Down
6 changes: 6 additions & 0 deletions docs/api_core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ apispec.exceptions

.. automodule:: apispec.exceptions
:members:

apispec.utils
-------------

.. automodule:: apispec.utils
:members:

0 comments on commit 5538ddc

Please sign in to comment.