You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a response that is rendering an array of objects defined in a schema with a circular reference. When the field corresponding to the circular reference is rendered, it's rendered as a "string" and not an "object".
Response Definition: (part of endpoint definitions)
responses:
'200':
description: Successful operation. Returns a Collector array containing the Collector entity version objects matching the provided NameAndTime objects. The collection contains exactly one entry for each provided NameAndTime object.content:
application/json:
schema:
type: arrayitems:
$ref: 'collector-definition.yaml#/components/schemas/Collector'
Then if we look at the part of the schema with the circular reference (cinfiguredInputs creates the circular reference):
Collector:
type: objectrequired:
- nameproperties:
name:
type: stringeffectiveAt:
type: string# This date-time is instead formatted as a Unix timestamp if the header parameter time-format is TIMESTAMP for the request that results in returning this object.format: date-timecanonicalName:
type: stringdescription:
type: stringconfiguredInputs:
type: arrayitems:
$ref: '#/components/schemas/Collector'minItems: 1
If I render this endpoint in the plugin, it's rendering "configuredInputs" as a string instead of as an object (possibly due to the circular reference?). Current rendered output:
**This is what I would expect to see rendered:** (since confiuguredInputs is an array of Collector objects)
[
{
"name": "string",
"effectiveAt": "2024-10-01T17:30:47.500Z",
"canonicalName": "string",
"description": "string",
"configuredInputs": [
{
"name": "string"
}
]
}
]
Is there a way to get objects with circular references to render correctly?
The text was updated successfully, but these errors were encountered:
I have a response that is rendering an array of objects defined in a schema with a circular reference. When the field corresponding to the circular reference is rendered, it's rendered as a "string" and not an "object".
Response Definition: (part of endpoint definitions)
Then if we look at the part of the schema with the circular reference (cinfiguredInputs creates the circular reference):
If I render this endpoint in the plugin, it's rendering "configuredInputs" as a string instead of as an object (possibly due to the circular reference?).
Current rendered output:
Is there a way to get objects with circular references to render correctly?
The text was updated successfully, but these errors were encountered: