This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request from 'sync-request'; | |
import * as glue from '@aws-cdk/aws-glue'; | |
export function polytectJsonSchemaToGlue(): glue.Type { | |
console.log("Getting Polytect reference schema...") | |
const res = request('GET', 'https://raw.githubusercontent.com/polyverse/polytect/master/reference/schema.json'); | |
const body = res.getBody(); | |
const schema = JSON.parse(body.toString()); | |
return recursiveGlueColumns(schema, schema.definitions); | |
} |