@@ -166,7 +166,7 @@ function OpenAPISchemaAlternative(props: {
166
166
/**
167
167
* Render a circular reference to a schema.
168
168
*/
169
- export function OpenAPISchemaCircularRef ( props : { id : string ; schema : OpenAPIV3 . SchemaObject } ) {
169
+ function OpenAPISchemaCircularRef ( props : { id : string ; schema : OpenAPIV3 . SchemaObject } ) {
170
170
const { id, schema } = props ;
171
171
172
172
return (
@@ -180,7 +180,7 @@ export function OpenAPISchemaCircularRef(props: { id: string; schema: OpenAPIV3.
180
180
/**
181
181
* Render the enum value for a schema.
182
182
*/
183
- export function OpenAPISchemaEnum ( props : { enumValues : any [ ] } ) {
183
+ function OpenAPISchemaEnum ( props : { enumValues : any [ ] } ) {
184
184
const { enumValues } = props ;
185
185
186
186
return (
@@ -198,7 +198,10 @@ export function OpenAPISchemaEnum(props: { enumValues: any[] }) {
198
198
) ;
199
199
}
200
200
201
- export function OpenAPISchemaPresentation ( props : { property : OpenAPISchemaPropertyEntry } ) {
201
+ /**
202
+ * Render the top row of a schema. e.g: name, type, and required status.
203
+ */
204
+ function OpenAPISchemaPresentation ( props : { property : OpenAPISchemaPropertyEntry } ) {
202
205
const {
203
206
property : { schema, propertyName, required } ,
204
207
} = props ;
@@ -245,9 +248,7 @@ export function OpenAPISchemaPresentation(props: { property: OpenAPISchemaProper
245
248
/**
246
249
* Get the sub-properties of a schema.
247
250
*/
248
- export function getSchemaProperties (
249
- schema : OpenAPIV3 . SchemaObject
250
- ) : null | OpenAPISchemaPropertyEntry [ ] {
251
+ function getSchemaProperties ( schema : OpenAPIV3 . SchemaObject ) : null | OpenAPISchemaPropertyEntry [ ] {
251
252
// check array AND schema.items as this is sometimes null despite what the type indicates
252
253
if ( schema . type === 'array' && schema . items && ! checkIsReference ( schema . items ) ) {
253
254
const items = schema . items ;
@@ -360,7 +361,7 @@ function flattenAlternatives(
360
361
} , [ ] ) ;
361
362
}
362
363
363
- export function getSchemaTitle ( schema : OpenAPIV3 . SchemaObject ) : string {
364
+ function getSchemaTitle ( schema : OpenAPIV3 . SchemaObject ) : string {
364
365
// Otherwise try to infer a nice title
365
366
let type = 'any' ;
366
367
0 commit comments