diff --git a/AUTHORS.rst b/AUTHORS.rst index 7dff7970..48abf87e 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -51,3 +51,4 @@ Contributors (chronological) - Christina Long `@cvlong `_ - Felix Yan `@felixonmars `_ - Guoli Lyu `@Guoli-Lyu `_ +- Laura Beaufort `@lbeaufort `_ diff --git a/apispec/yaml_utils.py b/apispec/yaml_utils.py index 816fe567..6ceb5272 100644 --- a/apispec/yaml_utils.py +++ b/apispec/yaml_utils.py @@ -46,7 +46,7 @@ def load_yaml_from_docstring(docstring): yaml_string = '\n'.join(split_lines[cut_from:]) yaml_string = dedent(yaml_string) - return yaml.load(yaml_string) or {} + return yaml.safe_load(yaml_string) or {} PATH_KEYS = set([ diff --git a/docs/special_topics.rst b/docs/special_topics.rst index 491fadaf..69baa72e 100644 --- a/docs/special_topics.rst +++ b/docs/special_topics.rst @@ -87,7 +87,7 @@ Here is an example that includes a `Security Scheme Object