Skip to content

Instantly share code, notes, and snippets.

@martin-mfg
Created June 2, 2025 14:51
Show Gist options
  • Save martin-mfg/4e61a166b6b1a65552ca6d2e56c7b26c to your computer and use it in GitHub Desktop.
Save martin-mfg/4e61a166b6b1a65552ca6d2e56c7b26c to your computer and use it in GitHub Desktop.
openapi: 3.0.1
info:
title: dummy
version: 1.0.0
paths:
/one-of-array:
post:
description: myDescription
operationId: myOperation
requestBody:
content:
application/json:
schema:
oneOf:
- items:
type: string
type: array
- items:
$ref: '#/components/schemas/TestObject'
type: array
responses:
200:
description: OK
content:
application/json:
schema:
oneOf:
- items:
type: number
type: array
- items:
$ref: '#/components/schemas/TestObject'
type: array
components:
schemas:
TestObject:
properties:
myProperty:
type: string
type: object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment