Skip to content

Commit

Permalink
#15: Create method to write top part
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Jul 25, 2019
1 parent a6c90ce commit 5b0c8a0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/swagger/swagger_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,21 @@ def decorate(cls):
return cls

return decorate


@staticmethod
def get_yaml_top():
"""
Gets the top part of the openapi spec without the paths
:return: String containing the top part of the openapi spec
"""
return (f'''openapi: "3.0.0"
info:
title: DataGateway API
description: ICAT API to interface with the Data Gateway
version: "0"
servers:
- url: http://localhost:5000
paths:''')

0 comments on commit 5b0c8a0

Please sign in to comment.