Skip to content

Commit

Permalink
#50: Create a parameter class
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Sep 17, 2019
1 parent abe4252 commit d34cef8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/swagger/swagger_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
from common.config import config


class Parameter(object):
def __init__(self, description, name, param_type, example, location, is_required):
self.parameter_as_dict = {
"description": description,
"in": location,
"required": is_required,
"name": name,
"schema": {
"type": param_type,
"example": example
}
}

class SwaggerGenerator(object):
FILE_PATH = Path.cwd() / "swagger" / "openapi.yaml"

Expand Down

0 comments on commit d34cef8

Please sign in to comment.