-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
oneOf basically means union type
We could encode them with F# DUs
paths:
/pets:
patch:
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
responses:
'200':
description: Updated
components:
schemas:
Dog:
...
Cat:
...should generate
// usual generation of type objects
type Dog = ...
type Cat = ...
type CatOrDog = //generatedName
| Cat of Cat
| Dog of DogMetadata
Metadata
Assignees
Labels
No labels