Skip to content

Commit

Permalink
#15: Create method to write to the file
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Jul 25, 2019
1 parent 3687e82 commit a6df922
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/swagger/swagger_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ def decorate(cls):

return decorate

def write_swagger_spec(self):
"""
Writes the openapi.yaml file
"""
with open(SwaggerGenerator.FILE_PATH, "w+") as target:
target.write(self.get_yaml_top())
target.write(self.get_yaml_paths())
target.close()

@staticmethod
def get_yaml_top():
Expand Down

0 comments on commit a6df922

Please sign in to comment.