Created
January 16, 2020 19:54
-
-
Save thurt/85757c4776cac9b3d2fe2a3ed2d8ad52 to your computer and use it in GitHub Desktop.
photo sharing specification file
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.1 | |
info: | |
title: Photo Sharing Service | |
version: "1.0.0" | |
servers: | |
- url: http://localhost:3000/api | |
description: localhost | |
- url: https://{domain}/api | |
description: Production Server | |
variables: | |
domain: | |
default: localhost:3000 | |
description: Domain | |
paths: | |
/api/images: | |
get: | |
summary: Get a list of uploaded image URIs | |
tags: | |
- Images | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: object | |
additionalProperties: false | |
properties: | |
imageURIs: | |
type: array | |
items: | |
type: string | |
statusCode: | |
type: integer | |
required: | |
- imageURIs | |
- statusCode | |
post: | |
summary: Upload an image to share | |
tags: | |
- Images | |
requestBody: | |
description: Picture data that is one of gif, | |
jpeg, or png | |
required: true | |
content: | |
multipart/form-data: | |
schema: | |
type: object | |
additionalProperties: false | |
properties: | |
image: | |
type: string | |
format: binary | |
required: | |
- image | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
imageURI: | |
type: string | |
statusCode: | |
type: integer | |
required: | |
- imageURI | |
- statusCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment