Open
Description
Describe the bug
When an endpoint's response examples:
section contains a single item, the name of that item doesn't appear above the JSON example code in the right content pane.
Expected behavior
When an endpoint's response examples:
section contains a single item, the name of that item appears above the JSON example code in the right content pane -- either in a dropdown box (as when the examples:
section contains multiple items), or in some other fashion (e.g. label/text).
Minimal reproducible OpenAPI snippet(if possible)
Open API snippet (response "examples:" contains one (1) item)
paths:
'/sites/{siteId}/users/{userId}/cart/clear':
post:
tags:
- CartApi
summary: Delete all items in a cart.
description: <p><i>No comparable method currently exists in the monolith's codebase; this is new functionality.</i></p><p>Delete all quantities & properties of all products & services that were previously added to a shopping cart.</p>
operationId: CartApi_DeleteAllItemsInCart
parameters:
- name: siteId
in: path
description: ID of the site to which the shopping cart is scoped.
required: true
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
- name: userId
in: path
description: ID of the user to whom the shopping cart is scoped.
required: true
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
responses:
'200':
description: <p>The API request was successfully processed; an object describing the empty cart is returned.</p>
content:
application/json:
schema:
$ref: '#/components/schemas/GetCartSummaryResponse'
examples:
All items in the shopping cart were deleted.:
value: {"cartGuid":"0fa1ef5f-5395-4679-901d-fd6c941f3460","cartItems":[]}
Open API snippet (response "examples:" contains two (2) items)
paths:
'/sites/{siteId}/users/{userId}/cart/clear':
post:
tags:
- CartApi
summary: Delete all items in a cart.
description: <p><i>No comparable method currently exists in the monolith's codebase; this is new functionality.</i></p><p>Delete all quantities & properties of all products & services that were previously added to a shopping cart.</p>
operationId: CartApi_DeleteAllItemsInCart
parameters:
- name: siteId
in: path
description: ID of the site to which the shopping cart is scoped.
required: true
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
- name: userId
in: path
description: ID of the user to whom the shopping cart is scoped.
required: true
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
responses:
'200':
description: <p>The API request was successfully processed; an object describing the empty cart is returned.</p>
content:
application/json:
schema:
$ref: '#/components/schemas/GetCartSummaryResponse'
examples:
All items in the shopping cart were deleted.:
value: {"cartGuid":"0fa1ef5f-5395-4679-901d-fd6c941f3460","cartItems":[]}
DUMMY:
value: {"cartGuid":"0fa1ef5f-5395-4679-901d-fd6c941f3460","cartItems":[]}
Screenshots
Additional context
Add any other context about the problem here.