@@ -64,7 +64,7 @@ function OpenAPISchemaProperty(
6464 const ancestors = new Set ( circularRefs . keys ( ) ) ;
6565 const alternatives = getSchemaAlternatives ( schema , ancestors ) ;
6666
67- const header = < OpenAPISchemaPresentation context = { context } property = { property } /> ;
67+ const header = < OpenAPISchemaPresentation id = { id } context = { context } property = { property } /> ;
6868 const content = ( ( ) => {
6969 if ( alternatives ?. schemas ) {
7070 const { schemas, discriminator } = alternatives ;
@@ -105,15 +105,13 @@ function OpenAPISchemaProperty(
105105
106106 if ( properties ?. length ) {
107107 return (
108- < div id = { id } className = { clsx ( 'openapi-schema' , className ) } { ...rest } >
109- < OpenAPIDisclosure
110- icon = { context . icons . plus }
111- header = { header }
112- label = { ( isExpanded ) => getDisclosureLabel ( { schema, isExpanded, context } ) }
113- >
114- { content }
115- </ OpenAPIDisclosure >
116- </ div >
108+ < OpenAPIDisclosure
109+ icon = { context . icons . plus }
110+ header = { header }
111+ label = { ( isExpanded ) => getDisclosureLabel ( { schema, isExpanded, context } ) }
112+ >
113+ { content }
114+ </ OpenAPIDisclosure >
117115 ) ;
118116 }
119117
@@ -365,11 +363,13 @@ function OpenAPISchemaEnum(props: {
365363 * Render the top row of a schema. e.g: name, type, and required status.
366364 */
367365export function OpenAPISchemaPresentation ( props : {
366+ id ?: string ;
368367 property : OpenAPISchemaPropertyEntry ;
369368 context : OpenAPIClientContext ;
370369 circularRefId ?: string ;
371370} ) {
372371 const {
372+ id,
373373 property : { schema, propertyName, required, isDiscriminatorProperty } ,
374374 circularRefId,
375375 context,
@@ -379,7 +379,7 @@ export function OpenAPISchemaPresentation(props: {
379379 const example = resolveFirstExample ( schema ) ;
380380
381381 return (
382- < div className = "openapi-schema-presentation" >
382+ < div id = { id } className = "openapi-schema-presentation" >
383383 < OpenAPISchemaName
384384 schema = { schema }
385385 type = { getSchemaTitle ( schema ) }
0 commit comments