mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-08-07 22:53:39 +00:00
23 lines
766 B
Plaintext
23 lines
766 B
Plaintext
---
|
|
import moduleSchema from '../data/modules.schema.json';
|
|
import processorSchema from '../data/processors.schema.json';
|
|
import Params from './Params.astro';
|
|
const {type, id} = Astro.props;
|
|
var schema;
|
|
|
|
switch(type) {
|
|
case 'module':
|
|
schema = moduleSchema.items?.oneOf?.find(schema=>schema["$id"] === id);
|
|
break;
|
|
case 'processor':
|
|
schema = processorSchema.items?.oneOf?.find(schema=>schema["$id"] === id);
|
|
break;
|
|
}
|
|
---
|
|
{
|
|
schema !== undefined &&
|
|
<ul>
|
|
{schema.properties.type !== undefined && <li><strong>type</strong>: <code>{schema.properties.type.const}</code></li>}
|
|
{schema.properties.params !== undefined && <li><strong>params</strong>:<Params schema={schema.properties.params}/></li>}
|
|
</ul>
|
|
} |