Skip to content

Instantly share code, notes, and snippets.

@thurt
Created January 16, 2020 19:54
Show Gist options
  • Save thurt/85757c4776cac9b3d2fe2a3ed2d8ad52 to your computer and use it in GitHub Desktop.
Save thurt/85757c4776cac9b3d2fe2a3ed2d8ad52 to your computer and use it in GitHub Desktop.
photo sharing specification file
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