Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

RunKit + npm: @asyncapi/modelina

node v14.20.1
version: 1.0.0
endpointsharetweet
var { GoGenerator } = require("@asyncapi/modelina") const generator = new GoGenerator(); const schema = { $id: "Address", type: "object", properties: { street_name: { type: "string" }, city: { type: "string", description: "City description" }, house_number: { type: "number" }, marriage: { type: "boolean", description: "Status if marriage live in given house" }, pet_names: { type: "array", items: { type: "string" } }, state: { type: "string", enum: ["Texas", "Alabama", "California", "other"] }, }, required: ["street_name", "city", "state", "house_number", "state"], }; async function generate() { const models = await generator.generate(schema); models.forEach( (model) => console.log(model.result) ); } generate();
Created from: https://npm.runkit.com/%40asyncapi%2Fmodelina
Loading…

no comments

    sign in to comment