vitepress-openapi
Version:
Generate VitePress API Documentation from OpenAPI Specification.
10 lines (7 loc) • 344 B
text/typescript
import type { OAProperty } from '../parser/getSchemaUi'
import { jsXml } from 'json-xml-parse'
import { getSchemaUiJson } from './getSchemaUiJson'
export function getSchemaUiXml(uiProperties: OAProperty[] | OAProperty, useExample = false): any {
const uiJson = getSchemaUiJson(uiProperties, useExample)
return jsXml.toXmlString(uiJson)
}