Created
March 27, 2020 06:22
-
-
Save transitive-bullshit/958b375dee20f9a92de6e7a7b481b157 to your computer and use it in GitHub Desktop.
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.2", | |
"info": { | |
"title": "Fast API", | |
"version": "0.1.0" | |
}, | |
"paths": { | |
"/stylecloud": { | |
"post": { | |
"responses": { | |
"200": { | |
"description": "Successful Response", | |
"content": { | |
"image/png": {}, | |
"application/json": { | |
"schema": {} | |
} | |
} | |
}, | |
"422": { | |
"description": "Validation Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/HTTPValidationError" | |
} | |
} | |
} | |
} | |
}, | |
"summary": "Stylecloud", | |
"operationId": "stylecloud_stylecloud_post", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StyleCloudRequest" | |
} | |
} | |
}, | |
"required": true | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"HTTPValidationError": { | |
"title": "HTTPValidationError", | |
"type": "object", | |
"properties": { | |
"detail": { | |
"title": "Detail", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/ValidationError" | |
} | |
} | |
} | |
}, | |
"StyleCloudRequest": { | |
"title": "StyleCloudRequest", | |
"type": "object", | |
"properties": { | |
"url": { | |
"title": "Url", | |
"type": "string", | |
"description": "URL of webpage to extract text" | |
}, | |
"text": { | |
"title": "Text", | |
"type": "string", | |
"description": "Source text" | |
}, | |
"size": { | |
"title": "Size", | |
"type": "integer", | |
"description": "Output width and height in pixels", | |
"default": 512 | |
}, | |
"icon": { | |
"title": "Icon", | |
"enum": [ | |
"fas fa-ad", | |
"fas fa-address-book", | |
"fas fa-address-card", | |
"fas fa-adjust" | |
], | |
"type": "string", | |
"description": "[Font Awesome](https://fontawesome.com/icons?d=gallery&m=free) icon mask", | |
"default": "fas fa-flag" | |
}, | |
"palette": { | |
"title": "Palette", | |
"enum": [ | |
"cartocolors.diverging.ArmyRose_2", | |
"cartocolors.diverging.Geyser_7", | |
"cartocolors.diverging.ArmyRose_2_r", | |
"cartocolors.diverging.Geyser_7_r" | |
], | |
"type": "string", | |
"description": "Color palette to use from [palettable](https://jiffyclub.github.io/palettable/)", | |
"default": "cartocolors.qualitative.Bold_6" | |
}, | |
"background_color": { | |
"title": "Background_Color", | |
"type": "string", | |
"format": "color", | |
"default": "white" | |
}, | |
"max_font_size": { | |
"title": "Max_Font_Size", | |
"type": "integer", | |
"default": 200 | |
}, | |
"max_words": { | |
"title": "Max_Words", | |
"exclusiveMinimum": 0, | |
"type": "integer", | |
"description": "Maximum number of words to include in the stylecloud", | |
"default": 2000 | |
}, | |
"stopwords": { | |
"title": "Stopwords", | |
"type": "boolean", | |
"description": "Boolean to filter out common stopwords", | |
"default": true | |
}, | |
"gradient": { | |
"title": "Gradient", | |
"enum": [ | |
"horizontal", | |
"vertical" | |
], | |
"type": "string", | |
"description": "Direction of gradient" | |
} | |
} | |
}, | |
"ValidationError": { | |
"title": "ValidationError", | |
"required": [ | |
"loc", | |
"msg", | |
"type" | |
], | |
"type": "object", | |
"properties": { | |
"loc": { | |
"title": "Location", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"msg": { | |
"title": "Message", | |
"type": "string" | |
}, | |
"type": { | |
"title": "Error Type", | |
"type": "string" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment