File tree Expand file tree Collapse file tree
packages/docusaurus-plugin-openapi-docs/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 * ========================================================================== */
77
88import { SchemaObject } from "../openapi/types" ;
9- import {
10- createClosingArrayBracket ,
11- createOpeningArrayBracket ,
12- } from "./createArrayBracket" ;
139import { createDescription } from "./createDescription" ;
1410import { getQualifierMessage , getSchemaName } from "./schema" ;
1511import { create } from "./utils" ;
@@ -92,13 +88,7 @@ function createAnyOneOf(schema: SchemaObject): any {
9288 return create ( "TabItem" , {
9389 label : label ,
9490 value : `${ index } -item-properties` ,
95- children : [
96- createOpeningArrayBracket ( ) ,
97- anyOneChildren ,
98- createClosingArrayBracket ( ) ,
99- ]
100- . filter ( Boolean )
101- . flat ( ) ,
91+ children : [ anyOneChildren ] . filter ( Boolean ) . flat ( ) ,
10292 } ) ;
10393 }
10494 return create ( "TabItem" , {
Original file line number Diff line number Diff line change @@ -101,10 +101,7 @@ export interface ApiPageMetadata extends ApiMetadataBase {
101101 type : "api" ;
102102 api : ApiItem ;
103103 markdown ?: string ;
104- sampleResponses ?: null | {
105- statusCodes : string [ ] ;
106- responseExamples : string ; // compressed JSON
107- } ;
104+ sampleResponses ?: string ; // compressed JSON
108105}
109106
110107export interface ApiItem extends OperationObject {
@@ -118,6 +115,7 @@ export interface ApiItem extends OperationObject {
118115 proxy ?: string ;
119116 info : InfoObject ;
120117 extensions ?: object ;
118+ "x-code-samples" ?: any [ ] ;
121119}
122120
123121export interface InfoPageMetadata extends ApiMetadataBase {
You can’t perform that action at this time.
0 commit comments