Skip to content

Instantly share code, notes, and snippets.

@Piumal1999
Created October 23, 2025 06:16
Show Gist options
  • Select an option

  • Save Piumal1999/0f3485188094a2548f5a529e75fce30c to your computer and use it in GitHub Desktop.

Select an option

Save Piumal1999/0f3485188094a2548f5a529e75fce30c to your computer and use it in GitHub Desktop.
openapi: 3.0.3
info:
title: Simple Multipart Upload API
version: 1.0.0
paths:
/upload:
post:
summary: Upload a file with JSON metadata
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
- meta
properties:
file:
type: string
format: binary
description: The file to upload.
meta:
type: object
description: JSON metadata describing the file.
properties:
title:
type: string
tags:
type: array
items:
type: string
encoding:
meta:
contentType: application/json
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
id:
type: string
message:
type: string
examples:
success:
value:
id: "abc123"
message: "Upload accepted."
servers:
- url: https://api.example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment