diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..26eda70 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Rubber Duck Booking Tool + +Rubber Duck Booking Tool for the masses + +This tool allows you to manage your rubber duck repository, helping +your fellow developers to get the proper duck +for [debugging](http://en.wikipedia.org/wiki/Rubber_duck_debugging). diff --git a/api.py b/api.py deleted file mode 100644 index 076df65..0000000 --- a/api.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 - -from flask import Flask -from flask_restful import Resource, Api, reqparse - -app = Flask(__name__) -api = Api(app) - -parser = reqparse.RequestParser() -parser.add_argument('task') - -class HelloWorld(Resource): - def get(self): - return {"hello": "world"} - - def post(self): - print(parser.parse_args()) - return {'hello': 'world'} - -api.add_resource(HelloWorld, '/') - -if __name__ == '__main__': - app.run(debug=True) diff --git a/app.py b/app.py new file mode 100644 index 0000000..2678bda --- /dev/null +++ b/app.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import connexion + +if __name__ == '__main__': + app = connexion.App(__name__, specification_dir='./swagger/') + app.add_api('swagger.yaml', + arguments={ + 'title': 'Rubber Duck Booking Tool' + }) + app.run(port=8080) diff --git a/controllers/__init__.py b/controllers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/controllers/default_controller.py b/controllers/default_controller.py new file mode 100644 index 0000000..d75e600 --- /dev/null +++ b/controllers/default_controller.py @@ -0,0 +1,3 @@ + +def ducks_get() -> str: + return 'do some magic!' diff --git a/requirements.txt b/requirements.txt index 33ca2e1..92eee81 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ Flask==0.11.1 Flask-RESTful==0.3.5 +connexion==1.0.129 +gunicorn