can't unselect first oneOf option inside "Try It" (OAS3.0)
#3526
LuccaBitfly
started this conversation in
Bugs & Feedback
Replies: 1 comment
-
|
Here's a complete spec you can work with openapi: 3.0.4
info:
title: Test API
version: 1.0.0
paths:
/test:
post:
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OneOfSchema'
responses:
'200':
description: OK
components:
schemas:
OneOfSchema:
type: object
properties:
test:
oneOf:
- title: Number input
type: object
properties:
number_input:
type: number
required: [number_input]
- title: String input
type: object
properties:
string_input:
type: string
required: [string_input]
required: [test] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When documenting an API endpoint using OpenAPI 3.0 having an object field with
oneOfinside a request body schema, it is not possible to unselect the first listedoneOfoption in the "Try It" UI. For example, using this this as a request body schema:When selecting the "String input" option in the "Try It" window:
Then the data preview still shows the example placeholder for the first option, i.e.
number_input:I would expect it to deselect the first option when selecting a different
oneOffield, so the payload shown should be:{ "test": { "string_input": "test test" } }Beta Was this translation helpful? Give feedback.
All reactions