(type)
| 39 | } |
| 40 | |
| 41 | export function generateSchema(type) { |
| 42 | return `{\n\t\t\t"$schema": "http://json-schema.org/draft-04/schema#",\n\t\t\t"type": "object",\n\t\t\t"properties": {\n\t\t\t\t${type.fields |
| 43 | .map((f) => `"${f.name}" : ${getJsonType(f)}`) |
| 44 | .join( |
| 45 | ",\n\t\t\t\t", |
| 46 | )}\n\t\t\t},\n\t\t\t"additionalProperties": false\n\t\t}`; |
| 47 | } |
| 48 | |
| 49 | export function getTypeString( |
| 50 | field, |
no test coverage detected