This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "sean", | |
"version": "1.0.0", | |
"title": "Seans-Python3-Flask-Rest-Boilerplate", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"license": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"tags": [ | |
{ | |
"name": "Book Request", | |
"description": "Example API for requesting and return book requests" | |
} | |
], | |
"paths": { | |
"/request": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"license": { | |
"name": "MIT", | |
"url": "https://opensource.org/licenses/MIT" | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "sean", | |
"version": "1.0.0", | |
"title": "Seans-Python3-Flask-Rest-Boilerplate", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"license": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "sean", | |
"version": "1.0.0", | |
"title": "Seans-Python3-Flask-Rest-Boilerplate", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"license": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP = Flask(__name__) | |
### swagger specific ### | |
SWAGGER_URL = '/swagger' | |
API_URL = '/static/swagger.json' | |
SWAGGERUI_BLUEPRINT = get_swaggerui_blueprint( | |
SWAGGER_URL, | |
API_URL, | |
config={ | |
'app_name': "Seans-Python-Flask-REST-Boilerplate" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "Seans-TypeScript-NodeJS-CRUD-REST-API-Boilerplate", | |
"description": "A minimal and easy to follow example of what you need to create a CRUD style API in NodeJs using TypeScript", | |
"license": { | |
"name": "MIT", | |
"url": "https://opensource.org/licenses/MIT" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __init__(self): | |
# initialize the successor chain | |
self.chain1 = Dispenser50() | |
self.chain2 = Dispenser20() | |
self.chain3 = Dispenser10() | |
# set the chain of responsibility | |
# The Client may compose chains once or | |
# the hadler can set them dynamically at | |
# handle time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express' | |
import Router from './router' | |
import swaggerUi from 'swagger-ui-express' | |
import * as swaggerDocument from './swagger.json' | |
import * as bodyParser from 'body-parser' | |
class App { | |
private httpServer: any | |
constructor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "The Title of your project", | |
"description": "A description of your project", | |
"license": { | |
"name": "MIT", | |
"url": "https://opensource.org/licenses/MIT" | |
} |