Skip to content

Instantly share code, notes, and snippets.

@sazapp-spectra
Created June 14, 2024 05:51
Show Gist options
  • Save sazapp-spectra/e6ac417bf9265d5f0613c41868607474 to your computer and use it in GitHub Desktop.
Save sazapp-spectra/e6ac417bf9265d5f0613c41868607474 to your computer and use it in GitHub Desktop.
OpenAPI generator: oneOf with array of strings
openapi: 3.0.0
info:
title: API
version: 1.0.0
servers:
- url: https://example.com
paths:
/foo:
patch:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Bar"
responses:
"204":
description: "No Content"
components:
schemas:
Bar:
description: dolor sit amet
properties:
prop:
oneOf:
- description: "Option one"
type: string
format: date-time
- description: "Option two"
type: array
items:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment